mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-04 16:26:53 +00:00
Add support for selecting CDROM drive for Loom/MI cd audio, fix midi support
svn-id: r3888
This commit is contained in:
parent
d2d498d08c
commit
3142a9c5cd
@ -31,6 +31,7 @@
|
||||
"\tscummvm [-v] [-d] [-n] [-b<num>] [-t<num>] [-s<num>] [-p<path>] [-m<num>] [-f] game\n" \
|
||||
"Flags:\n" \
|
||||
"\tv - show version info and exit\n" \
|
||||
"\tc<num> - use cdrom <num> for cd audio\n" \
|
||||
"\td - enable debug output\n" \
|
||||
"\tn - no subtitles for speech\n" \
|
||||
"\tb<num> - start in room <num>\n" \
|
||||
@ -130,10 +131,16 @@ void GameDetector::parseCommandLine(int argc, char **argv) {
|
||||
_midi_driver = atoi(s+1);
|
||||
goto NextArg;
|
||||
case 'g':
|
||||
if (*(s+1) == '\0')
|
||||
goto ShowHelpAndExit;
|
||||
_videoMode = atoi(s+1);
|
||||
goto NextArg;
|
||||
if (*(s+1) == '\0')
|
||||
goto ShowHelpAndExit;
|
||||
_videoMode = atoi(s+1);
|
||||
goto NextArg;
|
||||
|
||||
case 'c':
|
||||
if (*(s+1) == '\0')
|
||||
goto ShowHelpAndExit;
|
||||
_cdrom = atoi(s+1);
|
||||
goto NextArg;
|
||||
|
||||
default:
|
||||
ShowHelpAndExit:;
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
uint16 _soundCardType;
|
||||
|
||||
int _scummVersion;
|
||||
int _cdrom;
|
||||
bool _restore;
|
||||
|
||||
};
|
||||
|
1
scumm.h
1
scumm.h
@ -1291,6 +1291,7 @@ public:
|
||||
bool fileEof(void *handle);
|
||||
uint32 filePos(void *handle);
|
||||
bool checkFixedDisk();
|
||||
int _cdrom;
|
||||
|
||||
int fileReadByte();
|
||||
uint32 fileReadDwordLE();
|
||||
|
12
sdl.cpp
12
sdl.cpp
@ -792,9 +792,13 @@ void initGraphics(Scumm *s, bool fullScreen, unsigned int scaleFactor) {
|
||||
|
||||
if (SDL_InitSubSystem(SDL_INIT_CDROM) == -1)
|
||||
cdrom = NULL;
|
||||
else
|
||||
cdrom = SDL_CDOpen(0);
|
||||
|
||||
else {
|
||||
cdrom = SDL_CDOpen(s->_cdrom);
|
||||
/* Did if open? Check if cdrom is NULL */
|
||||
if(!cdrom){
|
||||
warning("Couldn't open drive: %s\n", SDL_GetError());
|
||||
}
|
||||
}
|
||||
/* Clean up on exit */
|
||||
atexit(SDL_Quit);
|
||||
atexit(cd_shutdown);
|
||||
@ -963,6 +967,8 @@ int main(int argc, char* argv[]) {
|
||||
scumm->_features = detector._features;
|
||||
scumm->_soundCardType = detector._soundCardType;
|
||||
scumm->_noSubtitles = detector._noSubtitles;
|
||||
scumm->_midi_driver = detector._midi_driver;
|
||||
scumm->_cdrom = detector._cdrom;
|
||||
|
||||
scumm->delta=6;
|
||||
if (detector._restore) {
|
||||
|
Loading…
Reference in New Issue
Block a user