mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-17 07:49:21 +00:00
Minor fixes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4955 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
dbfdcc263b
commit
85c2310b03
3 changed files with 12 additions and 11 deletions
|
@ -154,8 +154,6 @@ LRESULT CALLBACK WndProc( HWND hWnd, UINT iMsg, WPARAM wParam, LPARAM lParam )
|
|||
}
|
||||
else if (wParam == WIIMOTE_DISCONNECT)
|
||||
{
|
||||
if (g_Config.bFullscreen)
|
||||
ToggleFullscreen(hWnd);
|
||||
PostMessage(m_hMain, WM_USER, wParam, lParam);
|
||||
}
|
||||
break;
|
||||
|
@ -305,7 +303,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
|
||||
|
@ -335,14 +333,14 @@ void ToggleFullscreen(HWND hParent, bool bForceFull)
|
|||
RECT rcdesktop;
|
||||
GetWindowRect(GetDesktopWindow(), &rcdesktop);
|
||||
|
||||
// Set new window style FS -> Windowed
|
||||
SetWindowLong(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
|
||||
SetWindowLong(hParent, GWL_STYLE, style);
|
||||
|
||||
// Re-Enable the cursor
|
||||
ShowCursor(TRUE);
|
||||
g_Config.bFullscreen = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue