[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
A small proposal for gfx_mode_select_ex. If the card you pass into
gfx_mode_select_ex cannot be found in the driver list, I think it
should not crash.
Index: src/modesel.c
===================================================================
RCS file: /cvsroot/alleg/allegro/src/modesel.c,v
retrieving revision 1.9
diff -u -u -r1.9 modesel.c
--- src/modesel.c 2001/08/30 12:42:35 1.9
+++ src/modesel.c 2001/09/03 07:16:10
@@ -482,6 +482,8 @@
}
what_driver = i;
+ if (what_driver == driver_count)
+ what_driver = GFX_AUTODETECT;
for (i=0; driver_list[what_driver].mode_list[i].w; i++) {
if ((driver_list[what_driver].mode_list[i].w == *w) && (driver_list[what_driver].mode_list[i].h == *h)) {