From c29afac0a7264b7a3ab2cb3880abd5ba5ad4a8b5 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 30 Jun 2009 12:38:18 +0000 Subject: (svn r16700) -Fix: if allegro fails to start or fails open a window or sound card fall back to another driver --- src/music/allegro_m.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/music') diff --git a/src/music/allegro_m.cpp b/src/music/allegro_m.cpp index 9400e7f49..1322ca54b 100644 --- a/src/music/allegro_m.cpp +++ b/src/music/allegro_m.cpp @@ -18,15 +18,16 @@ extern int _allegro_instance_count; const char *MusicDriver_Allegro::Start(const char * const *param) { - if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, NULL)) return NULL; + if (_allegro_instance_count == 0 && install_allegro(SYSTEM_AUTODETECT, &errno, NULL)) return "Failed to set up Allegro"; _allegro_instance_count++; /* Initialise the sound */ - if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL) != 0) return NULL; + if (install_sound(DIGI_AUTODETECT, MIDI_AUTODETECT, NULL) != 0) return "Failed to set up Allegro sound"; /* Okay, there's no soundcard */ if (midi_card == MIDI_NONE) { DEBUG(driver, 0, "allegro: no midi card found"); + return "No sound card found"; } return NULL; -- cgit v1.2.3-54-g00ecf