Windows: Pause the rendering thread while switching to full screen

This commit is contained in:
Henrik Rydgard committed 2015-09-20 19:45:36 +02:00
1 parent 5f18390c04
commit 1410d7f6d5
3 files changed
+66 -3

No files matched your search

+10 -2
View File
@@ -300,7 +300,12 @@ namespace MainWindow
void ToggleFullscreen(HWND hWnd, bool goingFullscreen) {
// Make sure no rendering is happening during the switch.
Core_NotifyWindowHidden(true);
bool isOpenGL = g_Config.iGPUBackend == GPU_BACKEND_OPENGL;
if (isOpenGL) {
GL_Pause();
}
int oldWindowState = g_WindowState;
g_IgnoreWM_SIZE = true;
@@ -361,8 +366,11 @@ namespace MainWindow
ShowOwnedPopups(hwndMain, goingFullscreen ? FALSE : TRUE);
W32Util::MakeTopMost(hwndMain, g_Config.bTopMost);
Core_NotifyWindowHidden(false);
WindowsRawInput::NotifyMenu();
if (isOpenGL) {
GL_Resume();
}
}
RECT DetermineWindowRectangle() {