Qt: Rename 'Disable All Enhancements' to 'Safe Mode'

And move it to the bottom of the dialog.
This commit is contained in:
Stenzek 2024-09-26 21:53:22 +10:00
parent 29da7f7211
commit df8e950e6e
No known key found for this signature in database
6 changed files with 39 additions and 39 deletions

View File

@ -3310,13 +3310,13 @@ void FullscreenUI::DrawConsoleSettingsPage()
DrawEnumSetting(bsi, FSUI_ICONSTR(ICON_FA_GLOBE, "Region"), FSUI_CSTR("Determines the emulated hardware type."), DrawEnumSetting(bsi, FSUI_ICONSTR(ICON_FA_GLOBE, "Region"), FSUI_CSTR("Determines the emulated hardware type."),
"Console", "Region", Settings::DEFAULT_CONSOLE_REGION, &Settings::ParseConsoleRegionName, "Console", "Region", Settings::DEFAULT_CONSOLE_REGION, &Settings::ParseConsoleRegionName,
&Settings::GetConsoleRegionName, &Settings::GetConsoleRegionDisplayName, ConsoleRegion::Count); &Settings::GetConsoleRegionName, &Settings::GetConsoleRegionDisplayName, ConsoleRegion::Count);
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MAGIC, "Safe Mode"),
FSUI_CSTR("Temporarily disables all enhancements, useful when testing."), "Main",
"DisableAllEnhancements", false);
DrawToggleSetting( DrawToggleSetting(
bsi, FSUI_ICONSTR(ICON_FA_MEMORY, "Enable 8MB RAM"), bsi, FSUI_ICONSTR(ICON_FA_MEMORY, "Enable 8MB RAM"),
FSUI_CSTR("Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles."), FSUI_CSTR("Enables an additional 6MB of RAM to obtain a total of 2+6 = 8MB, usually present on dev consoles."),
"Console", "Enable8MBRAM", false); "Console", "Enable8MBRAM", false);
DrawToggleSetting(bsi, FSUI_ICONSTR(ICON_FA_MAGIC, "Disable All Enhancements"),
FSUI_CSTR("Temporarily disables all enhancements, useful when testing."), "Main",
"DisableAllEnhancements", false);
DrawToggleSetting( DrawToggleSetting(
bsi, FSUI_ICONSTR(ICON_FA_FROWN, "Enable Cheats"), bsi, FSUI_ICONSTR(ICON_FA_FROWN, "Enable Cheats"),
FSUI_CSTR("Automatically loads and applies cheats on game start. Cheats can break games and saves."), "Console", FSUI_CSTR("Automatically loads and applies cheats on game start. Cheats can break games and saves."), "Console",
@ -7336,7 +7336,6 @@ TRANSLATE_NOOP("FullscreenUI", "Determines the size of screenshots created by Du
TRANSLATE_NOOP("FullscreenUI", "Determines whether a prompt will be displayed to confirm shutting down the emulator/game when the hotkey is pressed."); TRANSLATE_NOOP("FullscreenUI", "Determines whether a prompt will be displayed to confirm shutting down the emulator/game when the hotkey is pressed.");
TRANSLATE_NOOP("FullscreenUI", "Determines which algorithm is used to convert interlaced frames to progressive for display on your system."); TRANSLATE_NOOP("FullscreenUI", "Determines which algorithm is used to convert interlaced frames to progressive for display on your system.");
TRANSLATE_NOOP("FullscreenUI", "Device Settings"); TRANSLATE_NOOP("FullscreenUI", "Device Settings");
TRANSLATE_NOOP("FullscreenUI", "Disable All Enhancements");
TRANSLATE_NOOP("FullscreenUI", "Disable Mailbox Presentation"); TRANSLATE_NOOP("FullscreenUI", "Disable Mailbox Presentation");
TRANSLATE_NOOP("FullscreenUI", "Disable Subdirectory Scanning"); TRANSLATE_NOOP("FullscreenUI", "Disable Subdirectory Scanning");
TRANSLATE_NOOP("FullscreenUI", "Disable on 2D Polygons"); TRANSLATE_NOOP("FullscreenUI", "Disable on 2D Polygons");
@ -7626,6 +7625,7 @@ TRANSLATE_NOOP("FullscreenUI", "Runahead/Rewind");
TRANSLATE_NOOP("FullscreenUI", "Runs the software renderer in parallel for VRAM readbacks. On some systems, this may result in greater performance."); TRANSLATE_NOOP("FullscreenUI", "Runs the software renderer in parallel for VRAM readbacks. On some systems, this may result in greater performance.");
TRANSLATE_NOOP("FullscreenUI", "SDL DualSense Player LED"); TRANSLATE_NOOP("FullscreenUI", "SDL DualSense Player LED");
TRANSLATE_NOOP("FullscreenUI", "SDL DualShock 4 / DualSense Enhanced Mode"); TRANSLATE_NOOP("FullscreenUI", "SDL DualShock 4 / DualSense Enhanced Mode");
TRANSLATE_NOOP("FullscreenUI", "Safe Mode");
TRANSLATE_NOOP("FullscreenUI", "Save Profile"); TRANSLATE_NOOP("FullscreenUI", "Save Profile");
TRANSLATE_NOOP("FullscreenUI", "Save Screenshot"); TRANSLATE_NOOP("FullscreenUI", "Save Screenshot");
TRANSLATE_NOOP("FullscreenUI", "Save State"); TRANSLATE_NOOP("FullscreenUI", "Save State");

View File

@ -4634,7 +4634,7 @@ void System::WarnAboutUnsafeSettings()
if (g_settings.disable_all_enhancements) if (g_settings.disable_all_enhancements)
{ {
append(ICON_EMOJI_WARNING, TRANSLATE_SV("System", "All enhancements are currently disabled.")); append(ICON_EMOJI_WARNING, TRANSLATE_SV("System", "Safe mode is enabled."));
if (ImGuiManager::IsShowingOSDMessages()) if (ImGuiManager::IsShowingOSDMessages())
{ {

View File

@ -44,8 +44,6 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(SettingsWindow* dialog, QWidget* pa
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.region, "Console", "Region", &Settings::ParseConsoleRegionName, SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.region, "Console", "Region", &Settings::ParseConsoleRegionName,
&Settings::GetConsoleRegionName, Settings::DEFAULT_CONSOLE_REGION); &Settings::GetConsoleRegionName, Settings::DEFAULT_CONSOLE_REGION);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enable8MBRAM, "Console", "Enable8MBRAM", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enable8MBRAM, "Console", "Enable8MBRAM", false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.disableAllEnhancements, "Main", "DisableAllEnhancements",
false);
SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableCheats, "Console", "EnableCheats", false); SettingWidgetBinder::BindWidgetToBoolSetting(sif, m_ui.enableCheats, "Console", "EnableCheats", false);
SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.cpuExecutionMode, "CPU", "ExecutionMode", SettingWidgetBinder::BindWidgetToEnumSetting(sif, m_ui.cpuExecutionMode, "CPU", "ExecutionMode",
&Settings::ParseCPUExecutionMode, &Settings::GetCPUExecutionModeName, &Settings::ParseCPUExecutionMode, &Settings::GetCPUExecutionModeName,
@ -89,9 +87,6 @@ ConsoleSettingsWidget::ConsoleSettingsWidget(SettingsWindow* dialog, QWidget* pa
"to use a larger heap size for " "to use a larger heap size for "
"this additional RAM to be usable. Titles which rely on memory mirrors may break, so it should only be used " "this additional RAM to be usable. Titles which rely on memory mirrors may break, so it should only be used "
"with compatible mods.")); "with compatible mods."));
dialog->registerWidgetHelp(m_ui.disableAllEnhancements, tr("Disable All Enhancements"), tr("Unchecked"),
tr("Disables all enhancement options, simulating the system as accurately as possible. "
"Use to quickly determine whether an enhancement is responsible for game bugs."));
dialog->registerWidgetHelp( dialog->registerWidgetHelp(
m_ui.cdromLoadImageToRAM, tr("Preload Image to RAM"), tr("Unchecked"), m_ui.cdromLoadImageToRAM, tr("Preload Image to RAM"), tr("Unchecked"),
tr("Loads the game image into RAM. Useful for network paths that may become unreliable during gameplay. In some " tr("Loads the game image into RAM. Useful for network paths that may become unreliable during gameplay. In some "

View File

@ -41,13 +41,6 @@
</item> </item>
<item row="1" column="0" colspan="2"> <item row="1" column="0" colspan="2">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QGridLayout" name="gridLayout_2">
<item row="0" column="1">
<widget class="QCheckBox" name="disableAllEnhancements">
<property name="text">
<string>Disable All Enhancements</string>
</property>
</widget>
</item>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QCheckBox" name="enable8MBRAM"> <widget class="QCheckBox" name="enable8MBRAM">
<property name="text"> <property name="text">
@ -55,7 +48,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="0" column="1">
<widget class="QCheckBox" name="enableCheats"> <widget class="QCheckBox" name="enableCheats">
<property name="text"> <property name="text">
<string>Enable Cheats</string> <string>Enable Cheats</string>
@ -97,7 +90,7 @@
<item> <item>
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Orientation::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
@ -113,7 +106,7 @@
<string>100% (effective 33.3mhz)</string> <string>100% (effective 33.3mhz)</string>
</property> </property>
<property name="alignment"> <property name="alignment">
<set>Qt::AlignCenter</set> <set>Qt::AlignmentFlag::AlignCenter</set>
</property> </property>
</widget> </widget>
</item> </item>
@ -131,10 +124,10 @@
<number>100</number> <number>100</number>
</property> </property>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Orientation::Horizontal</enum>
</property> </property>
<property name="tickPosition"> <property name="tickPosition">
<enum>QSlider::TicksBothSides</enum> <enum>QSlider::TickPosition::TicksBothSides</enum>
</property> </property>
<property name="tickInterval"> <property name="tickInterval">
<number>50</number> <number>50</number>
@ -330,7 +323,7 @@
<item> <item>
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Orientation::Vertical</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
@ -343,7 +336,7 @@
</layout> </layout>
</widget> </widget>
<resources> <resources>
<include location="resources/resources.qrc"/> <include location="resources/duckstation-qt.qrc"/>
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@ -2,12 +2,11 @@
// SPDX-License-Identifier: CC-BY-NC-ND-4.0 // SPDX-License-Identifier: CC-BY-NC-ND-4.0
#include "settingswindow.h" #include "settingswindow.h"
#include "achievementsettingswidget.h"
#include "advancedsettingswidget.h" #include "advancedsettingswidget.h"
#include "audiosettingswidget.h" #include "audiosettingswidget.h"
#include "biossettingswidget.h" #include "biossettingswidget.h"
#include "consolesettingswidget.h" #include "consolesettingswidget.h"
#include "achievementsettingswidget.h"
#include "emulationsettingswidget.h" #include "emulationsettingswidget.h"
#include "foldersettingswidget.h" #include "foldersettingswidget.h"
#include "gamelistsettingswidget.h" #include "gamelistsettingswidget.h"
@ -18,6 +17,7 @@
#include "memorycardsettingswidget.h" #include "memorycardsettingswidget.h"
#include "postprocessingsettingswidget.h" #include "postprocessingsettingswidget.h"
#include "qthost.h" #include "qthost.h"
#include "settingwidgetbinder.h"
#include "core/achievements.h" #include "core/achievements.h"
#include "core/host.h" #include "core/host.h"
@ -221,6 +221,11 @@ void SettingsWindow::connectUi()
connect(m_ui.copyGlobalSettings, &QPushButton::clicked, this, &SettingsWindow::onCopyGlobalSettingsClicked); connect(m_ui.copyGlobalSettings, &QPushButton::clicked, this, &SettingsWindow::onCopyGlobalSettingsClicked);
if (m_ui.clearGameSettings) if (m_ui.clearGameSettings)
connect(m_ui.clearGameSettings, &QPushButton::clicked, this, &SettingsWindow::onClearSettingsClicked); connect(m_ui.clearGameSettings, &QPushButton::clicked, this, &SettingsWindow::onClearSettingsClicked);
SettingWidgetBinder::BindWidgetToBoolSetting(m_sif.get(), m_ui.safeMode, "Main", "DisableAllEnhancements", false);
registerWidgetHelp(m_ui.safeMode, tr("Safe Mode"), tr("Unchecked"),
tr("Disables all enhancement options, simulating the system as accurately as possible. Use to "
"quickly determine whether an enhancement is responsible for game bugs."));
} }
void SettingsWindow::addWidget(QWidget* widget, QString title, QString icon, QString help_text) void SettingsWindow::addWidget(QWidget* widget, QString title, QString icon, QString help_text)

View File

@ -67,6 +67,26 @@
</item> </item>
<item row="2" column="0" colspan="2"> <item row="2" column="0" colspan="2">
<layout class="QHBoxLayout" name="footerLayout"> <layout class="QHBoxLayout" name="footerLayout">
<item>
<widget class="QCheckBox" name="safeMode">
<property name="text">
<string>Safe Mode</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QPushButton" name="restoreDefaults"> <widget class="QPushButton" name="restoreDefaults">
<property name="text"> <property name="text">
@ -88,19 +108,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Orientation::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item> <item>
<widget class="QPushButton" name="close"> <widget class="QPushButton" name="close">
<property name="text"> <property name="text">