mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-21 15:08:00 -05:00
qt/hotkey: Get rid of global hotkey map instance
Instead, we make a proper registry class and house it within the main window, then pass it to whatever needs access to the loaded hotkeys. This way, we avoid a global variable, and don't need to initialize a std::map instance before the program can do anything.
This commit is contained in:
@ -9,6 +9,7 @@
|
||||
#include <QTimer>
|
||||
#include "core/core.h"
|
||||
#include "ui_main.h"
|
||||
#include "yuzu/hotkeys.h"
|
||||
|
||||
class Config;
|
||||
class EmuThread;
|
||||
@ -172,6 +173,8 @@ private:
|
||||
// stores default icon theme search paths for the platform
|
||||
QStringList default_theme_paths;
|
||||
|
||||
HotkeyRegistry hotkey_registry;
|
||||
|
||||
protected:
|
||||
void dropEvent(QDropEvent* event) override;
|
||||
void dragEnterEvent(QDragEnterEvent* event) override;
|
||||
|
Reference in New Issue
Block a user