[iortcw] 32/497: All: Re-allow setting OpenAL input device / Fix fallback driver code

Simon McVittie smcv at debian.org
Fri Sep 8 10:36:09 UTC 2017


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

smcv pushed a commit to annotated tag 1.42d
in repository iortcw.

commit 7a3f820b06a3c0f707af80edf2e7af190a4e7ebb
Author: M4N4T4RMS at gmail.com <M4N4T4RMS at gmail.com@e65d2741-a53d-b2dc-ae96-bb75fa5e4c4a>
Date:   Tue Jan 28 02:45:56 2014 +0000

    All: Re-allow setting OpenAL input device / Fix fallback driver code
---
 MP/code/client/snd_openal.c | 19 ++++++++-----------
 SP/code/client/snd_openal.c | 18 ++++++++----------
 2 files changed, 16 insertions(+), 21 deletions(-)

diff --git a/MP/code/client/snd_openal.c b/MP/code/client/snd_openal.c
index f105852..08c5ce0 100644
--- a/MP/code/client/snd_openal.c
+++ b/MP/code/client/snd_openal.c
@@ -2621,20 +2621,17 @@ qboolean S_AL_Init( soundInterface_t *si )
 
 	s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ROM );
 
-	s_alInputDevice = Cvar_Get( "s_alInputDevice", "", CVAR_ROM );
-	s_alDevice = Cvar_Get( "s_alDevice", "", CVAR_ROM );
+	s_alInputDevice = Cvar_Get( "s_alInputDevice", "", CVAR_ARCHIVE | CVAR_LATCH );
+	s_alDevice = Cvar_Get("s_alDevice", "", CVAR_ARCHIVE | CVAR_LATCH);
 
 	// Load QAL
 	if( !QAL_Init( s_alDriver->string ) )
-	{
-#ifdef _WIN64
-		s_alDriver = Cvar_Get( "s_alDriver", "OpenAL32.dll", CVAR_ROM ); // Try falling back to default name
-		if ( !QAL_Init( s_alDriver->string ) )
-#endif
-		Com_Printf( "Failed to load library: \"%s\".\n", s_alDriver->string );
-
-		return qfalse;
-	}
+ 	{
+ 		Com_Printf( "Failed to load library: \"%s\".\n", s_alDriver->string );
+		if( !Q_stricmp( s_alDriver->string, ALDRIVER_DEFAULT ) || !QAL_Init( ALDRIVER_DEFAULT ) ) {
+			return qfalse;
+		}
+ 	}
 
 	device = s_alDevice->string;
 	if(device && !*device)
diff --git a/SP/code/client/snd_openal.c b/SP/code/client/snd_openal.c
index b5eae81..8b62da6 100644
--- a/SP/code/client/snd_openal.c
+++ b/SP/code/client/snd_openal.c
@@ -2660,19 +2660,17 @@ qboolean S_AL_Init( soundInterface_t *si )
 
 	s_alDriver = Cvar_Get( "s_alDriver", ALDRIVER_DEFAULT, CVAR_ROM );
 
-	s_alInputDevice = Cvar_Get( "s_alInputDevice", "", CVAR_ROM );
-	s_alDevice = Cvar_Get( "s_alDevice", "", CVAR_ROM );
+	s_alInputDevice = Cvar_Get( "s_alInputDevice", "", CVAR_ARCHIVE | CVAR_LATCH );
+	s_alDevice = Cvar_Get("s_alDevice", "", CVAR_ARCHIVE | CVAR_LATCH);
 
 	// Load QAL
 	if( !QAL_Init( s_alDriver->string ) )
-	{
-#ifdef _WIN64
-		s_alDriver = Cvar_Get( "s_alDriver", "OpenAL32.dll", CVAR_ROM ); // Try falling back to default name
-		if ( !QAL_Init( s_alDriver->string ) )
-#endif
-		Com_Printf( "Failed to load library: \"%s\".\n", s_alDriver->string );
-		return qfalse;
-	}
+ 	{
+ 		Com_Printf( "Failed to load library: \"%s\".\n", s_alDriver->string );
+		if( !Q_stricmp( s_alDriver->string, ALDRIVER_DEFAULT ) || !QAL_Init( ALDRIVER_DEFAULT ) ) {
+			return qfalse;
+		}
+ 	}
 
 	device = s_alDevice->string;
 	if(device && !*device)

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



More information about the Pkg-games-commits mailing list