From c512548be17cd68f5ccfb7fcaad06b512ba38cf1 Mon Sep 17 00:00:00 2001 From: Bixilon Date: Mon, 21 Feb 2022 17:37:02 +0100 Subject: [PATCH] gui: fix odd window size workaround --- .../bixilon/minosoft/gui/rendering/gui/GUIRenderer.kt | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/GUIRenderer.kt b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/GUIRenderer.kt index c995532b9..37a02daf3 100644 --- a/src/main/java/de/bixilon/minosoft/gui/rendering/gui/GUIRenderer.kt +++ b/src/main/java/de/bixilon/minosoft/gui/rendering/gui/GUIRenderer.kt @@ -134,16 +134,10 @@ class GUIRenderer( val output = Vec2i(this) // ToDo: This is just a dirty workaround and does not fix the problem at all while (output.x % scale.toInt() != 0) { - output.x-- - if (output.x < 0) { - output.x = 0 - } + output.x++ } while (output.y % scale.toInt() != 0) { - output.y-- - if (output.y < 0) { - output.y = 0 - } + output.y++ } return output / scale }