Changeset 2876668 in python-game for game.py


Ignore:
Timestamp:
Apr 6, 2017, 1:19:37 AM (7 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
master
Children:
185faa0
Parents:
114fd09
Message:

Make windowed mode work again and add a flag to enable it

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game.py

    r114fd09 r2876668  
    77
    88[w, h] = [0, 0]
     9fullscreen = True
    910
    1011def render(surface, overlay, font, showOverlay):
     
    145146pygame.init()
    146147
    147 if w == 0 and h == 0:
     148if (w == 0 and h == 0) or not fullscreen:
    148149   print("Not using fullscreen")
    149    gameDisplay = pygame.display.set_mode((800, 600))
     150   [w, h] = [800, 600]
     151   gameDisplay = pygame.display.set_mode((w, h), pygame.DOUBLEBUF|pygame.OPENGL)
    150152else:
    151153   gameDisplay = pygame.display.set_mode((w, h), pygame.FULLSCREEN|pygame.DOUBLEBUF|pygame.OPENGL)
Note: See TracChangeset for help on using the changeset viewer.