mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-06-17 19:25:46 -04:00
CommonHostInterface: Implement frame step hotkey
This commit is contained in:
@ -856,6 +856,16 @@ void CommonHostInterface::DrawDebugWindows()
|
||||
m_system->GetMDEC()->DrawDebugStateWindow();
|
||||
}
|
||||
|
||||
void CommonHostInterface::DoFrameStep()
|
||||
{
|
||||
if (!m_system)
|
||||
return;
|
||||
|
||||
m_frame_step_request = true;
|
||||
if (m_paused)
|
||||
PauseSystem(false);
|
||||
}
|
||||
|
||||
std::optional<CommonHostInterface::HostKeyCode>
|
||||
CommonHostInterface::GetHostKeyCode(const std::string_view key_code) const
|
||||
{
|
||||
@ -1263,6 +1273,13 @@ void CommonHostInterface::RegisterGeneralHotkeys()
|
||||
if (!pressed && m_system)
|
||||
SaveScreenshot();
|
||||
});
|
||||
|
||||
RegisterHotkey(StaticString("General"), StaticString("FrameStep"), StaticString("Frame Step"), [this](bool pressed) {
|
||||
if (!pressed)
|
||||
{
|
||||
DoFrameStep();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void CommonHostInterface::RegisterGraphicsHotkeys()
|
||||
|
@ -271,6 +271,7 @@ protected:
|
||||
void DrawFPSWindow();
|
||||
void DrawOSDMessages();
|
||||
void DrawDebugWindows();
|
||||
void DoFrameStep();
|
||||
|
||||
std::unique_ptr<GameList> m_game_list;
|
||||
|
||||
@ -280,6 +281,7 @@ protected:
|
||||
std::mutex m_osd_messages_lock;
|
||||
|
||||
bool m_paused = false;
|
||||
bool m_frame_step_request = false;
|
||||
bool m_speed_limiter_temp_disabled = false;
|
||||
bool m_speed_limiter_enabled = false;
|
||||
bool m_timer_resolution_increased = false;
|
||||
|
Reference in New Issue
Block a user