diff options
author | fearlessTobi <thm.frey@gmail.com> | 2018-07-26 16:09:52 +0200 |
---|---|---|
committer | fearlessTobi <thm.frey@gmail.com> | 2018-07-26 16:09:52 +0200 |
commit | 18c2c9692777d664f6641450521a99578886add8 (patch) | |
tree | dda5106df321f0729b3b9c3e9f3ac643a163cc30 /src | |
parent | Merge pull request #827 from lioncash/log (diff) | |
download | yuzu-18c2c9692777d664f6641450521a99578886add8.tar yuzu-18c2c9692777d664f6641450521a99578886add8.tar.gz yuzu-18c2c9692777d664f6641450521a99578886add8.tar.bz2 yuzu-18c2c9692777d664f6641450521a99578886add8.tar.lz yuzu-18c2c9692777d664f6641450521a99578886add8.tar.xz yuzu-18c2c9692777d664f6641450521a99578886add8.tar.zst yuzu-18c2c9692777d664f6641450521a99578886add8.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/yuzu/main.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 3c2726498..af9ed8fda 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -205,15 +205,27 @@ void GMainWindow::InitializeRecentFileMenuActions() { void GMainWindow::InitializeHotkeys() { RegisterHotkey("Main Window", "Load File", QKeySequence::Open); RegisterHotkey("Main Window", "Start Emulation"); + RegisterHotkey("Main Window", "Continue/Pause", QKeySequence(Qt::Key_F4)); RegisterHotkey("Main Window", "Fullscreen", QKeySequence::FullScreen); RegisterHotkey("Main Window", "Exit Fullscreen", QKeySequence(Qt::Key_Escape), Qt::ApplicationShortcut); + RegisterHotkey("Main Window", "Toggle Speed Limit", QKeySequence("CTRL+Z"), + Qt::ApplicationShortcut); LoadHotkeys(); connect(GetHotkey("Main Window", "Load File", this), &QShortcut::activated, this, &GMainWindow::OnMenuLoadFile); connect(GetHotkey("Main Window", "Start Emulation", this), &QShortcut::activated, this, &GMainWindow::OnStartGame); + connect(GetHotkey("Main Window", "Continue/Pause", this), &QShortcut::activated, this, [&] { + if (emulation_running) { + if (emu_thread->IsRunning()) { + OnPauseGame(); + } else { + OnStartGame(); + } + } + }); connect(GetHotkey("Main Window", "Fullscreen", render_window), &QShortcut::activated, ui.action_Fullscreen, &QAction::trigger); connect(GetHotkey("Main Window", "Fullscreen", render_window), &QShortcut::activatedAmbiguously, @@ -224,6 +236,10 @@ void GMainWindow::InitializeHotkeys() { ToggleFullscreen(); } }); + connect(GetHotkey("Main Window", "Toggle Speed Limit", this), &QShortcut::activated, this, [&] { + Settings::values.toggle_framelimit = !Settings::values.toggle_framelimit; + UpdateStatusBar(); + }); } void GMainWindow::SetDefaultUIGeometry() { |