From 1a098195c72e3f7099fead95928a5635f4ed9ee1 Mon Sep 17 00:00:00 2001 From: "Tina H. (sheepytina)" <99330992+sheepytina@users.noreply.github.com> Date: Tue, 18 Jun 2024 04:15:30 +1000 Subject: [PATCH] Suggestions 2 --- mm/2s2h/BenGui/BenMenuBar.cpp | 8 ++++++-- .../Enhancements/ResolutionEditor/ResolutionEditor.cpp | 5 ++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/mm/2s2h/BenGui/BenMenuBar.cpp b/mm/2s2h/BenGui/BenMenuBar.cpp index f45a6402d5..0dea0b940f 100644 --- a/mm/2s2h/BenGui/BenMenuBar.cpp +++ b/mm/2s2h/BenGui/BenMenuBar.cpp @@ -174,8 +174,12 @@ void DrawSettingsMenu() { if (UIWidgets::BeginMenu("Graphics")) { #ifndef __APPLE__ - // TODO: Will need to disable this slider when "Advanced Resolution" mode is active. - if (UIWidgets::CVarSliderFloat("Internal Resolution: %f %%", CVAR_INTERNAL_RESOLUTION, 0.5f, 2.0f, 1.0f)) { + const bool disabled_resolutionSlider = + (CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".VerticalResolutionToggle", 0) && + CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", 0)) || + CVarGetInteger("gLowResMode", 0); + if (UIWidgets::CVarSliderFloat("Internal Resolution: %f %%", CVAR_INTERNAL_RESOLUTION, 0.5f, 2.0f, 1.0f, + { .disabled = disabled_resolutionSlider })) { Ship::Context::GetInstance()->GetWindow()->SetResolutionMultiplier( CVarGetFloat(CVAR_INTERNAL_RESOLUTION, 1)); }; diff --git a/mm/2s2h/Enhancements/ResolutionEditor/ResolutionEditor.cpp b/mm/2s2h/Enhancements/ResolutionEditor/ResolutionEditor.cpp index bbb2b3d3b4..cda6278d64 100644 --- a/mm/2s2h/Enhancements/ResolutionEditor/ResolutionEditor.cpp +++ b/mm/2s2h/Enhancements/ResolutionEditor/ResolutionEditor.cpp @@ -65,7 +65,7 @@ void AdvancedResolutionSettingsWindow::DrawElement() { // Initialise integer scale bounds. int max_integerScaleFactor = default_maxIntegerScaleFactor; // default value, which may or may not get - // overridden depending on viewport res + // overridden depending on viewport res int integerScale_maximumBounds = 1; // can change when window is resized // This is mostly just for UX purposes, as Fit Automatically logic is part of LUS. @@ -117,8 +117,7 @@ void AdvancedResolutionSettingsWindow::DrawElement() { CVarGetInteger(CVAR_PREFIX_ADVANCED_RESOLUTION ".Enabled", 0)) || CVarGetInteger("gLowResMode", 0); #ifndef __APPLE__ - // TODO and note for code review: - // - This is copied from BenMenuBar. I'm aware this needs to be replaced with a non-float slider. + // This is copied from BenMenuBar. I'm aware this needs to be replaced with a non-float slider. if (UIWidgets::CVarSliderFloat("Internal Resolution: %f %%", CVAR_INTERNAL_RESOLUTION, 0.5f, 2.0f, 1.0f, { .disabled = disabled_resolutionSlider })) { Ship::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(