title: SDL window does not open correctly
body: <p>I am learning to use the SDL library. However, amongst the many problems I faced, there is one for which I find no solution on the Internet. I set the video mode characteristics with <code>SDL_SetVideoMode</code>, but there is no new window that appears when I run the program. The only thing that happens is that my terminal shows a strange pattern but that does not look like the window I should have, and even if it did, it <strong>does not</strong> open a new window. This happens in the shell window in which I tried to run the program.</p>
  
  <p>Here is the program:</p>
  
  <pre><code>#include &lt;stdlib.h&gt;
  #include &lt;SDL/SDL.h&gt;
  
  void    pause(void)
  {
      int     on = 1;
      SDL_Event event;
  
      while (on == 1)
      {
          SDL_WaitEvent(&amp;event);
          switch(event.type)
          {
              case SDL_QUIT:
                  on = 0;
          }
      }
  }
  
  int     main(void)
  {
      if (SDL_Init(SDL_INIT_VIDEO) == -1)
          return EXIT_FAILURE;
      else
      {
          SDL_SetVideoMode(1024, 576, 32, SDL_HWSURFACE);
          SDL_WM_SetCaption("SDL TEST", NULL);
          pause();
          SDL_Quit();
      }
      return EXIT_SUCCESS;
  }
  </code></pre>
  
  <p>I use a Makefile, this is what is inside of it:</p>
  
  <pre><code>FLAGS=-Wall -Wextra -Werror
  SDLFLAG=-lSDL
  NAME=sdl1
  
  all: ${NAME} clean
  
  ${NAME}: ${NAME}.o
      gcc -o ${NAME} ${NAME}.o ${FLAGS} ${SDLFLAG}
  
  ${NAME}.o: ${NAME}.c
      gcc -o ${NAME}.o -c ${NAME}.c ${FLAGS} ${SDLFLAG}
  
  clean:
      rm -rf *.o
  
  mrproper: clean
      rm -rf ${NAME}
  </code></pre>
  
  <p>And the result of running the program is the following:
  <a href="https://i.stack.imgur.com/L3NZf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/L3NZf.png" alt="enter image description here"></a></p>
  
  <p>What is happening? Why don't I have a new, empty window, named, "SDL TEST"?</p>