SDL sets CDMode = ":off" if it cannot initialize cdrom

This commit is contained in:
nehalmistry 2002-04-11 08:16:16 +00:00
parent 0b9ad23813
commit e77ff4a1c1

View file

@ -182,9 +182,10 @@ local int PlayCDRom(const char* name)
if (!strncmp(name, ":", 1)) {
SDL_Init(SDL_INIT_CDROM);
CDRom = SDL_CDOpen(0);
if (SDL_CDStatus(CDRom) == 0)
if (!SDL_CDStatus(CDRom)) {
CDMode = ":off";
return 1;
StopMusic(); // stop music before new music
}
}
}
// CDPlayer command?