diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/yuzu/main.cpp | 40 | ||||
| -rw-r--r-- | src/yuzu/main.h | 1 |
2 files changed, 25 insertions, 16 deletions
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 3461fa675..920789f6f 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -1106,6 +1106,11 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index) { | |||
| 1106 | 1106 | ||
| 1107 | ConfigureVibration::SetAllVibrationDevices(); | 1107 | ConfigureVibration::SetAllVibrationDevices(); |
| 1108 | 1108 | ||
| 1109 | // Save configurations | ||
| 1110 | UpdateUISettings(); | ||
| 1111 | game_list->SaveInterfaceLayout(); | ||
| 1112 | config->Save(); | ||
| 1113 | |||
| 1109 | Settings::LogSettings(); | 1114 | Settings::LogSettings(); |
| 1110 | 1115 | ||
| 1111 | if (UISettings::values.select_user_on_boot) { | 1116 | if (UISettings::values.select_user_on_boot) { |
| @@ -2521,6 +2526,24 @@ void GMainWindow::UpdateStatusButtons() { | |||
| 2521 | #endif | 2526 | #endif |
| 2522 | } | 2527 | } |
| 2523 | 2528 | ||
| 2529 | void GMainWindow::UpdateUISettings() { | ||
| 2530 | if (!ui.action_Fullscreen->isChecked()) { | ||
| 2531 | UISettings::values.geometry = saveGeometry(); | ||
| 2532 | UISettings::values.renderwindow_geometry = render_window->saveGeometry(); | ||
| 2533 | } | ||
| 2534 | UISettings::values.state = saveState(); | ||
| 2535 | #if MICROPROFILE_ENABLED | ||
| 2536 | UISettings::values.microprofile_geometry = microProfileDialog->saveGeometry(); | ||
| 2537 | UISettings::values.microprofile_visible = microProfileDialog->isVisible(); | ||
| 2538 | #endif | ||
| 2539 | UISettings::values.single_window_mode = ui.action_Single_Window_Mode->isChecked(); | ||
| 2540 | UISettings::values.fullscreen = ui.action_Fullscreen->isChecked(); | ||
| 2541 | UISettings::values.display_titlebar = ui.action_Display_Dock_Widget_Headers->isChecked(); | ||
| 2542 | UISettings::values.show_filter_bar = ui.action_Show_Filter_Bar->isChecked(); | ||
| 2543 | UISettings::values.show_status_bar = ui.action_Show_Status_Bar->isChecked(); | ||
| 2544 | UISettings::values.first_start = false; | ||
| 2545 | } | ||
| 2546 | |||
| 2524 | void GMainWindow::HideMouseCursor() { | 2547 | void GMainWindow::HideMouseCursor() { |
| 2525 | if (emu_thread == nullptr || UISettings::values.hide_mouse == false) { | 2548 | if (emu_thread == nullptr || UISettings::values.hide_mouse == false) { |
| 2526 | mouse_hide_timer.stop(); | 2549 | mouse_hide_timer.stop(); |
| @@ -2754,22 +2777,7 @@ void GMainWindow::closeEvent(QCloseEvent* event) { | |||
| 2754 | return; | 2777 | return; |
| 2755 | } | 2778 | } |
| 2756 | 2779 | ||
| 2757 | if (!ui.action_Fullscreen->isChecked()) { | 2780 | UpdateUISettings(); |
| 2758 | UISettings::values.geometry = saveGeometry(); | ||
| 2759 | UISettings::values.renderwindow_geometry = render_window->saveGeometry(); | ||
| 2760 | } | ||
| 2761 | UISettings::values.state = saveState(); | ||
| 2762 | #if MICROPROFILE_ENABLED | ||
| 2763 | UISettings::values.microprofile_geometry = microProfileDialog->saveGeometry(); | ||
| 2764 | UISettings::values.microprofile_visible = microProfileDialog->isVisible(); | ||
| 2765 | #endif | ||
| 2766 | UISettings::values.single_window_mode = ui.action_Single_Window_Mode->isChecked(); | ||
| 2767 | UISettings::values.fullscreen = ui.action_Fullscreen->isChecked(); | ||
| 2768 | UISettings::values.display_titlebar = ui.action_Display_Dock_Widget_Headers->isChecked(); | ||
| 2769 | UISettings::values.show_filter_bar = ui.action_Show_Filter_Bar->isChecked(); | ||
| 2770 | UISettings::values.show_status_bar = ui.action_Show_Status_Bar->isChecked(); | ||
| 2771 | UISettings::values.first_start = false; | ||
| 2772 | |||
| 2773 | game_list->SaveInterfaceLayout(); | 2781 | game_list->SaveInterfaceLayout(); |
| 2774 | hotkey_registry.SaveHotkeys(); | 2782 | hotkey_registry.SaveHotkeys(); |
| 2775 | 2783 | ||
diff --git a/src/yuzu/main.h b/src/yuzu/main.h index 6242341d1..6aeac1925 100644 --- a/src/yuzu/main.h +++ b/src/yuzu/main.h | |||
| @@ -257,6 +257,7 @@ private: | |||
| 257 | const std::string& title_version = {}); | 257 | const std::string& title_version = {}); |
| 258 | void UpdateStatusBar(); | 258 | void UpdateStatusBar(); |
| 259 | void UpdateStatusButtons(); | 259 | void UpdateStatusButtons(); |
| 260 | void UpdateUISettings(); | ||
| 260 | void HideMouseCursor(); | 261 | void HideMouseCursor(); |
| 261 | void ShowMouseCursor(); | 262 | void ShowMouseCursor(); |
| 262 | void OpenURL(const QUrl& url); | 263 | void OpenURL(const QUrl& url); |