Qt: Implement "Refresh Game List" hotkey

This commit is contained in:
spycrab 2018-06-06 18:28:51 +02:00
parent c93210155f
commit 23394164de
3 changed files with 7 additions and 0 deletions

View File

@ -165,6 +165,10 @@ void HotkeyScheduler::Run()
Common::SleepCurrentThread(100);
}
// Refresh Game List
if (IsHotkey(HK_REFRESH_LIST))
emit RefreshGameListHotkey();
// Pause and Unpause
if (IsHotkey(HK_PLAY_PAUSE))
emit TogglePauseHotkey();

View File

@ -30,6 +30,7 @@ signals:
void ResetHotkey();
void TogglePauseHotkey();
void ScreenShotHotkey();
void RefreshGameListHotkey();
void SetStateSlotHotkey(int slot);
void StateLoadSlotHotkey();
void StateSaveSlotHotkey();

View File

@ -391,6 +391,8 @@ void MainWindow::ConnectHotkeys()
connect(m_hotkey_scheduler, &HotkeyScheduler::EjectDisc, this, &MainWindow::EjectDisc);
connect(m_hotkey_scheduler, &HotkeyScheduler::ExitHotkey, this, &MainWindow::close);
connect(m_hotkey_scheduler, &HotkeyScheduler::TogglePauseHotkey, this, &MainWindow::TogglePause);
connect(m_hotkey_scheduler, &HotkeyScheduler::RefreshGameListHotkey, this,
&MainWindow::RefreshGameList);
connect(m_hotkey_scheduler, &HotkeyScheduler::StopHotkey, this, &MainWindow::RequestStop);
connect(m_hotkey_scheduler, &HotkeyScheduler::ResetHotkey, this, &MainWindow::Reset);
connect(m_hotkey_scheduler, &HotkeyScheduler::ScreenShotHotkey, this, &MainWindow::ScreenShot);