2 /* Simple program: Create a blank window, wait for keypress, quit.
4 Please see the SDL documentation for details on using the SDL API:
5 /Developer/Documentation/SDL/docs.html
15 int main(int argc, char *argv[])
17 Uint32 initflags = SDL_INIT_VIDEO; /* See documentation for details */
20 Uint32 videoflags = SDL_SWSURFACE;
24 /* Initialize the SDL library */
25 if ( SDL_Init(initflags) < 0 ) {
26 fprintf(stderr, "Couldn't initialize SDL: %s\n",
31 /* Set 640x480 video mode */
32 screen=SDL_SetVideoMode(640,480, video_bpp, videoflags);
34 fprintf(stderr, "Couldn't set 640x480x%d video mode: %s\n",
35 video_bpp, SDL_GetError());
43 /* Check for events */
44 while ( SDL_PollEvent(&event) ) {
49 case SDL_MOUSEBUTTONDOWN:
52 /* Any keypress quits the app... */
62 /* Clean up the SDL library */