[Scummvm-cvs-logs] CVS: scummvm/common gameDetector.cpp,1.89,1.90 gameDetector.h,1.36,1.37
Robert G?ffringmann
lavosspawn at users.sourceforge.net
Mon May 12 16:22:08 CEST 2003
- Previous message: [Scummvm-cvs-logs] CVS: web downloads.php,1.29,1.30
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky mt32music.cpp,NONE,1.1 mt32music.h,NONE,1.1 gmchannel.cpp,1.1,1.2 gmchannel.h,1.1,1.2 gmmusic.cpp,1.1,1.2 gmmusic.h,1.1,1.2 musicbase.cpp,1.1,1.2 musicbase.h,1.2,1.3 sky.cpp,1.31,1.32 sky.h,1.22,1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/scummvm/scummvm/common
In directory sc8-pr-cvs1:/tmp/cvs-serv30872/common
Modified Files:
gameDetector.cpp gameDetector.h
Log Message:
added method to detect which midi driver will be created
Index: gameDetector.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.cpp,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- gameDetector.cpp 9 May 2003 22:44:16 -0000 1.89
+++ gameDetector.cpp 12 May 2003 23:21:35 -0000 1.90
@@ -656,32 +656,34 @@
#endif
}
-MidiDriver *GameDetector::createMidi() {
- int drv = _midi_driver;
+int GameDetector::getMidiDriverType() {
+ if (_midi_driver != MD_AUTO) return _midi_driver;
- if (drv == MD_AUTO) {
#if defined (WIN32) && !defined(_WIN32_WCE)
- drv = MD_WINDOWS; // MD_WINDOWS is default MidiDriver on windows targets
+ return MD_WINDOWS; // MD_WINDOWS is default MidiDriver on windows targets
#elif defined(MACOSX)
- drv = MD_COREAUDIO;
+ return MD_COREAUDIO;
#elif defined(__PALM_OS__) // must be before mac
- drv = MD_YPA1;
+ return MD_YPA1;
#elif defined(macintosh)
- drv = MD_QTMUSIC;
+ return MD_QTMUSIC;
#elif defined(__MORPHOS__)
- drv = MD_ETUDE;
+ return MD_ETUDE;
#elif defined (_WIN32_WCE) || defined(UNIX) || defined(X11_BACKEND)
// Always use MIDI emulation via adlib driver on CE and UNIX device
// TODO: We should, for the Unix targets, attempt to detect
// whether a sequencer is available, and use it instead.
- drv = MD_ADLIB;
+ return MD_ADLIB;
#endif
- }
+ return MD_NULL;
+}
+
+MidiDriver *GameDetector::createMidi() {
+ int drv = getMidiDriverType();
switch(drv) {
- case MD_AUTO:
case MD_NULL: return MidiDriver_NULL_create();
#ifndef __PALM_OS__
case MD_ADLIB: _use_adlib = true; return MidiDriver_ADLIB_create();
Index: gameDetector.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/common/gameDetector.h,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -d -r1.36 -r1.37
--- gameDetector.h 6 Apr 2003 19:41:34 -0000 1.36
+++ gameDetector.h 12 May 2003 23:21:35 -0000 1.37
@@ -178,6 +178,7 @@
public:
OSystem *createSystem();
MidiDriver *createMidi();
+ int getMidiDriverType();
int parseGraphicsMode(const char *s);
void updateconfig();
- Previous message: [Scummvm-cvs-logs] CVS: web downloads.php,1.29,1.30
- Next message: [Scummvm-cvs-logs] CVS: scummvm/sky mt32music.cpp,NONE,1.1 mt32music.h,NONE,1.1 gmchannel.cpp,1.1,1.2 gmchannel.h,1.1,1.2 gmmusic.cpp,1.1,1.2 gmmusic.h,1.1,1.2 musicbase.cpp,1.1,1.2 musicbase.h,1.2,1.3 sky.cpp,1.31,1.32 sky.h,1.22,1.23
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Scummvm-git-logs
mailing list