X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;f=cd_sdl.c;h=9674e8d3c3395c208126dd3a269e81db9848f589;hb=e24277377e64376fe6a8bbbdfad73f614f3909bf;hp=66ab1b6fe0d8d6584a7fade808c0630bd16b9686;hpb=d50c6e454f2daff05738fc9ee7ecc1565c1ac45f;p=xonotic%2Fdarkplaces.git diff --git a/cd_sdl.c b/cd_sdl.c index 66ab1b6f..9674e8d3 100644 --- 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 #include @@ -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 volume) +{ +} + + +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 +