From 9615acb5500355a00f73f008452459da97a81683 Mon Sep 17 00:00:00 2001 From: Adityarup Laha <30696515+adityaruplaha@users.noreply.github.com> Date: Fri, 16 Nov 2018 21:19:43 +0530 Subject: [PATCH] citra-qt: Fixed reloading hotkeys on-the fly. --- src/citra_qt/configuration/configure_dialog.cpp | 2 -- src/citra_qt/configuration/configure_dialog.h | 1 - src/citra_qt/main.cpp | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-) diff --git a/src/citra_qt/configuration/configure_dialog.cpp b/src/citra_qt/configuration/configure_dialog.cpp index a62082229..08c60ec8a 100644 --- a/src/citra_qt/configuration/configure_dialog.cpp +++ b/src/citra_qt/configuration/configure_dialog.cpp @@ -26,8 +26,6 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry &ConfigureHotkeys::OnInputKeysChanged); connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, ui->inputTab, &ConfigureInput::OnHotkeysChanged); - connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, this, - [this]() { emit UpdateHotkeys(); }); // Synchronise lists upon initialisation ui->inputTab->EmitInputKeysChanged(); diff --git a/src/citra_qt/configuration/configure_dialog.h b/src/citra_qt/configuration/configure_dialog.h index c10572692..40bc94e76 100644 --- a/src/citra_qt/configuration/configure_dialog.h +++ b/src/citra_qt/configuration/configure_dialog.h @@ -29,7 +29,6 @@ private slots: signals: void languageChanged(const QString& locale); - void UpdateHotkeys(); private: void setConfiguration(); diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index dff565b38..7da699b98 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -1319,8 +1319,6 @@ void GMainWindow::OnConfigure() { ConfigureDialog configureDialog(this, hotkey_registry); connect(&configureDialog, &ConfigureDialog::languageChanged, this, &GMainWindow::OnLanguageChanged); - connect(&configureDialog, &ConfigureDialog::UpdateHotkeys, this, - [this]() { InitializeHotkeys(); }); auto old_theme = UISettings::values.theme; const int old_input_profile_index = Settings::values.current_input_profile_index; const auto old_input_profiles = Settings::values.input_profiles; @@ -1328,6 +1326,7 @@ void GMainWindow::OnConfigure() { auto result = configureDialog.exec(); if (result == QDialog::Accepted) { configureDialog.applyConfiguration(hotkey_registry); + InitializeHotkeys(); if (UISettings::values.theme != old_theme) UpdateUITheme(); if (UISettings::values.enable_discord_presence != old_discord_presence)