From fcb3d2fb0594f940c8325ee1e3284be053b3c8f3 Mon Sep 17 00:00:00 2001 From: TryTwo Date: Thu, 18 Sep 2025 17:17:51 -0700 Subject: [PATCH] Qt Setting Panes: Remove original location of options transferred to the OSD pane. --- .../Config/Graphics/AdvancedWidget.cpp | 106 ++---------------- .../Config/Graphics/AdvancedWidget.h | 10 -- .../Config/Graphics/GeneralWidget.cpp | 20 +--- .../DolphinQt/Config/Graphics/GeneralWidget.h | 3 +- .../Core/DolphinQt/Settings/InterfacePane.cpp | 25 ----- .../Core/DolphinQt/Settings/InterfacePane.h | 3 - 6 files changed, 13 insertions(+), 154 deletions(-) diff --git a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp index cfac1358b9..98089e6d3d 100644 --- a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp @@ -46,57 +46,25 @@ void AdvancedWidget::CreateWidgets() auto* main_layout = new QVBoxLayout; - // Performance - auto* performance_box = new QGroupBox(tr("Performance Statistics")); - auto* performance_layout = new QGridLayout(); - performance_box->setLayout(performance_layout); - - m_show_fps = new ConfigBool(tr("Show FPS"), Config::GFX_SHOW_FPS, m_game_layer); - m_show_ftimes = new ConfigBool(tr("Show Frame Times"), Config::GFX_SHOW_FTIMES, m_game_layer); - m_show_vps = new ConfigBool(tr("Show VPS"), Config::GFX_SHOW_VPS, m_game_layer); - m_show_vtimes = new ConfigBool(tr("Show VBlank Times"), Config::GFX_SHOW_VTIMES, m_game_layer); - m_show_graphs = - new ConfigBool(tr("Show Performance Graphs"), Config::GFX_SHOW_GRAPHS, m_game_layer); - m_show_speed = new ConfigBool(tr("Show % Speed"), Config::GFX_SHOW_SPEED, m_game_layer); - m_show_speed_colors = - new ConfigBool(tr("Show Speed Colors"), Config::GFX_SHOW_SPEED_COLORS, m_game_layer); - m_perf_samp_window = new ConfigInteger(0, 10000, Config::GFX_PERF_SAMP_WINDOW, m_game_layer, 100); - m_perf_samp_window->SetTitle(tr("Performance Sample Window (ms)")); - m_log_render_time = new ConfigBool(tr("Log Render Time to File"), - Config::GFX_LOG_RENDER_TIME_TO_FILE, m_game_layer); - - performance_layout->addWidget(m_show_fps, 0, 0); - performance_layout->addWidget(m_show_ftimes, 0, 1); - performance_layout->addWidget(m_show_vps, 1, 0); - performance_layout->addWidget(m_show_vtimes, 1, 1); - performance_layout->addWidget(m_show_speed, 2, 0); - performance_layout->addWidget(m_show_graphs, 2, 1); - performance_layout->addWidget(new QLabel(tr("Performance Sample Window (ms):")), 3, 0); - performance_layout->addWidget(m_perf_samp_window, 3, 1); - performance_layout->addWidget(m_log_render_time, 4, 0); - performance_layout->addWidget(m_show_speed_colors, 4, 1); - // Debugging auto* debugging_box = new QGroupBox(tr("Debugging")); auto* debugging_layout = new QGridLayout(); debugging_box->setLayout(debugging_layout); + m_log_render_time = new ConfigBool(tr("Log Render Time to File"), + Config::GFX_LOG_RENDER_TIME_TO_FILE, m_game_layer); + m_enable_wireframe = new ConfigBool(tr("Enable Wireframe"), Config::GFX_ENABLE_WIREFRAME, m_game_layer); - m_show_statistics = - new ConfigBool(tr("Show Statistics"), Config::GFX_OVERLAY_STATS, m_game_layer); - m_show_proj_statistics = new ConfigBool(tr("Show Projection Statistics"), - Config::GFX_OVERLAY_PROJ_STATS, m_game_layer); m_enable_format_overlay = new ConfigBool(tr("Texture Format Overlay"), Config::GFX_TEXFMT_OVERLAY_ENABLE, m_game_layer); m_enable_api_validation = new ConfigBool(tr("Enable API Validation Layers"), Config::GFX_ENABLE_VALIDATION_LAYER, m_game_layer); debugging_layout->addWidget(m_enable_wireframe, 0, 0); - debugging_layout->addWidget(m_show_statistics, 0, 1); - debugging_layout->addWidget(m_enable_format_overlay, 1, 0); - debugging_layout->addWidget(m_show_proj_statistics, 1, 1); - debugging_layout->addWidget(m_enable_api_validation, 2, 0); + debugging_layout->addWidget(m_enable_format_overlay, 0, 1); + debugging_layout->addWidget(m_enable_api_validation, 1, 0); + debugging_layout->addWidget(m_log_render_time, 1, 1); // Utility auto* utility_box = new QGroupBox(tr("Utility")); @@ -226,7 +194,6 @@ void AdvancedWidget::CreateWidgets() experimental_layout->addWidget(m_defer_efb_access_invalidation, 0, 0); experimental_layout->addWidget(m_manual_texture_sampling, 0, 1); - main_layout->addWidget(performance_box); main_layout->addWidget(debugging_box); main_layout->addWidget(utility_box); main_layout->addWidget(texture_dump_box); @@ -269,53 +236,9 @@ void AdvancedWidget::OnEmulationStateChanged(bool running) void AdvancedWidget::AddDescriptions() { - static const char TR_SHOW_FPS_DESCRIPTION[] = - QT_TR_NOOP("Shows the number of distinct frames rendered per second as a measure of " - "visual smoothness.

