FullscreenUI: Untangle Escape button behaviour

Now it doesn't race against Open Pause Menu
This commit is contained in:
Silent
2022-07-23 11:38:46 +02:00
parent 4d89b52d3b
commit 3040ce7bbd
3 changed files with 19 additions and 15 deletions

View File

@ -628,6 +628,8 @@ void FullscreenUI::Render()
GetEditingSettingsInterface()->Save();
Host::RunOnCPUThread([]() { System::ApplySettings(false); });
}
ImGuiFullscreen::ResetCloseMenuIfNeeded();
}
void FullscreenUI::ReturnToMainWindow()
@ -2066,7 +2068,7 @@ void FullscreenUI::DrawSettingsWindow()
{
ResetFocusHere();
if (ImGui::IsNavInputTest(ImGuiNavInput_Cancel, ImGuiNavReadMode_Pressed))
if (WantsToCloseMenu())
{
if (ImGui::IsWindowFocused())
ReturnToMainWindow();