aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java')
-rw-r--r--src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
index dd802b5..ba04aff 100644
--- a/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
+++ b/src/main/java/cc/polyfrost/oneconfig/gui/OneConfigGui.java
@@ -101,6 +101,7 @@ public class OneConfigGui extends UScreen implements GuiPause {
scale = Preferences.enableCustomScale ? Preferences.customScale : Math.min(UResolution.getWindowWidth() / 1920f, UResolution.getWindowHeight() / 1080f);
if (scale < 1 && !Preferences.enableCustomScale)
scale = Math.min(Math.min(1f, UResolution.getWindowWidth() / 1280f), Math.min(1f, UResolution.getWindowHeight() / 800f));
+ scale = (float) (Math.floor(scale / 0.05f) * 0.05f);
int x = (int) ((UResolution.getWindowWidth() - 1280 * scale) / 2f / scale);
int y = (int) ((UResolution.getWindowHeight() - 800 * scale) / 2f / scale);
RenderManager.scale(vg, scale, scale);