mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-26 17:40:05 +00:00
Merge pull request #1678 from FearlessTobi/amiibo-hotkeys
Port citra-emu/citra#4387: "yuzu: Add hotkey for Amiibo loading"
This commit is contained in:
commit
0072275d25
@ -12,7 +12,7 @@
|
|||||||
#include "core/file_sys/vfs_real.h"
|
#include "core/file_sys/vfs_real.h"
|
||||||
#include "core/hle/service/acc/profile_manager.h"
|
#include "core/hle/service/acc/profile_manager.h"
|
||||||
|
|
||||||
// These are wrappers to avoid the calls to CreateDirectory and CreateFile becuase of the Windows
|
// These are wrappers to avoid the calls to CreateDirectory and CreateFile because of the Windows
|
||||||
// defines.
|
// defines.
|
||||||
static FileSys::VirtualDir VfsFilesystemCreateDirectoryWrapper(
|
static FileSys::VirtualDir VfsFilesystemCreateDirectoryWrapper(
|
||||||
const FileSys::VirtualFilesystem& vfs, const std::string& path, FileSys::Mode mode) {
|
const FileSys::VirtualFilesystem& vfs, const std::string& path, FileSys::Mode mode) {
|
||||||
@ -308,6 +308,8 @@ void GMainWindow::InitializeHotkeys() {
|
|||||||
Qt::ApplicationShortcut);
|
Qt::ApplicationShortcut);
|
||||||
hotkey_registry.RegisterHotkey("Main Window", "Decrease Speed Limit", QKeySequence("-"),
|
hotkey_registry.RegisterHotkey("Main Window", "Decrease Speed Limit", QKeySequence("-"),
|
||||||
Qt::ApplicationShortcut);
|
Qt::ApplicationShortcut);
|
||||||
|
hotkey_registry.RegisterHotkey("Main Window", "Load Amiibo", QKeySequence(Qt::Key_F2),
|
||||||
|
Qt::ApplicationShortcut);
|
||||||
hotkey_registry.LoadHotkeys();
|
hotkey_registry.LoadHotkeys();
|
||||||
|
|
||||||
connect(hotkey_registry.GetHotkey("Main Window", "Load File", this), &QShortcut::activated,
|
connect(hotkey_registry.GetHotkey("Main Window", "Load File", this), &QShortcut::activated,
|
||||||
@ -361,6 +363,12 @@ void GMainWindow::InitializeHotkeys() {
|
|||||||
UpdateStatusBar();
|
UpdateStatusBar();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
connect(hotkey_registry.GetHotkey("Main Window", "Load Amiibo", this), &QShortcut::activated,
|
||||||
|
this, [&] {
|
||||||
|
if (ui.action_Load_Amiibo->isEnabled()) {
|
||||||
|
OnLoadAmiibo();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::SetDefaultUIGeometry() {
|
void GMainWindow::SetDefaultUIGeometry() {
|
||||||
|
Loading…
Reference in New Issue
Block a user