How do I maximize the display screen in PyGame?

To become fullscreen at native resolution, do

DISPLAYSURF = pygame.display.set_mode((0, 0), pygame.FULLSCREEN)

To make the window resizeable, add the pygame.RESIZABLE parameter when seting the mode. You can set the mode of the screen surface multiple times but you might have to do pygame.display.quit() followed by pygame.display.init()

You should also check the pygame documentation here http://www.pygame.org/docs/ref/display.html#pygame.display.set_mode

Leave a Comment