If unsure, leave this " - "unchecked."); - static const char TR_SHOW_FTIMES_DESCRIPTION[] = - QT_TR_NOOP("Shows the average time in ms between each distinct rendered frame alongside " - "the standard deviation.

If unsure, leave this " - "unchecked."); - static const char TR_SHOW_VPS_DESCRIPTION[] = - QT_TR_NOOP("Shows the number of frames rendered per second as a measure of " - "emulation speed.

If unsure, leave this " - "unchecked."); - static const char TR_SHOW_VTIMES_DESCRIPTION[] = - QT_TR_NOOP("Shows the average time in ms between each rendered frame alongside " - "the standard deviation.

If unsure, leave this " - "unchecked."); - static const char TR_SHOW_GRAPHS_DESCRIPTION[] = - QT_TR_NOOP("Shows frametime graph along with statistics as a representation of " - "emulation performance.

If unsure, leave this " - "unchecked."); - static const char TR_SHOW_SPEED_DESCRIPTION[] = - QT_TR_NOOP("Shows the % speed of emulation compared to full speed." - "

If unsure, leave this " - "unchecked."); - static const char TR_SHOW_SPEED_COLORS_DESCRIPTION[] = - QT_TR_NOOP("Changes the color of the FPS counter depending on emulation speed." - "

If unsure, leave this " - "checked."); - static const char TR_PERF_SAMP_WINDOW_DESCRIPTION[] = - QT_TR_NOOP("The amount of time the FPS and VPS counters will sample over." - "

The higher the value, the more stable the FPS/VPS counter will be, " - "but the slower it will be to update." - "

If unsure, leave this " - "at 1000ms."); - static const char TR_LOG_RENDERTIME_DESCRIPTION[] = QT_TR_NOOP( - "Logs the render time of every frame to User/Logs/render_time.txt.

Use this " - "feature to measure Dolphin's performance.

If " - "unsure, leave this unchecked."); static const char TR_WIREFRAME_DESCRIPTION[] = QT_TR_NOOP("Renders the scene as a wireframe.

If unsure, leave " "this unchecked."); - static const char TR_SHOW_STATS_DESCRIPTION[] = - QT_TR_NOOP("Shows various rendering statistics.

If unsure, " - "leave this unchecked."); - static const char TR_SHOW_PROJ_STATS_DESCRIPTION[] = - QT_TR_NOOP("Shows various projection statistics.

If unsure, " - "leave this unchecked."); static const char TR_TEXTURE_FORMAT_DESCRIPTION[] = QT_TR_NOOP("Modifies textures to show the format they're encoded in.

