Can anyone tell me why my app quits with:
pygame error: display Surface quit.
import pygame, sys
running = True
while running:
for event in pygame.event.get():
if event.type == pygame.QUIT:
pygame.quit() # quit the screen
running = False
sys.exit()
call sys.exit() after pygame.quit() to stop the program so you can not change the surface after you have quit pygame and not get the error