[quake3-commits] r2096 - trunk/code/client
DONOTREPLY at icculus.org
DONOTREPLY at icculus.org
Fri Jul 22 12:43:27 EDT 2011
Author: thilo
Date: 2011-07-22 12:43:27 -0400 (Fri, 22 Jul 2011)
New Revision: 2096
Modified:
trunk/code/client/snd_openal.c
Log:
Fix client crash on windows with old OpenAL
Modified: trunk/code/client/snd_openal.c
===================================================================
--- trunk/code/client/snd_openal.c 2011-07-18 22:27:25 UTC (rev 2095)
+++ trunk/code/client/snd_openal.c 2011-07-22 16:43:27 UTC (rev 2096)
@@ -2410,7 +2410,7 @@
int curlen;
// get all available devices + the default device name.
- if(enumeration_ext)
+ if(enumeration_all_ext)
{
devicelist = qalcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER);
defaultdevice = qalcGetString(NULL, ALC_DEFAULT_ALL_DEVICES_SPECIFIER);
@@ -2428,18 +2428,24 @@
// Generic Software as that one works more reliably with various sound systems.
// If it's not, use OpenAL's default selection as we don't want to ignore
// native hardware acceleration.
- if(!device && !strcmp(defaultdevice, "Generic Hardware"))
+ if(!device && defaultdevice && !strcmp(defaultdevice, "Generic Hardware"))
device = "Generic Software";
#endif
// dump a list of available devices to a cvar for the user to see.
- while((curlen = strlen(devicelist)))
+
+ if(devicelist)
{
- Q_strcat(devicenames, sizeof(devicenames), devicelist);
- Q_strcat(devicenames, sizeof(devicenames), "\n");
+ while((curlen = strlen(devicelist)))
+ {
+ Q_strcat(devicenames, sizeof(devicenames), devicelist);
+ Q_strcat(devicenames, sizeof(devicenames), "\n");
- devicelist += curlen + 1;
+ devicelist += curlen + 1;
+ }
}
+ else
+ devicelist = "";
s_alAvailableDevices = Cvar_Get("s_alAvailableDevices", devicenames, CVAR_ROM | CVAR_NORESTART);
}
More information about the quake3-commits
mailing list