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);
|
ui->selectorList->setCurrentRow(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConfigureDialog::~ConfigureDialog() {
|
ConfigureDialog::~ConfigureDialog() = default;
|
||||||
Settings::CopyValues(Settings::game_values, Settings::global_values);
|
|
||||||
}
|
|
||||||
|
|
||||||
void ConfigureDialog::SetConfiguration() {}
|
void ConfigureDialog::SetConfiguration() {}
|
||||||
|
|
||||||
|
|||||||
@@ -1039,6 +1039,13 @@ void GMainWindow::BootGame(const QString& filename) {
|
|||||||
LOG_INFO(Frontend, "yuzu starting...");
|
LOG_INFO(Frontend, "yuzu starting...");
|
||||||
StoreRecentFile(filename); // Put the filename on top of the list
|
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) {
|
if (UISettings::values.select_user_on_boot) {
|
||||||
SelectAndSetCurrentUser();
|
SelectAndSetCurrentUser();
|
||||||
}
|
}
|
||||||
@@ -1818,6 +1825,8 @@ void GMainWindow::OnStopGame() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Settings::SwapValues(Settings::ValuesSwapTarget::ToGlobal);
|
||||||
|
|
||||||
ShutdownGame();
|
ShutdownGame();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user