diff options
| author | 2018-11-16 20:20:41 -0800 | |
|---|---|---|
| committer | 2018-11-16 20:20:41 -0800 | |
| commit | 0072275d25b10fb354e0cf2eea25f0b85f1519f2 (patch) | |
| tree | 5735c6c024008e7e67cc6dc4c5698370e959b6a4 | |
| parent | Merge pull request #1705 from Jcw87/mingw-jpeg (diff) | |
| parent | yuzu: Add hotkey for Amiibo loading (diff) | |
| download | yuzu-0072275d25b10fb354e0cf2eea25f0b85f1519f2.tar.gz yuzu-0072275d25b10fb354e0cf2eea25f0b85f1519f2.tar.xz yuzu-0072275d25b10fb354e0cf2eea25f0b85f1519f2.zip | |
Merge pull request #1678 from FearlessTobi/amiibo-hotkeys
Port citra-emu/citra#4387: "yuzu: Add hotkey for Amiibo loading"
Diffstat (limited to '')
| -rw-r--r-- | src/yuzu/main.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 131ad19de..999086e7f 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -12,7 +12,7 @@ | |||
| 12 | #include "core/file_sys/vfs_real.h" | 12 | #include "core/file_sys/vfs_real.h" |
| 13 | #include "core/hle/service/acc/profile_manager.h" | 13 | #include "core/hle/service/acc/profile_manager.h" |
| 14 | 14 | ||
| 15 | // These are wrappers to avoid the calls to CreateDirectory and CreateFile becuase of the Windows | 15 | // These are wrappers to avoid the calls to CreateDirectory and CreateFile because of the Windows |
| 16 | // defines. | 16 | // defines. |
| 17 | static FileSys::VirtualDir VfsFilesystemCreateDirectoryWrapper( | 17 | static FileSys::VirtualDir VfsFilesystemCreateDirectoryWrapper( |
| 18 | const FileSys::VirtualFilesystem& vfs, const std::string& path, FileSys::Mode mode) { | 18 | const FileSys::VirtualFilesystem& vfs, const std::string& path, FileSys::Mode mode) { |
| @@ -308,6 +308,8 @@ void GMainWindow::InitializeHotkeys() { | |||
| 308 | Qt::ApplicationShortcut); | 308 | Qt::ApplicationShortcut); |
| 309 | hotkey_registry.RegisterHotkey("Main Window", "Decrease Speed Limit", QKeySequence("-"), | 309 | hotkey_registry.RegisterHotkey("Main Window", "Decrease Speed Limit", QKeySequence("-"), |
| 310 | Qt::ApplicationShortcut); | 310 | Qt::ApplicationShortcut); |
| 311 | hotkey_registry.RegisterHotkey("Main Window", "Load Amiibo", QKeySequence(Qt::Key_F2), | ||
| 312 | Qt::ApplicationShortcut); | ||
| 311 | hotkey_registry.LoadHotkeys(); | 313 | hotkey_registry.LoadHotkeys(); |
| 312 | 314 | ||
| 313 | connect(hotkey_registry.GetHotkey("Main Window", "Load File", this), &QShortcut::activated, | 315 | connect(hotkey_registry.GetHotkey("Main Window", "Load File", this), &QShortcut::activated, |
| @@ -361,6 +363,12 @@ void GMainWindow::InitializeHotkeys() { | |||
| 361 | UpdateStatusBar(); | 363 | UpdateStatusBar(); |
| 362 | } | 364 | } |
| 363 | }); | 365 | }); |
| 366 | connect(hotkey_registry.GetHotkey("Main Window", "Load Amiibo", this), &QShortcut::activated, | ||
| 367 | this, [&] { | ||
| 368 | if (ui.action_Load_Amiibo->isEnabled()) { | ||
| 369 | OnLoadAmiibo(); | ||
| 370 | } | ||
| 371 | }); | ||
| 364 | } | 372 | } |
| 365 | 373 | ||
| 366 | void GMainWindow::SetDefaultUIGeometry() { | 374 | void GMainWindow::SetDefaultUIGeometry() { |