[AD] small fix in the test program |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Going to apply this small fix, for a problem probably introduced when
set_gfx_mode was modified to clear allegro_error some time ago.
--
Elias Pschernig <elias@xxxxxxxxxx>
Index: test.c
===================================================================
RCS file: /cvsroot/alleg/allegro/tests/test.c,v
retrieving revision 1.28
diff -u -r1.28 test.c
--- test.c 29 Nov 2003 07:24:19 -0000 1.28
+++ test.c 4 Jan 2004 11:39:50 -0000
@@ -4272,6 +4272,8 @@
}
}
else {
+ char buf[ALLEGRO_ERROR_SIZE];
+ ustrzcpy (buf, sizeof buf, allegro_error);
set_color_depth(8);
request_refresh_rate(0);
if (set_gfx_mode(GFX_SAFE, 320, 200, 0, 0)!=0) {
@@ -4285,7 +4287,7 @@
gui_mg_color = palette_color[8];
gui_bg_color = palette_color[0];
- alert("Error setting mode:", allegro_error, NULL, "Sorry", NULL, 13, 0);
+ alert("Error setting mode:", buf, NULL, "Sorry", NULL, 13, 0);
}
}
}