From 8d70cdd8961ae824103096d841a3fe3e0d2475e7 Mon Sep 17 00:00:00 2001
From: nehalmistry <>
Date: Wed, 12 Feb 2003 20:27:08 +0000
Subject: [PATCH] use strcmp to check CDMode

---
 src/game/intro.cpp          |  2 +-
 src/sound/music.cpp         | 11 -----------
 src/sound/sound_server.cpp  |  2 +-
 src/stratagus/stratagus.cpp |  2 +-
 4 files changed, 3 insertions(+), 14 deletions(-)

diff --git a/src/game/intro.cpp b/src/game/intro.cpp
index 49ebd15c2..aa3b7c41d 100644
--- a/src/game/intro.cpp
+++ b/src/game/intro.cpp
@@ -538,7 +538,7 @@ global void ShowIntro(const Intro *intro)
     CallbackMusicOn();
     StopMusic();
     // FIXME: should this be GameMusic?
-    if (CDMode == "off")
+    if (!strcmp(CDMode, "off"))
     {
 	PlayMusic(MenuMusic);
     }
diff --git a/src/sound/music.cpp b/src/sound/music.cpp
index 327b27137..6945963f2 100644
--- a/src/sound/music.cpp
+++ b/src/sound/music.cpp
@@ -440,17 +440,6 @@ global void PlayMusic(const char* name)
     Sample* sample;
 #endif
 
-/*
-#if defined(USE_SDLCD) || defined(USE_LIBCDA) || defined(USE_CDDA)
-    if (PlayCDRom(name)) {
-	return;
-    }
-    if (strcmp(CDMode, ":off") && strcmp(CDMode, ":stopped")) {
-	return;
-    }
-#endif
-*/
-
     if (MusicOff) {
 	return;
     }
diff --git a/src/sound/sound_server.cpp b/src/sound/sound_server.cpp
index 677dbdcf9..ef8e24a22 100644
--- a/src/sound/sound_server.cpp
+++ b/src/sound/sound_server.cpp
@@ -1200,7 +1200,7 @@ global int InitSound(void)
     DebugLevel0Fn("FIXME: must write non GLIB hash functions\n");
 #endif
 
-    if( TitleMusic && (CDMode == "off") ) {
+    if( TitleMusic && (!strcmp(CDMode, "off")) ) {
 	PlayMusic(TitleMusic);
     }
 
diff --git a/src/stratagus/stratagus.cpp b/src/stratagus/stratagus.cpp
index 2562a6928..0bc9c7393 100644
--- a/src/stratagus/stratagus.cpp
+++ b/src/stratagus/stratagus.cpp
@@ -1075,7 +1075,7 @@ global void MenuLoop(char* filename, WorldMap* map)
 	    // FIXME: If second loop?
 
 	    if( !PlayingMusic && strcmp(TitleMusic,MenuMusic) 
-		&& (CDMode == "off") ) {
+		&& (!strcmp(CDMode, "off")) ) {
 		PlayMusic(MenuMusic);
 	    }
 	    EnableRedraw=RedrawMenu;