Commit ed9545a5 authored by Sam Lantinga's avatar Sam Lantinga

Added a -fullscreen flag

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%40474
parent 4a75eb14
......@@ -77,6 +77,7 @@ int main(int argc, char *argv[])
{
SDL_Event event;
int done;
Uint32 videoflags;
/* Initialize SDL */
if ( SDL_Init(SDL_INIT_VIDEO) < 0 ) {
......@@ -85,8 +86,13 @@ int main(int argc, char *argv[])
}
atexit(SDL_Quit);
videoflags = SDL_SWSURFACE;
if ( strcmp(argv[1], "-fullscreen") == 0 ) {
videoflags |= SDL_FULLSCREEN;
}
/* Set 640x480 video mode */
if ( SDL_SetVideoMode(640, 480, 0, SDL_SWSURFACE) == NULL ) {
if ( SDL_SetVideoMode(640, 480, 0, videoflags) == NULL ) {
fprintf(stderr, "Couldn't set 640x480 video mode: %s\n",
SDL_GetError());
exit(2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment