try/except for pygame.SCALED which isn't in pygame 1.9.6
This commit is contained in:
parent
eb83f0d7c2
commit
0954cd768f
|
@ -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
|
||||
# <https://www.pygame.org/docs/ref/display.html#pygame.display.toggle_fullscreen>
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue