Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[C++] Fix camera
#1
Thumbs Up 
You are not allowed to view links. Register or Login to view.


#PythonApplicationProcedure.cpp
//Keress rá erre:
Code:
void CPythonApplication::__MinimizeFullScreenWindow(HWND hWnd, DWORD dwWidth, DWORD dwHeight)
{
ChangeDisplaySettings(0, 0);
SetWindowPos(hWnd, 0, 0, 0,
dwWidth,
dwHeight,
SWP_SHOWWINDOW);
ShowWindow(hWnd, SW_MINIMIZE);
}


//Írd utána ezt:
Code:
void CPythonApplication::__ResetCameraWhenMinimize()
{
CCameraManager& rkCmrMgr=CCameraManager::Instance();
CCamera* pkCmrCur=rkCmrMgr.GetCurrentCamera();
if (pkCmrCur) 
{
pkCmrCur->EndDrag();
}

SetCursorNum(NORMAL);
if ( CURSOR_MODE_HARDWARE == GetCursorMode())
SetCursorVisible(TRUE);
}



//Keress rá erre:
Code:
if (m_isWindowFullScreenEnable)
{
__MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight);
}




//Írd felül ezzel:

Code:
if (m_isWindowFullScreenEnable)
{
__MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight);
__ResetCameraWhenMinimize();
}
else
{
__ResetCameraWhenMinimize();
}



#PythonApplication.h

//Keress rá erre:

Code:
void __MinimizeFullScreenWindow(HWND hWnd, DWORD dwWidth, DWORD dwHeight);


//Írd alá ezt:

Code:
void __ResetCameraWhenMinimize();



Üdv, Pisti95
[Image: 1453876818-b8928becdb9a3058b7c9ff22ccc5caf6.jpeg]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)