1 |
pinkbyte 12/12/31 09:46:38 |
2 |
|
3 |
Added: doomsday-1.9.8-openal-64bit-fix.patch |
4 |
Log: |
5 |
Fix openal-related code, wrt bug #436016. Thanks to <ghost99 AT mail.ru> for discovering this issue |
6 |
|
7 |
(Portage version: 2.2.0_alpha144/cvs/Linux x86_64, unsigned Manifest commit) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 games-fps/doomsday/files/doomsday-1.9.8-openal-64bit-fix.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/doomsday/files/doomsday-1.9.8-openal-64bit-fix.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/games-fps/doomsday/files/doomsday-1.9.8-openal-64bit-fix.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: doomsday-1.9.8-openal-64bit-fix.patch |
16 |
=================================================================== |
17 |
https://github.com/skyjake/Doomsday-Engine/commit/9c1fd1ee90d333332660c1aeef1addae93c2770e |
18 |
|
19 |
commit 9c1fd1ee90d333332660c1aeef1addae93c2770e |
20 |
Author: skyjake <skyjake@××××××××.net> |
21 |
Date: Sun Dec 30 16:45:56 2012 +0200 |
22 |
|
23 |
Fixed|OpenAL: Integer conversion in 64-bit build |
24 |
|
25 |
diff --git a/doomsday/plugins/openal/src/driver_openal.cpp b/doomsday/plugins/openal/src/driver_openal.cpp |
26 |
index dd3cb2e..683345b 100644 |
27 |
--- a/doomsday/plugins/openal/src/driver_openal.cpp |
28 |
+++ b/doomsday/plugins/openal/src/driver_openal.cpp |
29 |
@@ -56,8 +56,8 @@ |
30 |
|
31 |
#define PI 3.141592654 |
32 |
|
33 |
-#define SRC(buf) ((ALuint)buf->ptr3D) |
34 |
-#define BUF(buf) ((ALuint)buf->ptr) |
35 |
+#define SRC(buf) ( (ALuint) PTR2INT(buf->ptr3D) ) |
36 |
+#define BUF(buf) ( (ALuint) PTR2INT(buf->ptr) ) |
37 |
|
38 |
//enum { VX, VY, VZ }; |
39 |
|
40 |
@@ -233,8 +233,8 @@ sfxbuffer_t* DS_SFX_CreateBuffer(int flags, int bits, int rate) |
41 |
// Create the buffer object. |
42 |
buf = static_cast<sfxbuffer_t*>(Z_Calloc(sizeof(*buf), PU_APPSTATIC, 0)); |
43 |
|
44 |
- buf->ptr = (void*) bufName; |
45 |
- buf->ptr3D = (void*) srcName; |
46 |
+ buf->ptr = INT2PTR(void, bufName); |
47 |
+ buf->ptr3D = INT2PTR(void, srcName); |
48 |
buf->bytes = bits / 8; |
49 |
buf->rate = rate; |
50 |
buf->flags = flags; |