diff options
author | Lioncash <mathew1800@gmail.com> | 2019-05-26 00:39:23 -0400 |
---|---|---|
committer | Lioncash <mathew1800@gmail.com> | 2019-06-05 15:40:33 -0400 |
commit | e1d755bdda96fe8b25fc8be4181f48ca158679f1 (patch) | |
tree | fa967793555c54493be142d693d3bbb33e028910 /src/yuzu/main.cpp | |
parent | 1eb979221f6664938456cefdbd5c79b7e59e2b8c (diff) |
yuzu/configuration: Make function naming consistent
Diffstat (limited to 'src/yuzu/main.cpp')
-rw-r--r-- | src/yuzu/main.cpp | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c6526f8552..d2258a4871 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1294,10 +1294,10 @@ void GMainWindow::OnGameListOpenPerGameProperties(const std::string& file) { } ConfigurePerGameGeneral dialog(this, title_id); - dialog.loadFromFile(v_file); + dialog.LoadFromFile(v_file); auto result = dialog.exec(); if (result == QDialog::Accepted) { - dialog.applyConfiguration(); + dialog.ApplyConfiguration(); const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false); if (reload) { @@ -1688,26 +1688,31 @@ void GMainWindow::ToggleWindowMode() { } void GMainWindow::OnConfigure() { - ConfigureDialog configureDialog(this, hotkey_registry); - auto old_theme = UISettings::values.theme; + const auto old_theme = UISettings::values.theme; const bool old_discord_presence = UISettings::values.enable_discord_presence; - auto result = configureDialog.exec(); - if (result == QDialog::Accepted) { - configureDialog.applyConfiguration(); - InitializeHotkeys(); - if (UISettings::values.theme != old_theme) - UpdateUITheme(); - if (UISettings::values.enable_discord_presence != old_discord_presence) - SetDiscordEnabled(UISettings::values.enable_discord_presence); - const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false); - if (reload) { - game_list->PopulateAsync(UISettings::values.game_directory_path, - UISettings::values.game_directory_deepscan); - } + ConfigureDialog configure_dialog(this, hotkey_registry); + const auto result = configure_dialog.exec(); + if (result != QDialog::Accepted) { + return; + } - config->Save(); + configure_dialog.ApplyConfiguration(); + InitializeHotkeys(); + if (UISettings::values.theme != old_theme) { + UpdateUITheme(); + } + if (UISettings::values.enable_discord_presence != old_discord_presence) { + SetDiscordEnabled(UISettings::values.enable_discord_presence); + } + + const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false); + if (reload) { + game_list->PopulateAsync(UISettings::values.game_directory_path, + UISettings::values.game_directory_deepscan); } + + config->Save(); } void GMainWindow::OnLoadAmiibo() { |