gui: fix odd window size workaround

This commit is contained in:
Bixilon 2022-02-21 17:37:02 +01:00
parent 935a46f99b
commit c512548be1
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4

View File

@ -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
}