From e6e3bdee83d86e8365179629997d9e0492909913 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Sun, 23 Feb 2014 19:18:54 -0800 Subject: Avoid checking the hrtf config option twice --- Alc/ALc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Alc') diff --git a/Alc/ALc.c b/Alc/ALc.c index 805be2fa..53455fdf 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -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; -- cgit v1.2.3