Skip to content

Commit b853612

Browse files
committed
Tweaks and tidying up.
Disable integer scale slider if automatic sizing is overriding it. Don't offer these UI options on Apple. Removed unused code. Updated LUS.
1 parent 07f19aa commit b853612

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

soh/soh/advancedResolutionEditor.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ void AdvancedResolutionSettingsWindow::InitElement() {
2727
}
2828

2929
void AdvancedResolutionSettingsWindow::DrawElement() {
30+
#ifndef __APPLE__
3031
ImGui::SetNextWindowSize(ImVec2(360, 512), ImGuiCond_FirstUseEver);
3132
if (ImGui::Begin("Advanced Resolution Settings", &mIsVisible)) {
3233
bool update[sizeof(setting)];
@@ -119,14 +120,16 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
119120
}
120121

121122
if (default_maxIntegerScaleFactor < integerScale_maximumBounds) {
122-
max_integerScaleFactor = integerScale_maximumBounds + 1; // allows people do things like cropped 5x scaling at 1080p
123+
max_integerScaleFactor = integerScale_maximumBounds + 1; // the +1 allows people do things like cropped 5x scaling at 1080p
123124
}
124125
// else max_integerScaleFactor = default_maxIntegerScaleFactor; // this statement is not needed if not using a static variable
125126

126127
// Integer Scaling
127128
UIWidgets::EnhancementSliderInt("Integer scale factor: %d", "##ARSIntScale",
128129
"gAdvancedResolution_IntegerScaleFactor", 1, max_integerScaleFactor, "%d", 1,
129-
true, !CVarGetInteger("gAdvancedResolution_PixelPerfectMode",0));
130+
true,
131+
!CVarGetInteger("gAdvancedResolution_PixelPerfectMode", 0) ||
132+
CVarGetInteger("gAdvancedResolution_IntegerScale_FitAutomatically", 0));
130133
UIWidgets::Tooltip("Integer scales the image. Only available in pixel-perfect mode.");
131134

132135
UIWidgets::PaddedEnhancementCheckbox("Automatically scale image to fit viewport.",
@@ -144,6 +147,7 @@ void AdvancedResolutionSettingsWindow::DrawElement() {
144147
if (update[UPDATE_verticalPixelCount]) { CVarSetInteger("gAdvancedResolution_verticalPixelCount", (int32_t)verticalPixelCount); }
145148
}
146149
ImGui::End();
150+
#endif
147151
}
148152

149153
void AdvancedResolutionSettingsWindow::UpdateElement() {

soh/soh/advancedResolutionEditor.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@
44

55
namespace AdvancedResolutionSettings {
66
class AdvancedResolutionSettingsWindow : public LUS::GuiWindow {
7-
private:
8-
// Stored Values
9-
float aspectRatio_X;
10-
float aspectRatio_Y;
11-
int verticalPixelCount;
12-
bool verticalResolutionToggle;
137
public:
148
using LUS::GuiWindow::GuiWindow;
159

0 commit comments

Comments
 (0)