mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-07 12:05:52 +00:00
ImGuiOverlays: Make escape close save state selector
This commit is contained in:
parent
e06f1f1002
commit
d32143b319
@ -1107,7 +1107,15 @@ void SaveStateSelectorUI::Draw()
|
|||||||
// auto-close
|
// auto-close
|
||||||
s_open_time += io.DeltaTime;
|
s_open_time += io.DeltaTime;
|
||||||
if (s_open_time >= s_close_time)
|
if (s_open_time >= s_close_time)
|
||||||
|
{
|
||||||
Close();
|
Close();
|
||||||
|
}
|
||||||
|
else if (ImGui::IsKeyPressed(ImGuiKey_Escape))
|
||||||
|
{
|
||||||
|
// Need to cancel the hotkey bindings, otherwise the pause menu will open.
|
||||||
|
InputManager::ClearBindStateFromSource(InputManager::MakeHostKeyboardKey(0));
|
||||||
|
Close();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
s32 SaveStateSelectorUI::GetCurrentSlot()
|
s32 SaveStateSelectorUI::GetCurrentSlot()
|
||||||
|
@ -1142,7 +1142,7 @@ void InputManager::ClearBindStateFromSource(InputBindingKey key)
|
|||||||
|
|
||||||
if (current_mask == binding->full_mask)
|
if (current_mask == binding->full_mask)
|
||||||
{
|
{
|
||||||
std::get<InputButtonEventHandler>(binding->handler)(0);
|
std::get<InputButtonEventHandler>(binding->handler)(-1);
|
||||||
matched = true;
|
matched = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user