From 0954cd768f6fed46bf77436317271865a888c3a1 Mon Sep 17 00:00:00 2001 From: frank Date: Tue, 1 Nov 2022 17:52:27 -0400 Subject: [PATCH] try/except for pygame.SCALED which isn't in pygame 1.9.6 --- pgfw/Display.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pgfw/Display.py b/pgfw/Display.py index 53a2fa5..cef09f7 100644 --- a/pgfw/Display.py +++ b/pgfw/Display.py @@ -11,6 +11,7 @@ class Display(GameChild): def __init__(self, game): GameChild.__init__(self, game) + print(f"available fullscreen modes: {pygame.display.list_modes()}") self.delegate = self.get_delegate() self.load_configuration() self.align_window() @@ -40,7 +41,10 @@ class Display(GameChild): # Added pygame.SCALED to avoid fullscreen bug # - self.set_screen(pygame.SCALED, fs=full) + try: + self.set_screen(pygame.SCALED, fs=full) + except AttributeError: + self.set_screen(fs=full) def fullscreen_requested(self): return not self.check_command_line(self.windowed_flag) and self.fullscreen_enabled