Jump to content

[C++] Bug Fix When You Minimize Client


steffan95
 Share

Recommended Posts

#PythonApplicationProcedure.cpp

 

 

//Search this function:

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);

}

//Add after:

void CPythonApplication::__ResetCameraWhenMinimize()

{

CCameraManager& rkCmrMgr=CCameraManager::Instance();

CCamera* pkCmrCur=rkCmrMgr.GetCurrentCamera();

if (pkCmrCur)

{

pkCmrCur->EndDrag();

}

 

SetCursorNum(NORMAL);

if ( CURSOR_MODE_HARDWARE == GetCursorMode())

SetCursorVisible(TRUE);

}

 

//Search:

if (m_isWindowFullScreenEnable)

{

__MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight);

}

//Replace with:

if (m_isWindowFullScreenEnable)

{

__MinimizeFullScreenWindow(hWnd, m_dwWidth, m_dwHeight);

__ResetCameraWhenMinimize();

}

else

{

__ResetCameraWhenMinimize();

}

 

 

 

#PythonApplication.h

 

Hidden Content

    Give reaction to this post to see the hidden content.

 

 

Have fun, TlFriends

Hidden Content

    Give reaction to this post to see the hidden content.
/emoticons/[email protected] 2x" width="20" height="20" data-src="https://m2dev.net/uploads/emoticons/smile.png">

  • Thanks 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...