*** empty log message ***
--HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40946
This commit is contained in:
parent
639f022cf2
commit
08137364aa
1 changed files with 16 additions and 1 deletions
|
@ -176,10 +176,13 @@ int main(int argc, char *argv[])
|
||||||
if ( argv[argc] && (strcmp(argv[argc], "-noframe") == 0) ) {
|
if ( argv[argc] && (strcmp(argv[argc], "-noframe") == 0) ) {
|
||||||
videoflags |= SDL_NOFRAME;
|
videoflags |= SDL_NOFRAME;
|
||||||
} else
|
} else
|
||||||
|
if ( argv[argc] && (strcmp(argv[argc], "-resize") == 0) ) {
|
||||||
|
videoflags |= SDL_RESIZABLE;
|
||||||
|
} else
|
||||||
if ( argv[argc] && (strcmp(argv[argc], "-fullscreen") == 0) ) {
|
if ( argv[argc] && (strcmp(argv[argc], "-fullscreen") == 0) ) {
|
||||||
videoflags |= SDL_FULLSCREEN;
|
videoflags |= SDL_FULLSCREEN;
|
||||||
} else {
|
} 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]);
|
argv[0]);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
@ -233,6 +236,18 @@ int main(int argc, char *argv[])
|
||||||
case SDL_VIDEOEXPOSE:
|
case SDL_VIDEOEXPOSE:
|
||||||
DrawBackground(screen);
|
DrawBackground(screen);
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue