diff options
| author | 2019-03-07 11:33:24 -0500 | |
|---|---|---|
| committer | 2019-03-07 11:33:24 -0500 | |
| commit | 1a4d733ec73ecefb3f2a2a4b54450a17075f2a9f (patch) | |
| tree | ac4299664935ba1a31222d4daa15ef0088997565 /src | |
| parent | Merge pull request #2206 from lioncash/audio-stop (diff) | |
| parent | yuzu: add a hotkey to switch between undocked and docked mode (diff) | |
| download | yuzu-1a4d733ec73ecefb3f2a2a4b54450a17075f2a9f.tar.gz yuzu-1a4d733ec73ecefb3f2a2a4b54450a17075f2a9f.tar.xz yuzu-1a4d733ec73ecefb3f2a2a4b54450a17075f2a9f.zip | |
Merge pull request #2205 from FearlessTobi/docked-undocked-hotkey
yuzu: add a hotkey to switch between undocked and docked mode
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 0f5a14841..c6f3ab4e4 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -11,6 +11,7 @@ | |||
| 11 | #include "applets/profile_select.h" | 11 | #include "applets/profile_select.h" |
| 12 | #include "applets/software_keyboard.h" | 12 | #include "applets/software_keyboard.h" |
| 13 | #include "applets/web_browser.h" | 13 | #include "applets/web_browser.h" |
| 14 | #include "configuration/configure_input.h" | ||
| 14 | #include "configuration/configure_per_general.h" | 15 | #include "configuration/configure_per_general.h" |
| 15 | #include "core/file_sys/vfs.h" | 16 | #include "core/file_sys/vfs.h" |
| 16 | #include "core/file_sys/vfs_real.h" | 17 | #include "core/file_sys/vfs_real.h" |
| @@ -522,6 +523,7 @@ void GMainWindow::InitializeHotkeys() { | |||
| 522 | Qt::ApplicationShortcut); | 523 | Qt::ApplicationShortcut); |
| 523 | hotkey_registry.RegisterHotkey("Main Window", "Capture Screenshot", | 524 | hotkey_registry.RegisterHotkey("Main Window", "Capture Screenshot", |
| 524 | QKeySequence(QKeySequence::Print)); | 525 | QKeySequence(QKeySequence::Print)); |
| 526 | hotkey_registry.RegisterHotkey("Main Window", "Change Docked Mode", QKeySequence(Qt::Key_F10)); | ||
| 525 | 527 | ||
| 526 | hotkey_registry.LoadHotkeys(); | 528 | hotkey_registry.LoadHotkeys(); |
| 527 | 529 | ||
| @@ -591,6 +593,12 @@ void GMainWindow::InitializeHotkeys() { | |||
| 591 | OnCaptureScreenshot(); | 593 | OnCaptureScreenshot(); |
| 592 | } | 594 | } |
| 593 | }); | 595 | }); |
| 596 | connect(hotkey_registry.GetHotkey("Main Window", "Change Docked Mode", this), | ||
| 597 | &QShortcut::activated, this, [&] { | ||
| 598 | Settings::values.use_docked_mode = !Settings::values.use_docked_mode; | ||
| 599 | OnDockedModeChanged(!Settings::values.use_docked_mode, | ||
| 600 | Settings::values.use_docked_mode); | ||
| 601 | }); | ||
| 594 | } | 602 | } |
| 595 | 603 | ||
| 596 | void GMainWindow::SetDefaultUIGeometry() { | 604 | void GMainWindow::SetDefaultUIGeometry() { |