SDL sets CDMode = ":off" if it cannot initialize cdrom
This commit is contained in:
parent
0b9ad23813
commit
e77ff4a1c1
1 changed files with 3 additions and 2 deletions
|
@ -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?
|
||||
|
|
Loading…
Add table
Reference in a new issue