[AD] get_gfx_mode_list & GFX_AUTODETECT

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


In the beginning of the get_gfx_mode_list() function, it checks for
GFX_AUTODETECT and returns -1 if GFX_AUTODETECT was passed because
GFX_AUTODETECT isn't a driver. 
GFX_AUTODETECT_WINDOWED and GFX_AUTODETECT_FULLSCREEN aren't drivers
either, but these are not checked.
This patch adds checks for both of these.

Evert
diff -U3 allegro_old/src/graphics.c allegro_modified/src/graphics.c
--- allegro_old/src/graphics.c	Fri Jul 27 23:25:06 2001
+++ allegro_modified/src/graphics.c	Fri Jul 27 23:21:12 2001
@@ -170,7 +170,9 @@
    GFX_DRIVER *drv;
 
    /* GFX_AUTODETECT isn't a driver! */
-   if (card == GFX_AUTODETECT)
+   if ((card == GFX_AUTODETECT) ||
+       (card == GFX_AUTODETECT_WINDOWED) ||
+       (card == GFX_AUTODETECT_FULLSCREEN))
       return -1;
 
    /* ask the system driver for a list of graphics hardware drivers */


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/