Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/game.py
diff options
context:
space:
mode:
authorRafael Ortiz <rafael@activitycentral.com>2011-09-19 14:29:51 (GMT)
committer Rafael Ortiz <rafael@activitycentral.com>2011-09-19 14:29:51 (GMT)
commitcd35f35ab15775e9b15fdd6793a74a842171b3e5 (patch)
treec2c8d97f4bff1941bacc340b9b77ae0be9d4704d /game.py
parentc64b4410c414f2556b325cbb1c87565e8e19a3cb (diff)
fix for olpc #11231 (wrong dimensions in pygame activities) by james cameron
Diffstat (limited to 'game.py')
-rw-r--r--game.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/game.py b/game.py
index 692c136..362d794 100644
--- a/game.py
+++ b/game.py
@@ -447,8 +447,11 @@ def main():
# ask pygame how big the screen is, leaving a little room for the toolbar
toolbarheight = 75
pygame.display.init()
- maxX,maxY = pygame.display.list_modes()[0]
- screen = pygame.display.set_mode( ( maxX, maxY-toolbarheight ) )
+# maxX,maxY = pygame.display.list_modes()[0]
+ videoinfo = pygame.display.Info()
+ width = videoinfo.current_w
+ height = videoinfo.current_h - toolbarheight
+ screen = pygame.display.set_mode((width, height))
game = MazeGame(screen)
game.run()