[ioquake3] 27/34: Make client for Windows x86_64 use OpenAL64.dll by default

Simon McVittie smcv at debian.org
Fri Sep 8 10:33:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

smcv pushed a commit to annotated tag debian/1.36+u20170908+dfsg1-1
in repository ioquake3.

commit c2ce1c2f512223f786a1f724cfcbf9f0efe35b8f
Author: Zack Middleton <zack at cloemail.com>
Date:   Mon Sep 4 20:02:17 2017 -0500

    Make client for Windows x86_64 use OpenAL64.dll by default
    
    ioquake3.x86_64.exe can't load x86 OpenAL32.dll. Using separate
    library names allows shipping OpenAL for both architectures.
    
    Though since the dll name is saved in the config file, using both
    clients on the same computer will cause one client arch to always
    try to load the wrong OpenAL dll and then fallback to the correct
    default OpenAL dll. I guess it could be fixed by using separate
    cvar names for s_alDriver.
---
 code/client/snd_openal.c | 4 +++-
 misc/nsis/Makefile       | 9 ++++++++-
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/code/client/snd_openal.c b/code/client/snd_openal.c
index dc1d817..5ba5c7c 100644
--- a/code/client/snd_openal.c
+++ b/code/client/snd_openal.c
@@ -2206,7 +2206,9 @@ static ALCdevice *alCaptureDevice;
 static cvar_t *s_alCapture;
 #endif
 
-#ifdef _WIN32
+#if defined(_WIN64)
+#define ALDRIVER_DEFAULT "OpenAL64.dll"
+#elif defined(_WIN32)
 #define ALDRIVER_DEFAULT "OpenAL32.dll"
 #elif defined(__APPLE__)
 #define ALDRIVER_DEFAULT "/System/Library/Frameworks/OpenAL.framework/OpenAL"
diff --git a/misc/nsis/Makefile b/misc/nsis/Makefile
index d56fbde..3875e4e 100644
--- a/misc/nsis/Makefile
+++ b/misc/nsis/Makefile
@@ -38,6 +38,13 @@ ifndef SDLDLL
 		SDLDLL=SDL2.dll
 	endif
 endif
+ifndef OPENALDLL
+	ifeq ($(ARCH),x86_64)
+		OPENALDLL=OpenAL64.dll
+	else
+		OPENALDLL=OpenAL32.dll
+	endif
+endif
 
 DEFINES=
 ifeq ($(USE_RENDERER_DLOPEN),1)
@@ -63,7 +70,7 @@ endif
 all: ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe
 
 ioquake3.$(ARCH).nsi: ioquake3.nsi.in
-	sed 's/XXXVERSIONXXX/$(VERSION)/;s/XXXRELEASEXXX/$(RELEASE)/;s/mingw32/$(PLATFORM)/g;s/x86/$(ARCH)/g;s/SDL2.dll/$(SDLDLL)/g' < $< > $@
+	sed 's/XXXVERSIONXXX/$(VERSION)/;s/XXXRELEASEXXX/$(RELEASE)/;s/mingw32/$(PLATFORM)/g;s/x86/$(ARCH)/g;s/SDL2.dll/$(SDLDLL)/g;s/OpenAL32.dll/$(OPENALDLL)/g' < $< > $@
 
 ioquake3-$(VERSION)-$(RELEASE).$(ARCH).exe: ioquake3.$(ARCH).nsi
 	makensis $(DEFINES) ioquake3.$(ARCH).nsi

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/ioquake3.git



More information about the Pkg-games-commits mailing list