diff options
author | taw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-05-14 11:03:49 +0000 |
---|---|---|
committer | taw27 <taw27@84d2e878-0bd5-11dd-ad15-13eda11d74c5> | 2008-05-14 11:03:49 +0000 |
commit | 386384955ed68b7671f152a0ab4f30c2170e3e54 (patch) | |
tree | f3b68b1988b61cb07df5da2f026ceaabb88525b2 | |
parent | 9a26fd44ad9cad77b907c081184c62f5f9545a17 (diff) |
Try a lower resolution if large widescreen fails
git-svn-id: svn://cook.msm.cam.ac.uk:745/thrust3d/thrust3d@9 84d2e878-0bd5-11dd-ad15-13eda11d74c5
-rw-r--r-- | src/main.c | 17 |
1 files changed, 11 insertions, 6 deletions
@@ -39,15 +39,20 @@ int main(int argc, char *argv[]) { } atexit(SDL_Quit); - width = 1680;//1024; - height = 1050;//768; - SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); + + width = 1680; height = 1050; screen = SDL_SetVideoMode(width, height, 16, SDL_OPENGL | SDL_FULLSCREEN); - if (screen == NULL) { - fprintf(stderr, "Couldn't set video mode: %s\n", SDL_GetError()); - return 1; + if ( screen == NULL ) { + width = 1280; height = 1024; + screen = SDL_SetVideoMode(width, height, 16, SDL_OPENGL | SDL_FULLSCREEN); + if (screen == NULL) { + fprintf(stderr, "Couldn't set video mode: %s\n", SDL_GetError()); + SDL_Quit(); + return 1; + } } + SDL_WM_SetCaption("Thrust3D", "Thrust3D"); SDL_ShowCursor(SDL_DISABLE); |