Skip to content

Commit

Permalink
*** empty log message ***
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Aug 21, 2004
1 parent 879c3f8 commit ac90f0a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion test/graywin.c
Expand Up @@ -176,10 +176,13 @@ int main(int argc, char *argv[])
if ( argv[argc] && (strcmp(argv[argc], "-noframe") == 0) ) {
videoflags |= SDL_NOFRAME;
} else
if ( argv[argc] && (strcmp(argv[argc], "-resize") == 0) ) {
videoflags |= SDL_RESIZABLE;
} else
if ( argv[argc] && (strcmp(argv[argc], "-fullscreen") == 0) ) {
videoflags |= SDL_FULLSCREEN;
} else {
fprintf(stderr, "Usage: %s [-width] [-height] [-bpp] [-hw] [-hwpalette] [-flip] [-noframe] [-fullscreen]\n",
fprintf(stderr, "Usage: %s [-width] [-height] [-bpp] [-hw] [-hwpalette] [-flip] [-noframe] [-fullscreen] [-resize]\n",
argv[0]);
exit(1);
}
Expand Down Expand Up @@ -233,6 +236,18 @@ int main(int argc, char *argv[])
case SDL_VIDEOEXPOSE:
DrawBackground(screen);
break;
case SDL_VIDEORESIZE:
screen = CreateScreen(
event.resize.w, event.resize.h,
screen->format->BitsPerPixel,
videoflags);
if ( screen == NULL ) {
fprintf(stderr,
"Couldn't resize video mode\n");
done = 1;
}
DrawBackground(screen);
break;
default:
break;
}
Expand Down

0 comments on commit ac90f0a

Please sign in to comment.