Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorolpc user <olpc@xo-6d-5e-7c.localdomain>2011-09-30 15:55:05 (GMT)
committer olpc user <olpc@xo-6d-5e-7c.localdomain>2011-09-30 15:55:05 (GMT)
commit543026027a8ecfc7520b31db81cfd299d32d5d04 (patch)
tree79351fc16052ae7a94706914bb41716f8cac9ae3
parentb2a11fe8a2bf257db55fabb10b037c2b9f8bb10b (diff)
Fix wrong pygame dimentions when X server supports many modes SL#11231
-rw-r--r--physics.py6
1 files changed, 3 insertions, 3 deletions
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