comparison test/graywin.c @ 945:d33645c36072

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Sat, 21 Aug 2004 13:49:22 +0000
parents 609543e2b3a1
children 782fd950bd46 c121d94672cb
comparison
equal deleted inserted replaced
944:cdea7cbc3e23 945:d33645c36072
174 videoflags |= SDL_DOUBLEBUF; 174 videoflags |= SDL_DOUBLEBUF;
175 } else 175 } else
176 if ( argv[argc] && (strcmp(argv[argc], "-noframe") == 0) ) { 176 if ( argv[argc] && (strcmp(argv[argc], "-noframe") == 0) ) {
177 videoflags |= SDL_NOFRAME; 177 videoflags |= SDL_NOFRAME;
178 } else 178 } else
179 if ( argv[argc] && (strcmp(argv[argc], "-resize") == 0) ) {
180 videoflags |= SDL_RESIZABLE;
181 } else
179 if ( argv[argc] && (strcmp(argv[argc], "-fullscreen") == 0) ) { 182 if ( argv[argc] && (strcmp(argv[argc], "-fullscreen") == 0) ) {
180 videoflags |= SDL_FULLSCREEN; 183 videoflags |= SDL_FULLSCREEN;
181 } else { 184 } else {
182 fprintf(stderr, "Usage: %s [-width] [-height] [-bpp] [-hw] [-hwpalette] [-flip] [-noframe] [-fullscreen]\n", 185 fprintf(stderr, "Usage: %s [-width] [-height] [-bpp] [-hw] [-hwpalette] [-flip] [-noframe] [-fullscreen] [-resize]\n",
183 argv[0]); 186 argv[0]);
184 exit(1); 187 exit(1);
185 } 188 }
186 } 189 }
187 190
231 done = 1; 234 done = 1;
232 break; 235 break;
233 case SDL_VIDEOEXPOSE: 236 case SDL_VIDEOEXPOSE:
234 DrawBackground(screen); 237 DrawBackground(screen);
235 break; 238 break;
239 case SDL_VIDEORESIZE:
240 screen = CreateScreen(
241 event.resize.w, event.resize.h,
242 screen->format->BitsPerPixel,
243 videoflags);
244 if ( screen == NULL ) {
245 fprintf(stderr,
246 "Couldn't resize video mode\n");
247 done = 1;
248 }
249 DrawBackground(screen);
250 break;
236 default: 251 default:
237 break; 252 break;
238 } 253 }
239 } 254 }
240 SDL_Quit(); 255 SDL_Quit();