From e77ff4a1c1567b3cba34c5b807244b7ee0da8512 Mon Sep 17 00:00:00 2001 From: nehalmistry <> Date: Thu, 11 Apr 2002 08:16:16 +0000 Subject: [PATCH] SDL sets CDMode = ":off" if it cannot initialize cdrom --- src/sound/music.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/sound/music.cpp b/src/sound/music.cpp index 458c7570e..934dbe4b7 100644 --- a/src/sound/music.cpp +++ b/src/sound/music.cpp @@ -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?