Combine a couple if checks
This commit is contained in:
parent
1140b3ae83
commit
425ff7cb00
14
Alc/ALc.c
14
Alc/ALc.c
@ -1189,19 +1189,15 @@ static ALCenum UpdateDeviceParams(ALCdevice *device, const ALCint *attrList)
|
||||
}
|
||||
device->Flags |= DEVICE_RUNNING;
|
||||
|
||||
if(device->FmtChans != oldChans)
|
||||
if(device->FmtChans != oldChans && (device->Flags&DEVICE_CHANNELS_REQUEST))
|
||||
{
|
||||
if((device->Flags&DEVICE_CHANNELS_REQUEST))
|
||||
ERR("Failed to set %s, got %s instead\n",
|
||||
DevFmtChannelsString(oldChans),
|
||||
DevFmtChannelsString(device->FmtChans));
|
||||
ERR("Failed to set %s, got %s instead\n", DevFmtChannelsString(oldChans),
|
||||
DevFmtChannelsString(device->FmtChans));
|
||||
device->Flags &= ~DEVICE_CHANNELS_REQUEST;
|
||||
}
|
||||
if(device->Frequency != oldFreq)
|
||||
if(device->Frequency != oldFreq && (device->Flags&DEVICE_FREQUENCY_REQUEST))
|
||||
{
|
||||
if((device->Flags&DEVICE_FREQUENCY_REQUEST))
|
||||
ERR("Failed to set %uhz, got %uhz instead\n",
|
||||
oldFreq, device->Frequency);
|
||||
ERR("Failed to set %uhz, got %uhz instead\n", oldFreq, device->Frequency);
|
||||
device->Flags &= ~DEVICE_FREQUENCY_REQUEST;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user