shithub: qk1

Download patch

ref: f97587132047afc1403bf225cebfe24ad3f97591
parent: c483a0f2077d7f1325a801aa1e0d5301bc6eb527
author: Sigrid Solveig Haflínudóttir <sigrid@ftrv.se>
date: Sun Dec 31 23:53:20 EST 2023

openal: stop trying to avoid setting the device

--- a/snd_openal.c
+++ b/snd_openal.c
@@ -41,7 +41,6 @@
 }track;
 
 static cvar_t s_al_dev = {"s_al_device", "0", true};
-static int s_al_dev_prev = -1;
 
 static cvar_t s_al_hrtf = {"s_al_hrtf", "0", true};
 static cvar_t s_al_doppler_factor = {"s_al_doppler_factor", "2", true};
@@ -540,8 +539,7 @@
 	bool hrtf;
 
 	n = s_al_dev.value;
-	if(n == s_al_dev_prev)
-		return;
+
 	if(qalcReopenDeviceSOFT == nil && alcIsExtensionPresent(nil, "ALC_SOFT_reopen_device"))
 		qalcReopenDeviceSOFT = alGetProcAddress("alcReopenDeviceSOFT");
 	if(qalcReopenDeviceSOFT == nil){
@@ -560,7 +558,6 @@
 				Con_Printf("AL: failed to switch to %s\n", s);
 				return;
 			}
-			s_al_dev_prev = n;
 			break;
 		}
 		s += strlen(s)+1;