Skip to content

Instantly share code, notes, and snippets.

@markph0204
Created September 9, 2019 15:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markph0204/b0e38e261ec1bb6fc5f010216452a016 to your computer and use it in GitHub Desktop.
Save markph0204/b0e38e261ec1bb6fc5f010216452a016 to your computer and use it in GitHub Desktop.
Pygame Fullscreen test
import pygame
pygame.init()
pygame.display.set_mode((640, 480))
modes = pygame.display.list_modes()
# pygame.display.set_mode(modes[0], pygame.FULLSCREEN)
FULLSCREEN = False
notdone = True
while notdone:
for event in pygame.event.get():
if event.type == pygame.QUIT:
notdone = False
if event.type == pygame.KEYDOWN:
if event.key == pygame.K_ESCAPE:
notdone = False
elif event.key == pygame.K_f:
if not FULLSCREEN:
pygame.display.set_mode(modes[0], pygame.FULLSCREEN)
else:
pygame.display.set_mode((640, 480))
FULLSCREEN = not FULLSCREEN
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment