From df9c8bdfd9019a42ede7ea90198567ae499afac8 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Thu, 16 Feb 2023 10:53:42 -0600 Subject: yuzu: Write to config file on important config changes --- src/yuzu/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index a1c18ff90..c2542c3ba 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -1271,6 +1271,7 @@ void GMainWindow::ConnectWidgetEvents() { connect(game_list, &GameList::ShowList, this, &GMainWindow::OnGameListShowList); connect(game_list, &GameList::PopulatingCompleted, [this] { multiplayer_state->UpdateGameList(game_list->GetModel()); }); + connect(game_list, &GameList::SaveConfig, this, &GMainWindow::OnSaveConfig); connect(game_list, &GameList::OpenPerGameGeneralRequested, this, &GMainWindow::OnGameListOpenPerGameProperties); @@ -2654,6 +2655,8 @@ void GMainWindow::OnGameListAddDirectory() { } else { LOG_WARNING(Frontend, "Selected directory is already in the game list"); } + + OnSaveConfig(); } void GMainWindow::OnGameListShowList(bool show) { @@ -3380,6 +3383,7 @@ void GMainWindow::OnConfigureTas() { return; } else if (result == QDialog::Accepted) { dialog.ApplyConfiguration(); + OnSaveConfig(); } } -- cgit v1.2.3 From 0a88c7dbbe627583b307933169c07bcd10bc18e1 Mon Sep 17 00:00:00 2001 From: Narr the Reg Date: Thu, 16 Feb 2023 21:16:28 -0600 Subject: yuzu: Shutdown game on restart to reload per game config --- src/yuzu/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/yuzu/main.cpp') diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index c2542c3ba..5560a30bd 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp @@ -3018,8 +3018,10 @@ void GMainWindow::OnRestartGame() { if (!system->IsPoweredOn()) { return; } - // Make a copy since BootGame edits game_path - BootGame(QString(current_game_path)); + // Make a copy since ShutdownGame edits game_path + const auto current_game = QString(current_game_path); + ShutdownGame(); + BootGame(current_game); } void GMainWindow::OnPauseGame() { -- cgit v1.2.3