comparison test/testime.c @ 5249:762e40fb8e28

Be explicit about what display you're querying. The default display is 0.
author Sam Lantinga <slouken@libsdl.org>
date Thu, 10 Feb 2011 12:14:37 -0800
parents 1435f8a6425c
children
comparison
equal deleted inserted replaced
5248:3a8a452b49f0 5249:762e40fb8e28
120 printf("Using font: %s\n", fontname); 120 printf("Using font: %s\n", fontname);
121 atexit(SDL_Quit); 121 atexit(SDL_Quit);
122 122
123 if (fullscreen) 123 if (fullscreen)
124 { 124 {
125 SDL_DisplayMode mode; 125 /* Use the desktop mode */
126 SDL_GetDesktopDisplayMode(&mode); 126 width = 0;
127 127 height = 0;
128 width = mode.w;
129 height = mode.h;
130 fprintf(stderr, "%dx%d\n", width, height);
131 flags |= SDL_FULLSCREEN; 128 flags |= SDL_FULLSCREEN;
132 } 129 }
133 130
134 /* Create window */ 131 /* Create window */
135 screen = SDL_SetVideoMode(width, height, 32, flags); 132 screen = SDL_SetVideoMode(width, height, 32, flags);
373 } 370 }
374 371
375 CleanupVideo(); 372 CleanupVideo();
376 return 0; 373 return 0;
377 } 374 }
375
376 /* vi: set ts=4 sw=4 expandtab: */