mirror of
https://git.suyu.dev/suyu/suyu
synced 2024-12-26 19:32:40 -06:00
yuzu: Write to config file on important config changes
This commit is contained in:
parent
6d77de96da
commit
df9c8bdfd9
4 changed files with 7 additions and 0 deletions
|
@ -1103,6 +1103,7 @@ void Config::SaveValues() {
|
|||
SaveRendererValues();
|
||||
SaveAudioValues();
|
||||
SaveSystemValues();
|
||||
qt_config->sync();
|
||||
}
|
||||
|
||||
void Config::SaveAudioValues() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -122,6 +122,7 @@ signals:
|
|||
void AddDirectory();
|
||||
void ShowList(bool show);
|
||||
void PopulatingCompleted();
|
||||
void SaveConfig();
|
||||
|
||||
private slots:
|
||||
void OnItemExpanded(const QModelIndex& item);
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue