configuration: boot a game using per-game settings
Swaps values where needed to boot a game.
This commit is contained in:
@@ -30,9 +30,7 @@ ConfigureDialog::ConfigureDialog(QWidget* parent, HotkeyRegistry& registry)
|
||||
ui->selectorList->setCurrentRow(0);
|
||||
}
|
||||
|
||||
ConfigureDialog::~ConfigureDialog() {
|
||||
Settings::CopyValues(Settings::game_values, Settings::global_values);
|
||||
}
|
||||
ConfigureDialog::~ConfigureDialog() = default;
|
||||
|
||||
void ConfigureDialog::SetConfiguration() {}
|
||||
|
||||
|
||||
@@ -1039,6 +1039,13 @@ void GMainWindow::BootGame(const QString& filename) {
|
||||
LOG_INFO(Frontend, "yuzu starting...");
|
||||
StoreRecentFile(filename); // Put the filename on top of the list
|
||||
|
||||
// Swap settings to use game configuration if need be
|
||||
Settings::SwapValues(Settings::ValuesSwapTarget::ToGame);
|
||||
Config per_game_config(filename.toUtf8().constData(), false);
|
||||
if (Settings::game_values.use_global_values) {
|
||||
Settings::SwapValues(Settings::ValuesSwapTarget::ToGlobal);
|
||||
}
|
||||
|
||||
if (UISettings::values.select_user_on_boot) {
|
||||
SelectAndSetCurrentUser();
|
||||
}
|
||||
@@ -1818,6 +1825,8 @@ void GMainWindow::OnStopGame() {
|
||||
return;
|
||||
}
|
||||
|
||||
Settings::SwapValues(Settings::ValuesSwapTarget::ToGlobal);
|
||||
|
||||
ShutdownGame();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user