diff options
author | Mai <mai.iam2048@gmail.com> | 2023-02-17 04:58:29 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-17 04:58:29 +0100 |
commit | 61b1772e510523813b0642b51113135148e0ce5a (patch) | |
tree | 807562743402b5348e5a14c1da522dac2d9b0fd6 | |
parent | Merge pull request #9802 from Kelebek1/wait_data_cache (diff) | |
parent | yuzu: Shutdown game on restart to reload per game config (diff) | |
download | yuzu-61b1772e510523813b0642b51113135148e0ce5a.tar yuzu-61b1772e510523813b0642b51113135148e0ce5a.tar.gz yuzu-61b1772e510523813b0642b51113135148e0ce5a.tar.bz2 yuzu-61b1772e510523813b0642b51113135148e0ce5a.tar.lz yuzu-61b1772e510523813b0642b51113135148e0ce5a.tar.xz yuzu-61b1772e510523813b0642b51113135148e0ce5a.tar.zst yuzu-61b1772e510523813b0642b51113135148e0ce5a.zip |
-rw-r--r-- | src/yuzu/configuration/config.cpp | 1 | ||||
-rw-r--r-- | src/yuzu/game_list.cpp | 1 | ||||
-rw-r--r-- | src/yuzu/game_list.h | 1 | ||||
-rw-r--r-- | src/yuzu/main.cpp | 10 |
4 files changed, 11 insertions, 2 deletions
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 31209fb2e..db68ed259 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp @@ -1103,6 +1103,7 @@ void Config::SaveValues() { SaveRendererValues(); SaveAudioValues(); SaveSystemValues(); + qt_config->sync(); } void Config::SaveAudioValues() { diff --git a/src/yuzu/game_list.cpp b/src/yuzu/game_list.cpp index 22aa19c56..c21828b1d 100644 --- a/src/yuzu/game_list.cpp +++ b/src/yuzu/game_list.cpp @@ -870,6 +870,7 @@ void GameList::ToggleFavorite(u64 program_id) { tree_view->setRowHidden(0, item_model->invisibleRootItem()->index(), true); } } + SaveConfig(); } void GameList::AddFavorite(u64 program_id) { diff --git a/src/yuzu/game_list.h b/src/yuzu/game_list.h index f7ff93ed9..64e5af4c1 100644 --- a/src/yuzu/game_list.h +++ b/src/yuzu/game_list.h @@ -122,6 +122,7 @@ signals: void AddDirectory(); void ShowList(bool show); void PopulatingCompleted(); + void SaveConfig(); private slots: void OnItemExpanded(const QModelIndex& item); diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index a1c18ff90..5560a30bd 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) { @@ -3015,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() { @@ -3380,6 +3385,7 @@ void GMainWindow::OnConfigureTas() { return; } else if (result == QDialog::Accepted) { dialog.ApplyConfiguration(); + OnSaveConfig(); } } |