Avoid checking the hrtf config option twice

This commit is contained in:
Chris Robinson
2014-02-23 19:18:54 -08:00
parent 0e51becd58
commit e6e3bdee83
+3 -2
View File
@@ -1840,9 +1840,10 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
V(device->Synth,update)(device);
device->Hrtf = NULL;
if(device->Type != Loopback && ConfigValueExists(NULL, "hrtf"))
if(device->Type != Loopback)
{
if(GetConfigValueBool(NULL, "hrtf", AL_FALSE))
int nohrtf = !(device->Flags&DEVICE_HRTF_REQUEST);
if(GetConfigValueBool(NULL, "hrtf", !nohrtf))
device->Flags |= DEVICE_HRTF_REQUEST;
else
device->Flags &= ~DEVICE_HRTF_REQUEST;