shithub: choc

Download patch

ref: ef459ab99b18d26f502d423a31cd744f5bed6a88
parent: 5d99eee5a4509f42d635156bfb1d6c495d8de221
author: Simon Howard <fraggle@gmail.com>
date: Sun Jun 7 13:33:19 EDT 2009

Fix setup tool display configuration dialog when fullscreen is not
supported.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 1572

--- a/setup/display.c
+++ b/setup/display.c
@@ -187,7 +187,14 @@
 
     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