May require " "an emulation reset to apply.

If unsure, leave this " @@ -325,6 +248,10 @@ void AdvancedWidget::AddDescriptions() "debugging graphical issues. On the Vulkan and D3D backends, this also enables " "debug symbols for the compiled shaders.

If unsure, " "leave this unchecked."); + static const char TR_LOG_RENDERTIME_DESCRIPTION[] = QT_TR_NOOP( + "Logs the render time of every frame to User/Logs/render_time.txt.

Use this " + "feature to measure Dolphin's performance.

If " + "unsure, leave this unchecked."); static const char TR_DUMP_TEXTURE_DESCRIPTION[] = QT_TR_NOOP("Dumps decoded game textures based on the other flags to " "User/Dump/Textures/<game_id>/.

If unsure, leave " @@ -443,21 +370,10 @@ void AdvancedWidget::AddDescriptions() static const char IF_UNSURE_UNCHECKED[] = QT_TR_NOOP("If unsure, leave this unchecked."); - m_show_fps->SetDescription(tr(TR_SHOW_FPS_DESCRIPTION)); - m_show_ftimes->SetDescription(tr(TR_SHOW_FTIMES_DESCRIPTION)); - m_show_vps->SetDescription(tr(TR_SHOW_VPS_DESCRIPTION)); - m_show_vtimes->SetDescription(tr(TR_SHOW_VTIMES_DESCRIPTION)); - m_show_graphs->SetDescription(tr(TR_SHOW_GRAPHS_DESCRIPTION)); - m_show_speed->SetDescription(tr(TR_SHOW_SPEED_DESCRIPTION)); - m_log_render_time->SetDescription(tr(TR_LOG_RENDERTIME_DESCRIPTION)); - m_show_speed_colors->SetDescription(tr(TR_SHOW_SPEED_COLORS_DESCRIPTION)); - m_enable_wireframe->SetDescription(tr(TR_WIREFRAME_DESCRIPTION)); - m_show_statistics->SetDescription(tr(TR_SHOW_STATS_DESCRIPTION)); - m_show_proj_statistics->SetDescription(tr(TR_SHOW_PROJ_STATS_DESCRIPTION)); m_enable_format_overlay->SetDescription(tr(TR_TEXTURE_FORMAT_DESCRIPTION)); m_enable_api_validation->SetDescription(tr(TR_VALIDATION_LAYER_DESCRIPTION)); - m_perf_samp_window->SetDescription(tr(TR_PERF_SAMP_WINDOW_DESCRIPTION)); + m_log_render_time->SetDescription(tr(TR_LOG_RENDERTIME_DESCRIPTION)); m_dump_textures->SetDescription(tr(TR_DUMP_TEXTURE_DESCRIPTION)); m_dump_mip_textures->SetDescription(tr(TR_DUMP_MIP_TEXTURE_DESCRIPTION)); m_dump_base_textures->SetDescription(tr(TR_DUMP_BASE_TEXTURE_DESCRIPTION)); diff --git a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h index 73fb5c3943..96ed3acbab 100644 --- a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h +++ b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h @@ -30,18 +30,8 @@ private: // Debugging ConfigBool* m_enable_wireframe; - ConfigBool* m_show_statistics; - ConfigBool* m_show_proj_statistics; ConfigBool* m_enable_format_overlay; ConfigBool* m_enable_api_validation; - ConfigBool* m_show_fps; - ConfigBool* m_show_ftimes; - ConfigBool* m_show_vps; - ConfigBool* m_show_vtimes; - ConfigBool* m_show_graphs; - ConfigBool* m_show_speed; - ConfigBool* m_show_speed_colors; - ConfigInteger* m_perf_samp_window; ConfigBool* m_log_render_time; // Utility diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp index 0ffc29cda9..f6cef35a1a 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.cpp @@ -108,22 +108,15 @@ void GeneralWidget::CreateWidgets() auto* m_options_box = new QGroupBox(tr("Other")); auto* m_options_layout = new QGridLayout(); - m_show_ping = - new ConfigBool(tr("Show NetPlay Ping"), Config::GFX_SHOW_NETPLAY_PING, m_game_layer); m_autoadjust_window_size = new ConfigBool(tr("Auto-Adjust Window Size"), Config::MAIN_RENDER_WINDOW_AUTOSIZE, m_game_layer); - m_show_messages = - new ConfigBool(tr("Show NetPlay Messages"), Config::GFX_SHOW_NETPLAY_MESSAGES, m_game_layer); m_render_main_window = new ConfigBool(tr("Render to Main Window"), Config::MAIN_RENDER_TO_MAIN, m_game_layer); m_options_box->setLayout(m_options_layout); m_options_layout->addWidget(m_render_main_window, 0, 0); - m_options_layout->addWidget(m_autoadjust_window_size, 1, 0); - - m_options_layout->addWidget(m_show_messages, 0, 1); - m_options_layout->addWidget(m_show_ping, 1, 1); + m_options_layout->addWidget(m_autoadjust_window_size, 0, 1); // Other auto* shader_compilation_box = new QGroupBox(tr("Shader Compilation")); @@ -268,13 +261,6 @@ void GeneralWidget::AddDescriptions() "if emulation speed is below 100%.

