Windows: Handle fullscreen message consistently.

This handles it the same way as SDL, etc. so that the new button on the
main screen works again.
This commit is contained in:
Unknown W. Brackets committed 2021-01-09 14:17:41 -08:00
1 parent e00f894340
commit 43a13f7ec6
4 files changed
+15 -3

No files matched your search

+6
View File
@@ -132,6 +132,7 @@ namespace MainWindow
static bool inFullscreenResize = false;
static bool inResizeMove = false;
static bool hasFocus = true;
static bool g_isFullscreen = false;
// gross hack
bool noFocusPause = false; // TOGGLE_PAUSE state to override pause on lost focus
@@ -355,6 +356,7 @@ namespace MainWindow
::SetMenu(hWnd, goingFullscreen ? NULL : menu);
g_Config.bFullScreen = goingFullscreen;
g_isFullscreen = goingFullscreen;
g_IgnoreWM_SIZE = false;
@@ -1029,4 +1031,8 @@ namespace MainWindow
PostMessage(hwndMain, WM_USER_TOGGLE_FULLSCREEN, fullscreen, 0);
}
bool IsFullscreen() {
return g_isFullscreen;
}
} // namespace