mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-25 07:09:48 -06:00
Add Open Achievements Hotkey
Adds a hotkey to pause emulation and bring up the Achievements dialog.
This commit is contained in:
@ -192,6 +192,11 @@ void HotkeyScheduler::Run()
|
||||
if (IsHotkey(HK_EXIT))
|
||||
emit ExitHotkey();
|
||||
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
if (IsHotkey(HK_OPEN_ACHIEVEMENTS))
|
||||
emit OpenAchievements();
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
|
||||
if (!Core::IsRunning(system))
|
||||
{
|
||||
// Only check for Play Recording hotkey when no game is running
|
||||
|
@ -53,6 +53,9 @@ signals:
|
||||
void ExportRecording();
|
||||
void ToggleReadOnlyMode();
|
||||
void ConnectWiiRemote(int id);
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
void OpenAchievements();
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
|
||||
void Step();
|
||||
void StepOver();
|
||||
|
@ -658,6 +658,10 @@ void MainWindow::ConnectHotkeys()
|
||||
movie.SetReadOnly(read_only);
|
||||
emit ReadOnlyModeChanged(read_only);
|
||||
});
|
||||
#ifdef USE_RETRO_ACHIEVEMENTS
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::OpenAchievements, this,
|
||||
&MainWindow::ShowAchievementsWindow, Qt::QueuedConnection);
|
||||
#endif // USE_RETRO_ACHIEVEMENTS
|
||||
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::Step, m_code_widget, &CodeWidget::Step);
|
||||
connect(m_hotkey_scheduler, &HotkeyScheduler::StepOver, m_code_widget, &CodeWidget::StepOver);
|
||||
|
Reference in New Issue
Block a user