[AD] Demo game sound and joystick

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


The demo game doesn't *need* sound support, but it used to quit
if it couldn't get it.  I've changed it so that it still reports
the problem, but does not quit.  I also changed the joystick
test in the same way, though I think JOY_TYPE_AUTODETECT
includes JOY_TYPE_NONE anyway.

Patch attached and applied.

George

-- 
Random project update:
06/03/2001: AllegroGL 0.0.10 released at http://allegrogl.sourceforge.net/
	Six months' worth of changes, including Mingw32 support!

Index: demo.c
===================================================================
RCS file: /cvsroot/alleg/allegro/demo/demo.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -u -r1.7 -r1.8
--- demo.c	2001/04/03 06:26:02	1.7
+++ demo.c	2001/05/07 00:34:33	1.8
@@ -2007,12 +2007,12 @@
 
    if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, argv[0]) != 0) {
       allegro_message("Error initialising sound\n%s\n", allegro_error);
-      exit(1);
+      install_sound (DIGI_NONE, MIDI_NONE, NULL);
    }
 
    if (install_joystick(JOY_TYPE_AUTODETECT) != 0) {
       allegro_message("Error initialising joystick\n%s\n", allegro_error);
-      exit(1);
+      install_joystick (JOY_TYPE_NONE);
    }
 
    #ifdef ALLEGRO_CONSOLE_OK


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