From 543026027a8ecfc7520b31db81cfd299d32d5d04 Mon Sep 17 00:00:00 2001 From: olpc user Date: Fri, 30 Sep 2011 15:55:05 +0000 Subject: Fix wrong pygame dimentions when X server supports many modes SL#11231 --- (limited to 'physics.py') diff --git a/physics.py b/physics.py index c935e99..cffec6d 100644 --- a/physics.py +++ b/physics.py @@ -117,11 +117,11 @@ def main(): toolbarheight = 75 tabheight = 45 pygame.display.init() - x, y = pygame.display.list_modes()[0] + video_info = pygame.display.Info() + x = video_info.current_w + y = video_info.current_h screen = pygame.display.set_mode((x, y - toolbarheight - tabheight)) - # Create an instance of the game game = PhysicsGame(screen) - # Start the main loop game.run() # Make sure that main get's called -- cgit v0.9.1