[Scummvm-cvs-logs] CVS: scummvm/common gameDetector.cpp,1.38,1.39

Jamieson Christian jamieson630 at users.sourceforge.net
Thu Nov 21 11:06:11 CET 2002


Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv3827/scummvm/common

Modified Files:
	gameDetector.cpp 
Log Message:
Revamped Adlib functionality.
IMuseAdlib is defunct.
New MidiDriver_ADLIB device.
Simon 1/2 now supports Adlib.

Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.cpp,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- gameDetector.cpp	21 Nov 2002 17:25:31 -0000	1.38
+++ gameDetector.cpp	21 Nov 2002 19:05:32 -0000	1.39
@@ -408,7 +408,7 @@
 		{"etude",MD_ETUDE},
 		{"midiemu",MD_MIDIEMU},
 		{"alsa", MD_ALSA},
-		{"adlib",-1},
+		{"adlib", MD_ADLIB},
 	};
 
 	const MusicDrivers *md = music_drivers;
@@ -418,7 +418,7 @@
 
 	for(i=0; i!=ARRAYSIZE(music_drivers); i++,md++) {
 		if (!scumm_stricmp(md->name, s)) {
-			if (md->id == -1) {
+			if (md->id == MD_ADLIB) {
 				_use_adlib = true;
 			}
 			_midi_driver = md->id;
@@ -574,6 +574,7 @@
 	 * and the game is one of those that want adlib as
 	 * default */
 	if (_midi_driver == MD_AUTO && _features & GF_ADLIB_DEFAULT) {
+		_midi_driver = MD_ADLIB;
 		_use_adlib = true;
 	}
 
@@ -649,15 +650,19 @@
 	/* FIXME: We should, for the Unix targets, attempt to detect */
 	/*        whether a sequencer is available, and use it in */
 	/*	  preference */	
+/*
 	if (drv == MD_AUTO) {
 		_use_adlib = true;
 		return NULL;
 	}
+*/
+	if (drv == MD_AUTO) drv = MD_ADLIB;
 #endif
 
 	switch(drv) {
 	case MD_AUTO:
 	case MD_NULL:		return MidiDriver_NULL_create();
+	case MD_ADLIB:		_use_adlib = true; return MidiDriver_ADLIB_create();
 #if defined(WIN32) && !defined(_WIN32_WCE)
 	case MD_WINDOWS:	return MidiDriver_WIN_create();
 #endif





More information about the Scummvm-git-logs mailing list