diff options
author | Chris Robinson <[email protected]> | 2012-02-18 17:09:08 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2012-02-18 17:09:08 -0800 |
commit | 6ac16867b43ae039a19f9967294f47d6cc311de0 (patch) | |
tree | ea1b1fb3b8e447d78412ffe943c8021a32648841 /Alc/ALc.c | |
parent | bbc679a5db2e000c8638295d58ce97df2695b6c5 (diff) |
Only set a default slot for non-NULL effect types
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -2589,9 +2589,12 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) device->NumStereoSources = 1; device->NumMonoSources = device->MaxNoOfSources - device->NumStereoSources; - device->DefaultSlot = (ALeffectslot*)(device+1); - if(InitEffectSlot(device->DefaultSlot) != AL_NO_ERROR) - device->DefaultSlot = NULL; + if(ForcedEffect.type != AL_EFFECT_NULL) + { + device->DefaultSlot = (ALeffectslot*)(device+1); + if(InitEffectSlot(device->DefaultSlot) != AL_NO_ERROR) + device->DefaultSlot = NULL; + } // Find a playback device to open LockLists(); |