diff options
author | Chris Robinson <[email protected]> | 2014-02-23 19:18:54 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2014-02-23 19:18:54 -0800 |
commit | e6e3bdee83d86e8365179629997d9e0492909913 (patch) | |
tree | a8c6a0a8392c7411c90846894d1553332fcbb83f | |
parent | 0e51becd58743ac0ed252220e2d5cf2ee56a1b84 (diff) |
Avoid checking the hrtf config option twice
-rw-r--r-- | Alc/ALc.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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; |