From cc0cc6fbb91bdb70b2b8702846ee5495c020ed14 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin <stenzek@gmail.com> Date: Sun, 7 Feb 2021 03:27:48 +1000 Subject: [PATCH] Qt: Add disable all enhancements to debug menu --- src/duckstation-qt/advancedsettingswidget.cpp | 32 ++++++++----------- src/duckstation-qt/mainwindow.cpp | 2 ++ src/duckstation-qt/mainwindow.ui | 9 ++++++ 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/duckstation-qt/advancedsettingswidget.cpp b/src/duckstation-qt/advancedsettingswidget.cpp index 2d30c8208..691fe9816 100644 --- a/src/duckstation-qt/advancedsettingswidget.cpp +++ b/src/duckstation-qt/advancedsettingswidget.cpp @@ -195,25 +195,19 @@ AdvancedSettingsWidget::AdvancedSettingsWidget(QtHostInterface* host_interface, addBooleanTweakOption(m_host_interface, m_ui.tweakOptionTable, tr("Increase Timer Resolution"), "Main", "IncreaseTimerResolution", true); - - dialog->registerWidgetHelp( - m_ui.logLevel, tr("Log Level"), tr("Information"), - tr("Sets the verbosity of messages logged. Higher levels will log more messages.")); - dialog->registerWidgetHelp( - m_ui.logToConsole, tr("Log To System Console"), tr("User Preference"), - tr("Logs messages to the console window.")); - dialog->registerWidgetHelp( - m_ui.logToDebug, tr("Log To Debug Console"), tr("User Preference"), - tr("Logs messages to the debug console where supported.")); - dialog->registerWidgetHelp( - m_ui.logToWindow, tr("Log To Window"), tr("User Preference"), - tr("Logs messages to the window.")); - dialog->registerWidgetHelp( - m_ui.logToFile, tr("Log To File"), tr("User Preference"), - tr("Logs messages to duckstation.log in the user directory.")); - dialog->registerWidgetHelp( - m_ui.showDebugMenu, tr("Show Debug Menu"), tr("Unchecked"), - tr("Shows a debug menu bar with additional statistics and quick settings.")); + + dialog->registerWidgetHelp(m_ui.logLevel, tr("Log Level"), tr("Information"), + tr("Sets the verbosity of messages logged. Higher levels will log more messages.")); + dialog->registerWidgetHelp(m_ui.logToConsole, tr("Log To System Console"), tr("User Preference"), + tr("Logs messages to the console window.")); + dialog->registerWidgetHelp(m_ui.logToDebug, tr("Log To Debug Console"), tr("User Preference"), + tr("Logs messages to the debug console where supported.")); + dialog->registerWidgetHelp(m_ui.logToWindow, tr("Log To Window"), tr("User Preference"), + tr("Logs messages to the window.")); + dialog->registerWidgetHelp(m_ui.logToFile, tr("Log To File"), tr("User Preference"), + tr("Logs messages to duckstation.log in the user directory.")); + dialog->registerWidgetHelp(m_ui.showDebugMenu, tr("Show Debug Menu"), tr("Unchecked"), + tr("Shows a debug menu bar with additional statistics and quick settings.")); } AdvancedSettingsWidget::~AdvancedSettingsWidget() = default; diff --git a/src/duckstation-qt/mainwindow.cpp b/src/duckstation-qt/mainwindow.cpp index 22c1e5843..5617b49d3 100644 --- a/src/duckstation-qt/mainwindow.cpp +++ b/src/duckstation-qt/mainwindow.cpp @@ -1050,6 +1050,8 @@ void MainWindow::connectSignals() m_host_interface->populateSaveStateMenus(nullptr, m_ui.menuLoadState, m_ui.menuSaveState); + SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDisableAllEnhancements, "Main", + "DisableAllEnhancements"); SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionDisableInterlacing, "GPU", "DisableInterlacing"); SettingWidgetBinder::BindWidgetToBoolSetting(m_host_interface, m_ui.actionForceNTSCTimings, "GPU", diff --git a/src/duckstation-qt/mainwindow.ui b/src/duckstation-qt/mainwindow.ui index 1128386e9..552de3cdc 100644 --- a/src/duckstation-qt/mainwindow.ui +++ b/src/duckstation-qt/mainwindow.ui @@ -172,6 +172,7 @@ <addaction name="menuCPUExecutionMode"/> <addaction name="menuRenderer"/> <addaction name="menuCropMode"/> + <addaction name="actionDisableAllEnhancements"/> <addaction name="actionDisableInterlacing"/> <addaction name="actionForceNTSCTimings"/> <addaction name="separator"/> @@ -595,6 +596,14 @@ <string>Dump VRAM to CPU Copies</string> </property> </action> + <action name="actionDisableAllEnhancements"> + <property name="checkable"> + <bool>true</bool> + </property> + <property name="text"> + <string>Disable All Enhancements</string> + </property> + </action> <action name="actionDisableInterlacing"> <property name="checkable"> <bool>true</bool>