title: How to Fullscreen pygame
body: <p>I have a game that needs to be set in fullscreen. I am using the standard pygame.FULLSCREEN, when initializing the screen. It used to work, however when I updated to pygame 2.00, it no longer seems to work. I am using the code below, and before I get any information or the screen finished setting up it produces the error code:</p>
  
  <pre><code>pygame.error: Window surface is invalid, please call SDL_GetWindowSurface() to get a new surface
  </code></pre>
  
  <p>The code I am running is:</p>
  
  <pre><code>import pygame
  
  pygame.init()
  
  controller = pygame.joystick.Joystick(0)
  controller.init()
  
  width = 600
  height = 600 
  
  screen = pygame.display.set_mode((width, height), pygame.FULLSCREEN)
  pygame.display.init()
  
  
  pygame.display.flip()
  screen.fill((77,214,255))
  
  running = True
  while running:
      for event in pygame.event.get():
  
          if event.type == pygame.QUIT:
              pygame.quit()
              running = False
  
          if event.type == pygame.KEYDOWN:
              if event.key == pygame.K_ESCAPE:
                  pygame.quit()
                  running = False
  </code></pre>
  
  <p>If anybody knows of a solution to this problem, that would be greatly appreciated!</p>