diff --git a/src/citra_qt/main.cpp b/src/citra_qt/main.cpp index 2ba8030504..c8639f6160 100644 --- a/src/citra_qt/main.cpp +++ b/src/citra_qt/main.cpp @@ -1013,6 +1013,11 @@ void GMainWindow::BootGame(const QString& filename) { Core::Movie::GetInstance().PrepareForRecording(); } + // Save configurations + UpdateUISettings(); + game_list->SaveInterfaceLayout(); + config->Save(); + if (!LoadROM(filename)) return; @@ -2186,22 +2191,7 @@ void GMainWindow::closeEvent(QCloseEvent* event) { return; } - if (!ui->action_Fullscreen->isChecked()) { - UISettings::values.geometry = saveGeometry(); - UISettings::values.renderwindow_geometry = render_window->saveGeometry(); - } - UISettings::values.state = saveState(); -#if MICROPROFILE_ENABLED - UISettings::values.microprofile_geometry = microProfileDialog->saveGeometry(); - UISettings::values.microprofile_visible = microProfileDialog->isVisible(); -#endif - UISettings::values.single_window_mode = ui->action_Single_Window_Mode->isChecked(); - UISettings::values.fullscreen = ui->action_Fullscreen->isChecked(); - UISettings::values.display_titlebar = ui->action_Display_Dock_Widget_Headers->isChecked(); - UISettings::values.show_filter_bar = ui->action_Show_Filter_Bar->isChecked(); - UISettings::values.show_status_bar = ui->action_Show_Status_Bar->isChecked(); - UISettings::values.first_start = false; - + UpdateUISettings(); game_list->SaveInterfaceLayout(); hotkey_registry.SaveHotkeys(); @@ -2370,6 +2360,24 @@ void GMainWindow::UpdateWindowTitle() { } } +void GMainWindow::UpdateUISettings() { + if (!ui->action_Fullscreen->isChecked()) { + UISettings::values.geometry = saveGeometry(); + UISettings::values.renderwindow_geometry = render_window->saveGeometry(); + } + UISettings::values.state = saveState(); +#if MICROPROFILE_ENABLED + UISettings::values.microprofile_geometry = microProfileDialog->saveGeometry(); + UISettings::values.microprofile_visible = microProfileDialog->isVisible(); +#endif + UISettings::values.single_window_mode = ui->action_Single_Window_Mode->isChecked(); + UISettings::values.fullscreen = ui->action_Fullscreen->isChecked(); + UISettings::values.display_titlebar = ui->action_Display_Dock_Widget_Headers->isChecked(); + UISettings::values.show_filter_bar = ui->action_Show_Filter_Bar->isChecked(); + UISettings::values.show_status_bar = ui->action_Show_Status_Bar->isChecked(); + UISettings::values.first_start = false; +} + void GMainWindow::SyncMenuUISettings() { ui->action_Screen_Layout_Default->setChecked(Settings::values.layout_option == Settings::LayoutOption::Default); diff --git a/src/citra_qt/main.h b/src/citra_qt/main.h index a570878b8a..241365a38b 100644 --- a/src/citra_qt/main.h +++ b/src/citra_qt/main.h @@ -229,6 +229,7 @@ private: void UpdateStatusBar(); void LoadTranslation(); void UpdateWindowTitle(); + void UpdateUISettings(); void RetranslateStatusBar(); void InstallCIA(QStringList filepaths); void HideMouseCursor();