mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-12-27 05:36:42 +00:00
citra-qt: Fixed reloading hotkeys on-the fly.
This commit is contained in:
parent
5fa25fcf13
commit
9615acb550
|
@ -26,8 +26,6 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, const HotkeyRegistry& registry
|
||||||
&ConfigureHotkeys::OnInputKeysChanged);
|
&ConfigureHotkeys::OnInputKeysChanged);
|
||||||
connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, ui->inputTab,
|
connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, ui->inputTab,
|
||||||
&ConfigureInput::OnHotkeysChanged);
|
&ConfigureInput::OnHotkeysChanged);
|
||||||
connect(ui->hotkeysTab, &ConfigureHotkeys::HotkeysChanged, this,
|
|
||||||
[this]() { emit UpdateHotkeys(); });
|
|
||||||
|
|
||||||
// Synchronise lists upon initialisation
|
// Synchronise lists upon initialisation
|
||||||
ui->inputTab->EmitInputKeysChanged();
|
ui->inputTab->EmitInputKeysChanged();
|
||||||
|
|
|
@ -29,7 +29,6 @@ private slots:
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void languageChanged(const QString& locale);
|
void languageChanged(const QString& locale);
|
||||||
void UpdateHotkeys();
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setConfiguration();
|
void setConfiguration();
|
||||||
|
|
|
@ -1319,8 +1319,6 @@ void GMainWindow::OnConfigure() {
|
||||||
ConfigureDialog configureDialog(this, hotkey_registry);
|
ConfigureDialog configureDialog(this, hotkey_registry);
|
||||||
connect(&configureDialog, &ConfigureDialog::languageChanged, this,
|
connect(&configureDialog, &ConfigureDialog::languageChanged, this,
|
||||||
&GMainWindow::OnLanguageChanged);
|
&GMainWindow::OnLanguageChanged);
|
||||||
connect(&configureDialog, &ConfigureDialog::UpdateHotkeys, this,
|
|
||||||
[this]() { InitializeHotkeys(); });
|
|
||||||
auto old_theme = UISettings::values.theme;
|
auto old_theme = UISettings::values.theme;
|
||||||
const int old_input_profile_index = Settings::values.current_input_profile_index;
|
const int old_input_profile_index = Settings::values.current_input_profile_index;
|
||||||
const auto old_input_profiles = Settings::values.input_profiles;
|
const auto old_input_profiles = Settings::values.input_profiles;
|
||||||
|
@ -1328,6 +1326,7 @@ void GMainWindow::OnConfigure() {
|
||||||
auto result = configureDialog.exec();
|
auto result = configureDialog.exec();
|
||||||
if (result == QDialog::Accepted) {
|
if (result == QDialog::Accepted) {
|
||||||
configureDialog.applyConfiguration(hotkey_registry);
|
configureDialog.applyConfiguration(hotkey_registry);
|
||||||
|
InitializeHotkeys();
|
||||||
if (UISettings::values.theme != old_theme)
|
if (UISettings::values.theme != old_theme)
|
||||||
UpdateUITheme();
|
UpdateUITheme();
|
||||||
if (UISettings::values.enable_discord_presence != old_discord_presence)
|
if (UISettings::values.enable_discord_presence != old_discord_presence)
|
||||||
|
|
Loading…
Reference in a new issue