]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cd_sdl.c
Fix a mistake made when merging R_RenderView call in #12367.
[xonotic/darkplaces.git] / cd_sdl.c
index 66ab1b6fe0d8d6584a7fade808c0630bd16b9686..410dd3903a79d12bd198fe82be28eb01ed57c640 100644 (file)
--- a/cd_sdl.c
+++ b/cd_sdl.c
@@ -21,6 +21,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
 #include "quakedef.h"
 #include "cdaudio.h"
+
+#if SDL_MAJOR_VERSION == 1 && SDL_MINOR_VERSION == 2
+// SDL 1.2 has CD audio
+
 #include <SDL.h>
 #include <time.h>
 
@@ -70,7 +74,7 @@ void CDAudio_SysSetVolume (float volume)
 
 int CDAudio_SysPlay (int track)
 {
-       return SDL_CDPlayTracks(cd, track, 0, 1, 0);
+       return SDL_CDPlayTracks(cd, track-1, 0, 1, 0);
 }
 
 int CDAudio_SysStop (void)
@@ -205,3 +209,75 @@ void CDAudio_SDL_CDDrive_f( void )
 
 
 
+#else
+// SDL 1.3 does not have CD audio
+
+void CDAudio_SysEject (void)
+{
+}
+
+
+void CDAudio_SysCloseDoor (void)
+{
+}
+
+
+int CDAudio_SysGetAudioDiskInfo (void)
+{
+       return -1;
+}
+
+
+float CDAudio_SysGetVolume (void)
+{
+       return -1.0f;
+}
+
+
+void CDAudio_SysSetVolume (float fvolume)
+{
+}
+
+
+int CDAudio_SysPlay (int track)
+{
+       return -1;
+}
+
+
+int CDAudio_SysStop (void)
+{
+       return -1;
+}
+
+
+int CDAudio_SysPause (void)
+{
+       return -1;
+}
+
+int CDAudio_SysResume (void)
+{
+       return -1;
+}
+
+int CDAudio_SysUpdate (void)
+{
+       return -1;
+}
+
+
+void CDAudio_SysInit (void)
+{
+}
+
+int CDAudio_SysStartup (void)
+{
+       return -1;
+}
+
+void CDAudio_SysShutdown (void)
+{
+}
+#endif
+