From 2ab24bbf2879ca39eb4a6bea7b31cc5cd69f8e59 Mon Sep 17 00:00:00 2001 From: KamFretoZ <14798312+kamfretoz@users.noreply.github.com> Date: Thu, 3 Oct 2024 14:28:50 +0700 Subject: [PATCH] Qt: Move savestate related options to its new home --- pcsx2-qt/Settings/AdvancedSettingsWidget.cpp | 11 ++ pcsx2-qt/Settings/AdvancedSettingsWidget.ui | 162 ++++++++++-------- pcsx2-qt/Settings/InterfaceSettingsWidget.cpp | 8 - pcsx2-qt/Settings/InterfaceSettingsWidget.ui | 48 ++---- 4 files changed, 116 insertions(+), 113 deletions(-) diff --git a/pcsx2-qt/Settings/AdvancedSettingsWidget.cpp b/pcsx2-qt/Settings/AdvancedSettingsWidget.cpp index eaa6f6ac480aa..75ca121bc9398 100644 --- a/pcsx2-qt/Settings/AdvancedSettingsWidget.cpp +++ b/pcsx2-qt/Settings/AdvancedSettingsWidget.cpp @@ -65,6 +65,9 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* connect(m_ui.savestateCompressionMethod, QOverload::of(&QComboBox::currentIndexChanged), this, &AdvancedSettingsWidget::onSavestateCompressionTypeChanged); + SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.backupSaveStates, "EmuCore", "BackupSavestate", true); + SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveStateOnShutdown, "EmuCore", "SaveStateOnShutdown", false); + SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pineEnable, "EmuCore", "EnablePINE", false); SettingWidgetBinder::BindWidgetToIntSetting(sif, m_ui.pineSlot, "EmuCore", "PINESlot", 28011); @@ -138,6 +141,14 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(SettingsWindow* dialog, QWidget* dialog->registerWidgetHelp(m_ui.savestateCompressionLevel, tr("Savestate Compression Level"), tr("Medium"), tr("Determines the level to be used when compressing savestates.")); + + dialog->registerWidgetHelp(m_ui.saveStateOnShutdown, tr("Save State On Shutdown"), tr("Unchecked"), + tr("Automatically saves the emulator state when powering down or exiting. You can then " + "resume directly from where you left off next time.")); + + dialog->registerWidgetHelp(m_ui.backupSaveStates, tr("Create Save State Backups"), tr("Checked"), + //: Do not translate the ".backup" extension. + tr("Creates a backup copy of a save state if it already exists when the save is created. The backup copy has a .backup suffix.")); } AdvancedSettingsWidget::~AdvancedSettingsWidget() = default; diff --git a/pcsx2-qt/Settings/AdvancedSettingsWidget.ui b/pcsx2-qt/Settings/AdvancedSettingsWidget.ui index 7a8c20a165bb7..054730063b189 100644 --- a/pcsx2-qt/Settings/AdvancedSettingsWidget.ui +++ b/pcsx2-qt/Settings/AdvancedSettingsWidget.ui @@ -7,7 +7,7 @@ 0 0 809 - 725 + 602 @@ -32,9 +32,9 @@ 0 - -272 + 0 790 - 997 + 1023 @@ -416,6 +416,91 @@ + + + + Savestate Settings + + + + + + Compression Method: + + + + + + + + Low (Fast) + + + + + Medium (Recommended) + + + + + High + + + + + Very High (Slow, Not Recommended) + + + + + + + + + Uncompressed + + + + + Deflate64 + + + + + Zstandard + + + + + LZMA2 + + + + + + + + Compression Level: + + + + + + + Create Save State Backups + + + + + + + Save State On Shutdown + + + + + + @@ -471,77 +556,6 @@ - - - - Savestate Settings - - - - - - Compression Level: - - - - - - - Compression Method: - - - - - - - - Uncompressed - - - - - Deflate64 - - - - - Zstandard - - - - - LZMA2 - - - - - - - - - Low (Fast) - - - - - Medium (Recommended) - - - - - High - - - - - Very High (Slow, Not Recommended) - - - - - - - diff --git a/pcsx2-qt/Settings/InterfaceSettingsWidget.cpp b/pcsx2-qt/Settings/InterfaceSettingsWidget.cpp index ca72a8cd13b64..ff2e59041777b 100644 --- a/pcsx2-qt/Settings/InterfaceSettingsWidget.cpp +++ b/pcsx2-qt/Settings/InterfaceSettingsWidget.cpp @@ -76,10 +76,8 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.inhibitScreensaver, "EmuCore", "InhibitScreensaver", true); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.confirmShutdown, "UI", "ConfirmShutdown", true); - SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.saveStateOnShutdown, "EmuCore", "SaveStateOnShutdown", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pauseOnFocusLoss, "UI", "PauseOnFocusLoss", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.pauseOnControllerDisconnection, "UI", "PauseOnControllerDisconnection", false); - SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.backupSaveStates, "EmuCore", "BackupSavestate", true); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.discordPresence, "EmuCore", "EnableDiscordPresence", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.startFullscreen, "UI", "StartFullscreen", false); @@ -143,9 +141,6 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget m_ui.confirmShutdown, tr("Confirm Shutdown"), tr("Checked"), tr("Determines whether a prompt will be displayed to confirm shutting down the virtual machine " "when the hotkey is pressed.")); - dialog->registerWidgetHelp(m_ui.saveStateOnShutdown, tr("Save State On Shutdown"), tr("Unchecked"), - tr("Automatically saves the emulator state when powering down or exiting. You can then " - "resume directly from where you left off next time.")); dialog->registerWidgetHelp(m_ui.pauseOnStart, tr("Pause On Start"), tr("Unchecked"), tr("Pauses the emulator when a game is started.")); dialog->registerWidgetHelp(m_ui.pauseOnFocusLoss, tr("Pause On Focus Loss"), tr("Unchecked"), @@ -153,9 +148,6 @@ InterfaceSettingsWidget::InterfaceSettingsWidget(SettingsWindow* dialog, QWidget "and unpauses when you switch back.")); dialog->registerWidgetHelp(m_ui.pauseOnControllerDisconnection, tr("Pause On Controller Disconnection"), tr("Unchecked"), tr("Pauses the emulator when a controller with bindings is disconnected.")); - dialog->registerWidgetHelp(m_ui.backupSaveStates, tr("Create Save State Backups"), tr("Checked"), - //: Do not translate the ".backup" extension. - tr("Creates a backup copy of a save state if it already exists when the save is created. The backup copy has a .backup suffix.")); dialog->registerWidgetHelp(m_ui.startFullscreen, tr("Start Fullscreen"), tr("Unchecked"), tr("Automatically switches to fullscreen mode when a game is started.")); dialog->registerWidgetHelp(m_ui.hideMouseCursor, tr("Hide Cursor In Fullscreen"), tr("Unchecked"), diff --git a/pcsx2-qt/Settings/InterfaceSettingsWidget.ui b/pcsx2-qt/Settings/InterfaceSettingsWidget.ui index f59ba668ae558..f42b72f094890 100644 --- a/pcsx2-qt/Settings/InterfaceSettingsWidget.ui +++ b/pcsx2-qt/Settings/InterfaceSettingsWidget.ui @@ -7,7 +7,7 @@ 0 0 698 - 494 + 512 @@ -24,18 +24,11 @@ 0 - + Behaviour - - - - Save State On Shutdown - - - @@ -50,17 +43,17 @@ - - + + - Pause On Start + Enable Discord Presence - - + + - Pause On Focus Loss + Pause On Start @@ -71,17 +64,10 @@ - - - - Enable Discord Presence - - - - - + + - Create Save State Backups + Pause On Focus Loss @@ -89,7 +75,7 @@ - + Game Display @@ -146,7 +132,7 @@ - + Language: @@ -156,7 +142,7 @@ - + Theme: @@ -182,14 +168,14 @@ - + Update Channel: - + Current Version: @@ -199,7 +185,7 @@ - +