From df7dd5d36a4e817c1c555a869a2752d61f4318e6 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Sat, 9 Sep 2023 13:33:43 -0500 Subject: [PATCH] Config: Expose GFX_OVERLAY_PROJ_STATS setting in UI. --- Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp | 9 ++++++++- Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h | 1 + Source/Core/VideoCommon/Statistics.cpp | 1 - 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp index bad83a6947..0d93614021 100644 --- a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp +++ b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.cpp @@ -86,6 +86,8 @@ void AdvancedWidget::CreateWidgets() m_enable_wireframe = new ConfigBool(tr("Enable Wireframe"), Config::GFX_ENABLE_WIREFRAME); m_show_statistics = new ConfigBool(tr("Show Statistics"), Config::GFX_OVERLAY_STATS); + m_show_proj_statistics = + new ConfigBool(tr("Show Projection Statistics"), Config::GFX_OVERLAY_PROJ_STATS); m_enable_format_overlay = new ConfigBool(tr("Texture Format Overlay"), Config::GFX_TEXFMT_OVERLAY_ENABLE); m_enable_api_validation = @@ -94,7 +96,8 @@ void AdvancedWidget::CreateWidgets() 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_enable_api_validation, 1, 1); + debugging_layout->addWidget(m_show_proj_statistics, 1, 1); + debugging_layout->addWidget(m_enable_api_validation, 2, 0); // Utility auto* utility_box = new QGroupBox(tr("Utility")); @@ -299,6 +302,9 @@ void AdvancedWidget::AddDescriptions() 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 " @@ -436,6 +442,7 @@ void AdvancedWidget::AddDescriptions() 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)); diff --git a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h index 6cd0e18fdb..da7504955c 100644 --- a/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h +++ b/Source/Core/DolphinQt/Config/Graphics/AdvancedWidget.h @@ -33,6 +33,7 @@ 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; diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 6e6dedfc62..378bffcd2a 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -120,7 +120,6 @@ void Statistics::Display() const ImGui::End(); } -// Is this really needed? void Statistics::DisplayProj() const { if (!ImGui::Begin("Projection Statistics", nullptr, ImGuiWindowFlags_NoNavInputs))