mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-11 21:30:05 +00: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:
parent
0a5621fafc
commit
cb1825a769
8 changed files with 177 additions and 136 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <QMainWindow>
|
||||
#include <QTimer>
|
||||
#include <QTranslator>
|
||||
#include "citra_qt/hotkeys.h"
|
||||
#include "common/announce_multiplayer_room.h"
|
||||
#include "core/core.h"
|
||||
#include "core/hle/service/am/am.h"
|
||||
|
@ -237,6 +238,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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue