Merge pull request #10122 from malleoz/record-hotkeys-without-game-running

HotkeyScheduler: Check for certain hotkeys in game list
This commit is contained in:
Mai M 2021-09-23 11:32:43 -04:00 committed by GitHub
commit 753a1595bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 15 deletions

View File

@ -169,12 +169,25 @@ void HotkeyScheduler::Run()
HotkeyManagerEmu::GetStatus(true); HotkeyManagerEmu::GetStatus(true);
if (!Core::IsRunningAndStarted()) // Open
continue;
if (IsHotkey(HK_OPEN)) if (IsHotkey(HK_OPEN))
emit Open(); emit Open();
// Refresh Game List
if (IsHotkey(HK_REFRESH_LIST))
emit RefreshGameListHotkey();
// Recording
if (IsHotkey(HK_START_RECORDING))
emit StartRecording();
// Exit
if (IsHotkey(HK_EXIT))
emit ExitHotkey();
if (!Core::IsRunningAndStarted())
continue;
// Disc // Disc
if (IsHotkey(HK_EJECT_DISC)) if (IsHotkey(HK_EJECT_DISC))
@ -192,10 +205,6 @@ void HotkeyScheduler::Run()
Common::SleepCurrentThread(100); Common::SleepCurrentThread(100);
} }
// Refresh Game List
if (IsHotkey(HK_REFRESH_LIST))
emit RefreshGameListHotkey();
// Pause and Unpause // Pause and Unpause
if (IsHotkey(HK_PLAY_PAUSE)) if (IsHotkey(HK_PLAY_PAUSE))
emit TogglePauseHotkey(); emit TogglePauseHotkey();
@ -215,10 +224,6 @@ void HotkeyScheduler::Run()
if (IsHotkey(HK_SCREENSHOT)) if (IsHotkey(HK_SCREENSHOT))
emit ScreenShotHotkey(); emit ScreenShotHotkey();
// Exit
if (IsHotkey(HK_EXIT))
emit ExitHotkey();
// Unlock Cursor // Unlock Cursor
if (IsHotkey(HK_UNLOCK_CURSOR)) if (IsHotkey(HK_UNLOCK_CURSOR))
emit UnlockCursor(); emit UnlockCursor();
@ -232,10 +237,6 @@ void HotkeyScheduler::Run()
if (IsHotkey(HK_REQUEST_GOLF_CONTROL)) if (IsHotkey(HK_REQUEST_GOLF_CONTROL))
emit RequestGolfControl(); emit RequestGolfControl();
// Recording
if (IsHotkey(HK_START_RECORDING))
emit StartRecording();
if (IsHotkey(HK_EXPORT_RECORDING)) if (IsHotkey(HK_EXPORT_RECORDING))
emit ExportRecording(); emit ExportRecording();