summaryrefslogtreecommitdiff
path: root/games/xbreaky/patches/patch-ac
blob: 10942e60ea5605a77fd495d0c95505bf065b9d87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
$NetBSD: patch-ac,v 1.1.1.1 2000/10/15 18:04:20 rh Exp $

--- xbreaky.snd.c.orig	Thu May 11 10:13:45 2000
+++ xbreaky.snd.c
@@ -28,11 +28,19 @@
 #include <string.h>
 #include <strings.h>
 #include <signal.h>
+#ifdef __NetBSD__
+#include <soundcard.h>
+#else
 #include <sys/soundcard.h>
+#endif
 #include <sys/ioctl.h>
 
 #define DEFAULT_DSP_SPEED 8000
+#ifdef __NetBSD__
+#define AUDIO "/dev/audio"
+#else
 #define AUDIO "/dev/dsp"
+#endif
 #define RAWFILESDIR PREFIX"/share/games/xbreaky"
 
 int timelimit = 0, dsp_speed = DEFAULT_DSP_SPEED, dsp_stereo = 0;
@@ -53,7 +61,6 @@
   char k;
 
   signal(SIGTERM, quit);   
-  fcntl(STDIN_FILENO,F_SETFL,O_NONBLOCK);
   audio = open (AUDIO, O_WRONLY, 0);
   if (audio == -1)
   {
@@ -101,7 +108,7 @@
    }
    if(i!=-1)  
    { 
-    play(names[(int)k]);
+    play(names[(int)k & 1]);
    }
   }