VERY experimental Nintendo Switch 2 emulator
C++
Merge pull request #6361 from lat9nq/per-hb-cfg
bunnei56070f371a04
diff --cc src/yuzu/configuration/configure_per_game.cppindex d89f1ad4b8,007d93c779..7dfcf150c9--- a/src/yuzu/configuration/configure_per_game.cpp+++ b/src/yuzu/configuration/configure_per_game.cpp@@@ -4,14 -4,12 +4,15 @@@#include <algorithm>#include <memory>+ #include <string>#include <utility>+#include <QAbstractButton>#include <QCheckBox>+#include <QDialogButtonBox>#include <QHeaderView>#include <QMenu>+#include <QPushButton>#include <QStandardItemModel>#include <QString>#include <QTimer>diff --cc src/yuzu/main.cppindex 0f0e228b07,1d63ababb1..dd8dd32333--- a/src/yuzu/main.cpp+++ b/src/yuzu/main.cpp@@@ -2635,30 -2640,26 +2642,30 @@@ void GMainWindow::OpenPerGameConfiguratconst auto v_file = Core::GetGameFileFromPath(vfs, file_name);const auto& system = Core::System::GetInstance();- ConfigurePerGame dialog(this, title_id);+ ConfigurePerGame dialog(this, title_id, file_name);dialog.LoadFromFile(v_file);const auto result = dialog.exec();- if (result == QDialog::Accepted) {++ if (result != QDialog::Accepted && !UISettings::values.configuration_applied) {+ Settings::RestoreGlobalState(system.IsPoweredOn());+ return;+ } else if (result == QDialog::Accepted) {dialog.ApplyConfiguration();+ }- const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false);- if (reload) {- game_list->PopulateAsync(UISettings::values.game_dirs);- }+ const auto reload = UISettings::values.is_game_list_reload_pending.exchange(false);+ if (reload) {+ game_list->PopulateAsync(UISettings::values.game_dirs);+ }- // Do not cause the global config to write local settings into the config file- const bool is_powered_on = system.IsPoweredOn();- Settings::RestoreGlobalState(is_powered_on);+ // Do not cause the global config to write local settings into the config file+ const bool is_powered_on = system.IsPoweredOn();+ Settings::RestoreGlobalState(is_powered_on);- if (!is_powered_on) {- config->Save();- }- } else {- Settings::RestoreGlobalState(system.IsPoweredOn());+ UISettings::values.configuration_applied = false;++ if (!is_powered_on) {+ config->Save();}}