Merge pull request #6823 from spycrab/qt_reset_hotkey

Qt: Implement "Reset" hotkey
This commit is contained in:
Léo Lam 2018-05-12 13:12:24 +02:00 committed by GitHub
commit e78235943e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -165,6 +165,10 @@ void HotkeyScheduler::Run()
if (IsHotkey(HK_STOP)) if (IsHotkey(HK_STOP))
emit StopHotkey(); emit StopHotkey();
// Reset
if (IsHotkey(HK_RESET))
emit ResetHotkey();
// Frameskipping // Frameskipping
HandleFrameskipHotkeys(); HandleFrameskipHotkeys();

View File

@ -27,6 +27,7 @@ signals:
void ExitHotkey(); void ExitHotkey();
void FullScreenHotkey(); void FullScreenHotkey();
void StopHotkey(); void StopHotkey();
void ResetHotkey();
void TogglePauseHotkey(); void TogglePauseHotkey();
void ScreenShotHotkey(); void ScreenShotHotkey();
void SetStateSlotHotkey(int slot); void SetStateSlotHotkey(int slot);

View File

@ -345,6 +345,7 @@ void MainWindow::ConnectHotkeys()
connect(m_hotkey_scheduler, &HotkeyScheduler::ExitHotkey, this, &MainWindow::close); connect(m_hotkey_scheduler, &HotkeyScheduler::ExitHotkey, this, &MainWindow::close);
connect(m_hotkey_scheduler, &HotkeyScheduler::TogglePauseHotkey, this, &MainWindow::TogglePause); connect(m_hotkey_scheduler, &HotkeyScheduler::TogglePauseHotkey, this, &MainWindow::TogglePause);
connect(m_hotkey_scheduler, &HotkeyScheduler::StopHotkey, this, &MainWindow::RequestStop); 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); connect(m_hotkey_scheduler, &HotkeyScheduler::ScreenShotHotkey, this, &MainWindow::ScreenShot);
connect(m_hotkey_scheduler, &HotkeyScheduler::FullScreenHotkey, this, &MainWindow::FullScreen); connect(m_hotkey_scheduler, &HotkeyScheduler::FullScreenHotkey, this, &MainWindow::FullScreen);
@ -354,7 +355,6 @@ void MainWindow::ConnectHotkeys()
&MainWindow::StateSaveSlot); &MainWindow::StateSaveSlot);
connect(m_hotkey_scheduler, &HotkeyScheduler::SetStateSlotHotkey, this, connect(m_hotkey_scheduler, &HotkeyScheduler::SetStateSlotHotkey, this,
&MainWindow::SetStateSlot); &MainWindow::SetStateSlot);
connect(m_hotkey_scheduler, &HotkeyScheduler::StartRecording, this, connect(m_hotkey_scheduler, &HotkeyScheduler::StartRecording, this,
&MainWindow::OnStartRecording); &MainWindow::OnStartRecording);
connect(m_hotkey_scheduler, &HotkeyScheduler::ExportRecording, this, connect(m_hotkey_scheduler, &HotkeyScheduler::ExportRecording, this,