summarylogtreecommitdiffstats
path: root/patch.patch
blob: dd778d83c6550fd26550ea2d59707b9763a5e1c0 (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
--- xnp2-0.86/x11/compiler.h.old        2016-03-08 18:25:50.000000000 +0100
+++ xnp2-0.86/x11/compiler.h    2016-07-05 23:48:04.507937827 +0200
@@ -117,12 +117,14 @@
 #define	MAX_PATH	MAXPATHLEN
 #endif

+#ifndef __cplusplus
 #ifndef	max
 #define	max(a,b)	(((a) > (b)) ? (a) : (b))
 #endif
 #ifndef	min
 #define	min(a,b)	(((a) < (b)) ? (a) : (b))
 #endif
+#endif /* __cplusplus */

 #ifndef        ZeroMemory
 #define        ZeroMemory(d,n)         memset((d), 0, (n))
--- xnp2-0.86/x11/soundmng.c.old	2016-03-08 17:25:50.000000000 +0000
+++ xnp2-0.86/x11/soundmng.c	2021-11-04 00:00:00.000000000 +0000
@@ -1179,8 +1179,9 @@
 		SNDBUF_FILLED_QUEUE_REMOVE_HEAD();
 		sndbuf_unlock();
 
-		SDL_MixAudio(stream,
+		SDL_MixAudioFormat(stream,
 		    sndbuf->buf + (sndbuf->size - sndbuf->remain),
+		    AUDIO_S16SYS,
 		    sndbuf->remain, SDL_MIX_MAXVOLUME);
 		stream += sndbuf->remain;
 		len -= sndbuf->remain;
@@ -1198,7 +1199,8 @@
 		sndbuf_unlock();
 	}
 
-	SDL_MixAudio(stream, sndbuf->buf + (sndbuf->size - sndbuf->remain),
+	SDL_MixAudioFormat(stream, sndbuf->buf + (sndbuf->size - sndbuf->remain),
+	    AUDIO_S16SYS,
 	    len, SDL_MIX_MAXVOLUME);
 	sndbuf->remain -= len;