title: IF in an SDL_PollEvent does not work as expected
body: <p>EDIT: I have solved the issue by changing <code>SDLKEYUP</code> to <code>SDLKEYDOWN</code>. Anyone could explain why?</p>
  <p>I'm trying to code a pause button when pressing 'p' in C with SDL2.</p>
  <p>The code below stops the sprite movements when pressing 'p' and resume it when pressing 'r':</p>
  <pre><code>SDL_PollEvent(&amp;event);
  switch(event.type)
  {
      case SDL_QUIT:
          continuer = 0;
          break;
      case SDL_KEYUP:
          switch(event.key.keysym.sym)
          {
              case SDLK_p:
                      pause=1;
                      break;
              case SDLK_r:
                      pause=0;
                      break;
          }
  }
  </code></pre>
  <p>But the code below does not pause when pressing 'p', int pause=0 declared at start and outside the main loop and not modified anywhere else than in the SDLK_p below. As if the <code>if(pause==0)</code> was not working:</p>
  <pre><code>SDL_PollEvent(&amp;event);
  switch(event.type)
  {
      case SDL_QUIT:
          continuer = 0;
          break;
      case SDL_KEYUP:
          switch(event.key.keysym.sym)
          {
              case SDLK_p:
                  if(pause==0)
                  {
                      pause=1;
                      break;
                  } else pause=0;
                  break;
              case SDLK_ESCAPE:
                  continuer=0;
                  break;
          }
  }
  </code></pre>