]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cd_win.c
more preparation for quake2 bsp support
[xonotic/darkplaces.git] / cd_win.c
index 0fac1db24a6f4c75d7078aecfbe0bf3f8e176058..8fba829a58c6677bb99fd376284bd5ed67da3e88 100644 (file)
--- a/cd_win.c
+++ b/cd_win.c
@@ -241,22 +241,22 @@ void CDAudio_Resume(void)
 
 static void CD_f (void)
 {
-       char    *command;
-       int             ret;
-       int             n;
+       const char *command;
+       int ret;
+       int n;
 
        if (Cmd_Argc() < 2)
                return;
 
        command = Cmd_Argv (1);
 
-       if (Q_strcasecmp(command, "on") == 0)
+       if (strcasecmp(command, "on") == 0)
        {
                enabled = true;
                return;
        }
 
-       if (Q_strcasecmp(command, "off") == 0)
+       if (strcasecmp(command, "off") == 0)
        {
                if (playing)
                        CDAudio_Stop();
@@ -264,7 +264,7 @@ static void CD_f (void)
                return;
        }
 
-       if (Q_strcasecmp(command, "reset") == 0)
+       if (strcasecmp(command, "reset") == 0)
        {
                enabled = true;
                if (playing)
@@ -275,7 +275,7 @@ static void CD_f (void)
                return;
        }
 
-       if (Q_strcasecmp(command, "remap") == 0)
+       if (strcasecmp(command, "remap") == 0)
        {
                ret = Cmd_Argc() - 2;
                if (ret <= 0)
@@ -290,7 +290,7 @@ static void CD_f (void)
                return;
        }
 
-       if (Q_strcasecmp(command, "close") == 0)
+       if (strcasecmp(command, "close") == 0)
        {
                CDAudio_CloseDoor();
                return;
@@ -306,37 +306,37 @@ static void CD_f (void)
                }
        }
 
-       if (Q_strcasecmp(command, "play") == 0)
+       if (strcasecmp(command, "play") == 0)
        {
                CDAudio_Play((qbyte)atoi(Cmd_Argv (2)), false);
                return;
        }
 
-       if (Q_strcasecmp(command, "loop") == 0)
+       if (strcasecmp(command, "loop") == 0)
        {
                CDAudio_Play((qbyte)atoi(Cmd_Argv (2)), true);
                return;
        }
 
-       if (Q_strcasecmp(command, "stop") == 0)
+       if (strcasecmp(command, "stop") == 0)
        {
                CDAudio_Stop();
                return;
        }
 
-       if (Q_strcasecmp(command, "pause") == 0)
+       if (strcasecmp(command, "pause") == 0)
        {
                CDAudio_Pause();
                return;
        }
 
-       if (Q_strcasecmp(command, "resume") == 0)
+       if (strcasecmp(command, "resume") == 0)
        {
                CDAudio_Resume();
                return;
        }
 
-       if (Q_strcasecmp(command, "eject") == 0)
+       if (strcasecmp(command, "eject") == 0)
        {
                if (playing)
                        CDAudio_Stop();
@@ -345,7 +345,7 @@ static void CD_f (void)
                return;
        }
 
-       if (Q_strcasecmp(command, "info") == 0)
+       if (strcasecmp(command, "info") == 0)
        {
                Con_Printf("%u tracks\n", maxTrack);
                if (playing)
@@ -426,7 +426,7 @@ int CDAudio_Init(void)
        if (cls.state == ca_dedicated)
                return -1;
 
-       if (COM_CheckParm("-nocdaudio"))
+       if (COM_CheckParm("-nocdaudio") || COM_CheckParm("-safe"))
                return -1;
 
        mciOpenParms.lpstrDeviceType = "cdaudio";
@@ -474,3 +474,12 @@ void CDAudio_Shutdown(void)
        if (mciSendCommand(wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD)NULL))
                Con_DPrintf("CDAudio_Shutdown: MCI_CLOSE failed\n");
 }
+
+
+void CDAudio_Open(void)
+{
+}
+
+void CDAudio_Close(void)
+{
+}