From e73ca9e052a9097e0fb91d105d1c8ce82ac8706a Mon Sep 17 00:00:00 2001 From: Stenzek Date: Fri, 7 Mar 2025 18:05:20 +1000 Subject: [PATCH] Qt: Fix new range for depth clear threshold --- src/core/fullscreen_ui.cpp | 18 +++++++++--------- src/core/settings.cpp | 2 +- src/duckstation-qt/graphicssettingswidget.ui | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index 7b243d71b..c341c27df 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -10,6 +10,7 @@ #include "gpu.h" #include "gpu_presenter.h" #include "gpu_thread.h" +#include "gte_types.h" #include "host.h" #include "imgui_overlays.h" #include "settings.h" @@ -3690,14 +3691,11 @@ void FullscreenUI::DrawInterfaceSettingsPage() SettingsInterface* bsi = GetEditingSettingsInterface(); static constexpr const char* s_theme_name[] = { - FSUI_NSTR("Dark"), FSUI_NSTR("Light"), FSUI_NSTR("AMOLED"), - FSUI_NSTR("Cobalt Sky"), FSUI_NSTR("Grey Matter"), FSUI_NSTR("Pinky Pals"), - FSUI_NSTR("Purple Rain") - }; + FSUI_NSTR("Dark"), FSUI_NSTR("Light"), FSUI_NSTR("AMOLED"), FSUI_NSTR("Cobalt Sky"), + FSUI_NSTR("Grey Matter"), FSUI_NSTR("Pinky Pals"), FSUI_NSTR("Purple Rain")}; - static constexpr const char* s_theme_value[] = { - "Dark", "Light", "AMOLED", "CobaltSky", "GreyMatter", "PinkyPals", "PurpleRain" - }; + static constexpr const char* s_theme_value[] = {"Dark", "Light", "AMOLED", "CobaltSky", + "GreyMatter", "PinkyPals", "PurpleRain"}; BeginMenuButtons(); @@ -5211,7 +5209,8 @@ void FullscreenUI::DrawGraphicsSettingsPage() DrawFloatRangeSetting( bsi, FSUI_ICONSTR(ICON_FA_MINUS_CIRCLE, "Depth Clear Threshold"), FSUI_CSTR("Sets a threshold for discarding the emulated depth buffer. May help in some games."), "GPU", - "PGXPDepthBuffer", Settings::DEFAULT_GPU_PGXP_DEPTH_THRESHOLD, 0.0f, 4096.0f, "%.1f", pgxp_enabled); + "PGXPDepthBuffer", Settings::DEFAULT_GPU_PGXP_DEPTH_THRESHOLD, 0.0f, static_cast(GTE::MAX_Z), "%.1f", + pgxp_enabled); } MenuHeading(FSUI_CSTR("Capture")); @@ -8311,7 +8310,8 @@ void FullscreenUI::DrawAboutWindow() { const ImVec2 image_size = LayoutScale(64.0f, 64.0f); const float indent = image_size.x + LayoutScale(8.0f); - ImGui::GetWindowDrawList()->AddImage(s_state.app_icon_texture.get(), ImGui::GetCursorScreenPos(), ImGui::GetCursorScreenPos() + image_size); + ImGui::GetWindowDrawList()->AddImage(s_state.app_icon_texture.get(), ImGui::GetCursorScreenPos(), + ImGui::GetCursorScreenPos() + image_size); ImGui::SetCursorPosX(ImGui::GetCursorPosX() + indent); ImGui::TextUnformatted("DuckStation"); ImGui::SetCursorPosX(ImGui::GetCursorPosX() + indent); diff --git a/src/core/settings.cpp b/src/core/settings.cpp index c86fa5d35..30dd7214e 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp @@ -4,7 +4,7 @@ #include "settings.h" #include "achievements.h" #include "controller.h" -#include "gte.h" +#include "gte_types.h" #include "host.h" #include "imgui_overlays.h" #include "system.h" diff --git a/src/duckstation-qt/graphicssettingswidget.ui b/src/duckstation-qt/graphicssettingswidget.ui index 75b6ef01d..4c6fe56ef 100644 --- a/src/duckstation-qt/graphicssettingswidget.ui +++ b/src/duckstation-qt/graphicssettingswidget.ui @@ -552,7 +552,7 @@ - 4096.000000000000000 + 65536.000000000000000