CommonHostInterface: Implement frame step hotkey

This commit is contained in:
Connor McLaughlin
2020-07-08 01:57:34 +10:00
parent fe867edefb
commit 97a946bd62
5 changed files with 24 additions and 24 deletions

View File

@ -402,8 +402,6 @@ bool SDLHostInterface::Initialize()
ImGui::NewFrame();
RegisterHotkeys();
// process events to pick up controllers before updating input map
ProcessEvents();
UpdateInputMap();
@ -1435,16 +1433,6 @@ void SDLHostInterface::ClearImGuiFocus()
ImGui::SetWindowFocus(nullptr);
}
void SDLHostInterface::RegisterHotkeys()
{
RegisterHotkey(StaticString("General"), StaticString("FrameStep"), StaticString("Frame Step"), [this](bool pressed) {
if (!pressed)
{
DoFrameStep();
}
});
}
void SDLHostInterface::DoStartDisc()
{
Assert(!m_system);
@ -1476,15 +1464,6 @@ void SDLHostInterface::DoChangeDisc()
m_system->ResetPerformanceCounters();
}
void SDLHostInterface::DoFrameStep()
{
if (!m_system)
return;
m_frame_step_request = true;
m_paused = false;
}
void SDLHostInterface::Run()
{
while (!m_quit_request)