aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2012-03-15 15:22:58 -0700
committerChris Robinson <[email protected]>2012-03-15 15:22:58 -0700
commitb7d67d8bcc71ad23aee3a52ff7a63dbd1c20d828 (patch)
tree7b01f81f7247890f9f7534b43ad01f2d3c5f3648 /Alc
parent7e5b13aabd14c4b28ccaa948df94524742c662ef (diff)
Don't error when querying unknown enums for the channel config and sample format
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 048ccd75..52ba6801 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -2788,11 +2788,10 @@ ALC_API ALCboolean ALC_APIENTRY alcIsRenderFormatSupportedSOFT(ALCdevice *device
alcSetError(device, ALC_INVALID_DEVICE);
else if(freq <= 0)
alcSetError(device, ALC_INVALID_VALUE);
- else if(!IsValidALCType(type) || !IsValidALCChannels(channels))
- alcSetError(device, ALC_INVALID_ENUM);
else
{
- if(BytesFromDevFmt(type) > 0 && ChannelsFromDevFmt(channels) > 0 &&
+ if(IsValidALCType(type) && BytesFromDevFmt(type) > 0 &&
+ IsValidALCChannels(channels) && ChannelsFromDevFmt(channels) > 0 &&
freq >= MIN_OUTPUT_RATE)
ret = ALC_TRUE;
}