aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2011-06-17 14:56:11 -0700
committerChris Robinson <[email protected]>2011-06-17 14:59:10 -0700
commit3a072a294d33925514514b4a3f51a435865f8abf (patch)
treec497ccb5703825ef8cb1d10ec5efa71a9c78c80e /Alc
parent23ae3c69b5ffb5ac24567e618df2b0404e37748d (diff)
Avoid resetting a flag that isn't on
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 9d584e8c..d12e4733 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1342,10 +1342,10 @@ static ALCboolean UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
if(!device->IsLoopbackDevice && GetConfigValueBool(NULL, "hrtf", AL_FALSE))
device->Flags |= DEVICE_USE_HRTF;
- if(device->FmtChans != DevFmtStereo || device->Frequency != 44100)
+ if((device->FmtChans != DevFmtStereo || device->Frequency != 44100) &&
+ (device->Flags&DEVICE_USE_HRTF))
{
- if((device->Flags&DEVICE_USE_HRTF))
- AL_PRINT("HRTF disabled (format is %uhz %s)\n", device->Frequency, DevFmtChannelsString(device->FmtChans));
+ AL_PRINT("HRTF disabled (format is %uhz %s)\n", device->Frequency, DevFmtChannelsString(device->FmtChans));
device->Flags &= ~DEVICE_USE_HRTF;
}