Skip to content

Commit

Permalink
Suggestions 2
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepytina committed Jun 17, 2024
1 parent dd06165 commit 1a09819
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
8 changes: 6 additions & 2 deletions mm/2s2h/BenGui/BenMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
};
Expand Down
5 changes: 2 additions & 3 deletions mm/2s2h/Enhancements/ResolutionEditor/ResolutionEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 1a09819

Please sign in to comment.