diff options
author | bunnei <bunneidev@gmail.com> | 2018-07-27 22:06:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-27 22:06:56 +0200 |
commit | 2128ab2d21ff577429c141f1f72d8f43dacf5758 (patch) | |
tree | 17b4ca7c55f5f897c29b3d3afc36e9463ee670b7 | |
parent | Merge pull request #844 from lioncash/lbl (diff) | |
parent | Port #3594 from Citra (diff) | |
download | yuzu-2128ab2d21ff577429c141f1f72d8f43dacf5758.tar yuzu-2128ab2d21ff577429c141f1f72d8f43dacf5758.tar.gz yuzu-2128ab2d21ff577429c141f1f72d8f43dacf5758.tar.bz2 yuzu-2128ab2d21ff577429c141f1f72d8f43dacf5758.tar.lz yuzu-2128ab2d21ff577429c141f1f72d8f43dacf5758.tar.xz yuzu-2128ab2d21ff577429c141f1f72d8f43dacf5758.tar.zst yuzu-2128ab2d21ff577429c141f1f72d8f43dacf5758.zip |
-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 97273f967..96998643e 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -207,15 +207,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, @@ -226,6 +238,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() { |