title: SDL_PollEvent does not work
body: <p>I'm doing this tutorial about SDL in game development. The program should leave the main loop when finding an input, but it does not:</p>
  
  <pre><code>SDL_Window* gWindow = NULL;
  SDL_Surface* gScreenSurface = NULL;
  SDL_Surface* gXOut = NULL;
  
  int main(int argc, char* argv[]) {
  
      if (!init()){
          printf("Failed to initialize.\n");
      }
      else {
          //Load media
          if (!loadMedia()){
              printf("Failed to load media.\n");
          }
          else {
              //Main loop flag
              bool quit = false;
  
              //Event handler
              SDL_Event e;
  
              //While application is runnig
              while (!quit){
                  //Handles events on queue
                  while (SDL_PollEvent(&amp;e) != 0){
                      //User requests quit
                      if (e.type == SDL_QUIT){
                          quit = true;
                      }
                  }
  
                  //Aply the image
                  SDL_BlitSurface(gXOut, NULL, gScreenSurface, NULL);
  
                  //Update the surface
                  SDL_UpdateWindowSurface(gWindow);
  
              }
          }
      }
  
      //Free resources and close SDL
      close();
  
      return 0;
  </code></pre>
  
  <p>I've tried changing SDL_QUIT for SDL_KEYPRESSED but it doesn't work either. Any idea why?</p>