From ef459ab99b18d26f502d423a31cd744f5bed6a88 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sun, 7 Jun 2009 17:33:19 +0000 Subject: Fix setup tool display configuration dialog when fullscreen is not supported. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1572 --- setup/display.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3