diff options
author | Simon Howard | 2009-06-07 17:33:19 +0000 |
---|---|---|
committer | Simon Howard | 2009-06-07 17:33:19 +0000 |
commit | ef459ab99b18d26f502d423a31cd744f5bed6a88 (patch) | |
tree | 311c81307b4ce81f34b15dca4484f8114b961909 | |
parent | 5d99eee5a4509f42d635156bfb1d6c495d8de221 (diff) | |
download | chocolate-doom-ef459ab99b18d26f502d423a31cd744f5bed6a88.tar.gz chocolate-doom-ef459ab99b18d26f502d423a31cd744f5bed6a88.tar.bz2 chocolate-doom-ef459ab99b18d26f502d423a31cd744f5bed6a88.zip |
Fix setup tool display configuration dialog when fullscreen is not
supported.
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1572
-rw-r--r-- | setup/display.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/setup/display.c b/setup/display.c index befec91f..38f301a1 100644 --- a/setup/display.c +++ b/setup/display.c @@ -187,7 +187,14 @@ static void BuildFullscreenModesList(void) modes = SDL_ListModes(NULL, SDL_FULLSCREEN); - for (num_modes=0; modes[num_modes] != NULL; ++num_modes); + if (modes == NULL || modes == (SDL_Rect **) -1) + { + num_modes = 0; + } + else + { + for (num_modes=0; modes[num_modes] != NULL; ++num_modes); + } // Build the screen_modes_fullscreen array |