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
|
||||
s_open_time += io.DeltaTime;
|
||||
if (s_open_time >= s_close_time)
|
||||
{
|
||||
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()
|
||||
|
|
|
@ -1142,7 +1142,7 @@ void InputManager::ClearBindStateFromSource(InputBindingKey key)
|
|||
|
||||
if (current_mask == binding->full_mask)
|
||||
{
|
||||
std::get<InputButtonEventHandler>(binding->handler)(0);
|
||||
std::get<InputButtonEventHandler>(binding->handler)(-1);
|
||||
matched = true;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue