diff options
author | Lioncash <mathew1800@gmail.com> | 2018-08-07 00:43:07 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2018-08-07 02:28:17 -0400 |
commit | c8f6754417628d696f81513e34951193f8e5d023 (patch) | |
tree | 037e8f8951518b9080dbea9740f7173089eb475d /src/yuzu/configuration/configure_general.cpp | |
parent | 826b1394e85720b62938c5f7af4a876e203316af (diff) |
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.
Diffstat (limited to 'src/yuzu/configuration/configure_general.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_general.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index 04afc8724..d8caee1e8 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -35,6 +35,10 @@ void ConfigureGeneral::setConfiguration() { ui->use_docked_mode->setChecked(Settings::values.use_docked_mode); } +void ConfigureGeneral::PopulateHotkeyList(const HotkeyRegistry& registry) { + ui->widget->Populate(registry); +} + void ConfigureGeneral::applyConfiguration() { UISettings::values.gamedir_deepscan = ui->toggle_deepscan->isChecked(); UISettings::values.confirm_before_closing = ui->toggle_check_exit->isChecked(); |