If unsure, leave " "this " "unchecked."); - static const char TR_SHOW_NETPLAY_PING_DESCRIPTION[] = QT_TR_NOOP( - "Shows the player's maximum ping while playing on " - "NetPlay.

If unsure, leave this unchecked."); - static const char TR_SHOW_NETPLAY_MESSAGES_DESCRIPTION[] = - QT_TR_NOOP("Shows chat messages, buffer changes, and desync alerts " - "while playing NetPlay.

If unsure, leave " - "this unchecked."); static const char TR_SHADER_COMPILE_SPECIALIZED_DESCRIPTION[] = QT_TR_NOOP("Ubershaders are never used. Stuttering will occur during shader " "compilation, but GPU demands are low.

Recommended for low-end hardware. " @@ -320,12 +306,8 @@ void GeneralWidget::AddDescriptions() m_enable_fullscreen->SetDescription(tr(TR_FULLSCREEN_DESCRIPTION)); - m_show_ping->SetDescription(tr(TR_SHOW_NETPLAY_PING_DESCRIPTION)); - m_autoadjust_window_size->SetDescription(tr(TR_AUTOSIZE_DESCRIPTION)); - m_show_messages->SetDescription(tr(TR_SHOW_NETPLAY_MESSAGES_DESCRIPTION)); - m_render_main_window->SetDescription(tr(TR_RENDER_TO_MAINWINDOW_DESCRIPTION)); m_shader_compilation_mode[0]->SetDescription(tr(TR_SHADER_COMPILE_SPECIALIZED_DESCRIPTION)); diff --git a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h index e96b39d04e..50f7346daa 100644 --- a/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h +++ b/Source/Core/DolphinQt/Config/Graphics/GeneralWidget.h @@ -52,10 +52,9 @@ private: ConfigBool* m_enable_fullscreen; // Options - ConfigBool* m_show_ping; ConfigBool* m_autoadjust_window_size; - ConfigBool* m_show_messages; ConfigBool* m_render_main_window; + std::array m_shader_compilation_mode{}; ConfigBool* m_wait_for_shaders; int m_previous_backend = 0; diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.cpp b/Source/Core/DolphinQt/Settings/InterfacePane.cpp index eedca67385..2c97269483 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.cpp +++ b/Source/Core/DolphinQt/Settings/InterfacePane.cpp @@ -27,7 +27,6 @@ #include "DolphinQt/Config/ConfigControls/ConfigBool.h" #include "DolphinQt/Config/ConfigControls/ConfigChoice.h" -#include "DolphinQt/Config/ConfigControls/ConfigInteger.h" #include "DolphinQt/Config/ConfigControls/ConfigRadio.h" #include "DolphinQt/Config/ToolTipControls/ToolTipCheckBox.h" #include "DolphinQt/Config/ToolTipControls/ToolTipComboBox.h" @@ -197,16 +196,6 @@ void InterfacePane::CreateInGame() m_checkbox_confirm_on_stop = new ConfigBool(tr("Confirm on Stop"), Config::MAIN_CONFIRM_ON_STOP); m_checkbox_use_panic_handlers = new ConfigBool(tr("Use Panic Handlers"), Config::MAIN_USE_PANIC_HANDLERS); - m_checkbox_enable_osd = - new ConfigBool(tr("Show On-Screen Display Messages"), Config::MAIN_OSD_MESSAGES); - - m_osd_font_size = new ConfigInteger(12, 40, Config::MAIN_OSD_FONT_SIZE); - m_osd_font_size->setMinimumWidth(m_osd_font_size->sizeHint().width() * 2); - auto* font_size_layout = new QHBoxLayout; - font_size_layout->addWidget(new QLabel(tr("On-Screen Display Font Size: "))); - font_size_layout->addWidget(m_osd_font_size); - font_size_layout->addStretch(); - m_checkbox_show_active_title = new ConfigBool(tr("Show Active Title in Window Title"), Config::MAIN_SHOW_ACTIVE_TITLE); m_checkbox_pause_on_focus_lost = @@ -236,8 +225,6 @@ void InterfacePane::CreateInGame() groupbox_layout->addWidget(m_checkbox_top_window); groupbox_layout->addWidget(m_checkbox_confirm_on_stop); groupbox_layout->addWidget(m_checkbox_use_panic_handlers); - groupbox_layout->addWidget(m_checkbox_enable_osd); - groupbox_layout->addLayout(font_size_layout); groupbox_layout->addWidget(m_checkbox_show_active_title); groupbox_layout->addWidget(m_checkbox_pause_on_focus_lost); groupbox_layout->addWidget(mouse_groupbox); @@ -378,14 +365,6 @@ void InterfacePane::AddDescriptions() "present choices on how to proceed. With this option disabled, Dolphin will " "\"ignore\" all errors. Emulation will not be halted and you will not be notified." "

