Added ugly set_mode to fix pygame shit

This commit is contained in:
Thomas FORGIONE
2016-12-01 11:47:18 +01:00
parent befe9c19fe
commit 5f58043207
+3 -2
View File
@@ -21,11 +21,12 @@ WINDOW_WIDTH = 1024
WINDOW_HEIGHT = 1024
def resize(width, height):
print((width, height))
length = min(width, height)
offset = int( math.fabs(width - height) / 2)
# Ugly AF
pg.display.set_mode((width, height), pg.DOUBLEBUF | pg.RESIZABLE | pg.OPENGL)
if width < height:
gl.glViewport(0, offset, length, length)
else: