mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-23 05:19:56 +00:00
Fix #7480 where we would lose the keyboard after activating fullscreen with the mouse
This commit is contained in:
parent
83f81eaaf1
commit
66e9877561
@ -86,6 +86,9 @@ namespace WindowsRawInput {
|
||||
info.cbSize = sizeof(info);
|
||||
if (GetMenuBarInfo(MainWindow::GetHWND(), OBJID_MENU, 0, &info) != 0) {
|
||||
menuActive = info.fBarFocused != FALSE;
|
||||
} else {
|
||||
// In fullscreen mode, we remove the menu
|
||||
menuActive = false;
|
||||
}
|
||||
return menuActive;
|
||||
}
|
||||
|
@ -311,7 +311,7 @@ namespace MainWindow
|
||||
}
|
||||
}
|
||||
|
||||
void ToggleFullscreen(HWND hWnd, bool goingFullscreen = false) {
|
||||
void ToggleFullscreen(HWND hWnd, bool goingFullscreen) {
|
||||
// Make sure no rendering is happening during the switch.
|
||||
Core_NotifyWindowHidden(true);
|
||||
g_inModeSwitch = true; // Make sure WM_SIZE doesn't call Core_NotifyWindowHidden(false)...
|
||||
@ -372,6 +372,7 @@ namespace MainWindow
|
||||
|
||||
g_inModeSwitch = false;
|
||||
Core_NotifyWindowHidden(false);
|
||||
WindowsRawInput::NotifyMenu();
|
||||
}
|
||||
|
||||
RECT DetermineWindowRectangle() {
|
||||
@ -1530,10 +1531,7 @@ namespace MainWindow
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_FULLSCREEN:
|
||||
g_Config.bFullScreen = !g_Config.bFullScreen;
|
||||
|
||||
ToggleFullscreen(hwndMain, g_Config.bFullScreen);
|
||||
|
||||
PostMessage(hWnd, WM_USER_TOGGLE_FULLSCREEN, 0, 0);
|
||||
break;
|
||||
|
||||
case ID_OPTIONS_VERTEXCACHE:
|
||||
@ -1620,6 +1618,10 @@ namespace MainWindow
|
||||
}
|
||||
break;
|
||||
|
||||
case WM_USER_TOGGLE_FULLSCREEN:
|
||||
ToggleFullscreen(hwndMain, !g_Config.bFullScreen);
|
||||
break;
|
||||
|
||||
case WM_INPUT:
|
||||
return WindowsRawInput::Process(hWnd, wParam, lParam);
|
||||
|
||||
|
@ -13,6 +13,7 @@ namespace MainWindow
|
||||
WM_USER_UPDATE_SCREEN = WM_USER + 102,
|
||||
WM_USER_WINDOW_TITLE_CHANGED = WM_USER + 103,
|
||||
WM_USER_BROWSE_BOOT_DONE = WM_USER + 104,
|
||||
WM_USER_TOGGLE_FULLSCREEN = WM_USER + 105,
|
||||
};
|
||||
|
||||
enum {
|
||||
|
Loading…
Reference in New Issue
Block a user