mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-19 13:25:45 -04:00
CommonHostInterface: Implement frame step hotkey
This commit is contained in:
@ -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)
|
||||
|
@ -66,7 +66,6 @@ private:
|
||||
void DestroyDisplay();
|
||||
void CreateImGuiContext();
|
||||
void UpdateFramebufferScale();
|
||||
void RegisterHotkeys();
|
||||
|
||||
/// Executes a callback later, after the UI has finished rendering. Needed to boot while rendering ImGui.
|
||||
void RunLater(std::function<void()> callback);
|
||||
@ -80,7 +79,6 @@ private:
|
||||
void DrawImGuiWindows() override;
|
||||
void DoStartDisc();
|
||||
void DoChangeDisc();
|
||||
void DoFrameStep();
|
||||
|
||||
void HandleSDLEvent(const SDL_Event* event);
|
||||
void ProcessEvents();
|
||||
@ -101,7 +99,6 @@ private:
|
||||
|
||||
bool m_fullscreen = false;
|
||||
bool m_quit_request = false;
|
||||
bool m_frame_step_request = false;
|
||||
bool m_settings_window_open = false;
|
||||
bool m_about_window_open = false;
|
||||
|
||||
|
Reference in New Issue
Block a user