If unsure, leave this checked."); - static constexpr char TR_ENABLE_OSD_DESCRIPTION[] = - QT_TR_NOOP("Shows on-screen display messages over the render window. These messages " - "disappear after several seconds." - "

If unsure, leave this checked."); - static const char TR_OSD_FONT_SIZE_DESCRIPTION[] = - QT_TR_NOOP("Changes the font size of the On Screen Display. Affects features such as the FPS" - "display, TAS movie window, and netplay chat." - "

If unsure, leave this at 13."); static constexpr char TR_SHOW_ACTIVE_TITLE_DESCRIPTION[] = QT_TR_NOOP("Shows the active game title in the render window's title bar." "

If unsure, leave this checked."); @@ -433,10 +412,6 @@ void InterfacePane::AddDescriptions() m_checkbox_use_panic_handlers->SetDescription(tr(TR_USE_PANIC_HANDLERS_DESCRIPTION)); - m_checkbox_enable_osd->SetDescription(tr(TR_ENABLE_OSD_DESCRIPTION)); - - m_osd_font_size->SetDescription(tr(TR_OSD_FONT_SIZE_DESCRIPTION)); - m_checkbox_show_active_title->SetDescription(tr(TR_SHOW_ACTIVE_TITLE_DESCRIPTION)); m_checkbox_pause_on_focus_lost->SetDescription(tr(TR_PAUSE_ON_FOCUS_LOST_DESCRIPTION)); diff --git a/Source/Core/DolphinQt/Settings/InterfacePane.h b/Source/Core/DolphinQt/Settings/InterfacePane.h index 0a55f7ad0a..1f33e7659d 100644 --- a/Source/Core/DolphinQt/Settings/InterfacePane.h +++ b/Source/Core/DolphinQt/Settings/InterfacePane.h @@ -6,7 +6,6 @@ #include class ConfigBool; -class ConfigInteger; class ConfigRadioInt; class ConfigStringChoice; class QLabel; @@ -54,8 +53,6 @@ private: ConfigBool* m_checkbox_confirm_on_stop; ConfigBool* m_checkbox_use_panic_handlers; - ConfigBool* m_checkbox_enable_osd; - ConfigInteger* m_osd_font_size; ConfigBool* m_checkbox_show_active_title; ConfigBool* m_checkbox_pause_on_focus_lost; ConfigRadioInt* m_radio_cursor_visible_movement;