HostDisplay: Manually throttle fullscreen UI presentation

Fixes flickering screen in fullscreen with Vulkan.
This commit is contained in:
Connor McLaughlin
2022-12-04 14:05:57 +10:00
parent eafa4fb1a3
commit 7d3ac98cc6
19 changed files with 81 additions and 58 deletions

View File

@ -638,7 +638,6 @@ void FullscreenUI::OnSystemDestroyed()
if (!IsInitialized())
return;
g_host_display->SetVSync(true);
s_pause_menu_was_open = false;
SwitchToLanding();
}
@ -668,15 +667,7 @@ void FullscreenUI::PauseForMenuOpen()
{
s_was_paused_on_quick_menu_open = (System::GetState() == System::State::Paused);
if (g_settings.pause_on_menu && !s_was_paused_on_quick_menu_open)
{
Host::RunOnCPUThread([]() {
System::PauseSystem(true);
// force vsync on when pausing
if (g_host_display)
g_host_display->SetVSync(true);
});
}
Host::RunOnCPUThread([]() { System::PauseSystem(true); });
s_pause_menu_was_open = true;
}