mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-22 22:00:39 -06:00
Minor fixes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4955 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -349,7 +349,9 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
|
||||
ToggleFullscreen(m_hWnd);
|
||||
}
|
||||
else if (wParam == WIIMOTE_DISCONNECT)
|
||||
{
|
||||
PostMessage(m_hMain, WM_USER, wParam, lParam);
|
||||
}
|
||||
break;
|
||||
|
||||
// This is called when we close the window when we render to a separate window
|
||||
@ -461,7 +463,7 @@ void ToggleFullscreen(HWND hParent, bool bForceFull)
|
||||
dmScreenSettings.dmPelsWidth = w_fs;
|
||||
dmScreenSettings.dmPelsHeight = h_fs;
|
||||
dmScreenSettings.dmFields = DM_PELSWIDTH|DM_PELSHEIGHT;
|
||||
if (ChangeDisplaySettings(&dmScreenSettings, 0) != DISP_CHANGE_SUCCESSFUL)
|
||||
if (ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL)
|
||||
return;
|
||||
|
||||
// Set new window style -> PopUp
|
||||
@ -490,14 +492,14 @@ void ToggleFullscreen(HWND hParent, bool bForceFull)
|
||||
RECT rcdesktop;
|
||||
GetWindowRect(GetDesktopWindow(), &rcdesktop);
|
||||
|
||||
// Set new window style FS -> Windowed
|
||||
SetWindowLongPtr(hParent, GWL_STYLE, style);
|
||||
|
||||
// SetWindowPos to the center of the screen
|
||||
int X = (rcdesktop.right-rcdesktop.left)/2 - (rc.right-rc.left)/2;
|
||||
int Y = (rcdesktop.bottom-rcdesktop.top)/2 - (rc.bottom-rc.top)/2;
|
||||
SetWindowPos(hParent, NULL, X, Y, rc.right-rc.left, rc.bottom-rc.top, SWP_NOREPOSITION | SWP_NOZORDER);
|
||||
|
||||
// Set new window style FS -> Windowed
|
||||
SetWindowLongPtr(hParent, GWL_STYLE, style);
|
||||
|
||||
// Re-Enable the cursor
|
||||
ShowCursor(TRUE);
|
||||
g_Config.bFullscreen = false;
|
||||
|
Reference in New Issue
Block a user