From 5f580432073c64a228b65d3fb92370760b370157 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Thu, 1 Dec 2016 11:47:18 +0100 Subject: [PATCH] Added ugly set_mode to fix pygame shit --- viewer.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/viewer.py b/viewer.py index 5e948fb..7589e9c 100755 --- a/viewer.py +++ b/viewer.py @@ -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: