]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - cd_linux.c
Revert "Revert "Build in subdirs"", as the issues seem to be ironed out now.
[xonotic/darkplaces.git] / cd_linux.c
index 2db702cb3f9f2b685ee644377b51e49c997a4fea..bc07b849f9febd274d719cdf36a2d3e7ca7699a5 100644 (file)
@@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 // rights reserved.
 
 // suggested by Zero_Dogg to fix a compile problem on Mandriva Linux
-#define __KERNEL_STRICT_NAMES
+#include "quakedef.h"
 
 #include <linux/cdrom.h>
 #include <sys/ioctl.h>
@@ -31,7 +31,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include <time.h>
 #include <unistd.h>
 
-#include "quakedef.h"
 #include "cdaudio.h"
 
 
@@ -113,7 +112,7 @@ void CDAudio_SysSetVolume (float volume)
 }
 
 
-int CDAudio_SysPlay (unsigned char track)
+int CDAudio_SysPlay (int track)
 {
        struct cdrom_tocentry entry;
        struct cdrom_ti ti;
@@ -204,7 +203,7 @@ int CDAudio_SysUpdate (void)
        struct cdrom_subchnl subchnl;
        static time_t lastchk = 0;
 
-       if (cdPlaying && lastchk < time(NULL))
+       if (cdPlaying && lastchk < time(NULL) && cdfile != -1)
        {
                lastchk = time(NULL) + 2; //two seconds between chks
                subchnl.cdsc_format = CDROM_MSF;