mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-05 12:13:50 +01:00
Windows/Vulkan: Correctly handle minimizing and restoring the window
We can't create a swapchain in this case but we still want emulation to keep running. So we ditch the last renderpass in VulkanQueueRunner but run all the rest (if PauseWhenMinimized isn't set). Now works without any validation errors or hangs.
This commit is contained in:
1 parent
8de2a236f1
commit
9137eedb7b
11 files changed
+86
-44
No files matched your search
@@ -639,6 +639,7 @@ namespace MainWindow
|
||||
}
|
||||
|
||||
static bool first = true;
|
||||
static bool wasMinimized = false;
|
||||
|
||||
switch (message) {
|
||||
case WM_CREATE:
|
||||
@@ -790,6 +791,10 @@ namespace MainWindow
|
||||
if (hasFocus) {
|
||||
g_InputManager.GainFocus();
|
||||
}
|
||||
if (wasMinimized) {
|
||||
System_PostUIMessage(UIMessage::WINDOW_RESTORED, "true");
|
||||
wasMinimized = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case SIZE_MINIMIZED:
|
||||
@@ -798,6 +803,7 @@ namespace MainWindow
|
||||
System_PostUIMessage(UIMessage::WINDOW_MINIMIZED, "true");
|
||||
}
|
||||
g_InputManager.LoseFocus();
|
||||
wasMinimized = true;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
||||
Reference in new issue
Block a user