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) val output = Vec2i(this)
// ToDo: This is just a dirty workaround and does not fix the problem at all // ToDo: This is just a dirty workaround and does not fix the problem at all
while (output.x % scale.toInt() != 0) { while (output.x % scale.toInt() != 0) {
output.x-- output.x++
if (output.x < 0) {
output.x = 0
}
} }
while (output.y % scale.toInt() != 0) { while (output.y % scale.toInt() != 0) {
output.y-- output.y++
if (output.y < 0) {
output.y = 0
}
} }
return output / scale return output / scale
} }