diff options
author | Chris Robinson <[email protected]> | 2009-06-07 14:53:22 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-06-07 14:53:22 -0700 |
commit | 0fac1e911565791e50c0d23ce515042a64c40696 (patch) | |
tree | af409aec23212d14ce917ba5ecacdf2e01f3da41 /OpenAL32/alAuxEffectSlot.c | |
parent | f3a3358e63d5481fdfcb75856ae485b252767c47 (diff) |
Store the max number of auxiliary slots in the device
Diffstat (limited to 'OpenAL32/alAuxEffectSlot.c')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index f606a099..805bdb4b 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -49,7 +49,9 @@ ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslots) if (n > 0) { - if(Context->AuxiliaryEffectSlotCount+n <= Context->AuxiliaryEffectSlotMax) + ALCdevice *Device = alcGetContextsDevice(Context); + + if(Context->AuxiliaryEffectSlotCount+n <= Device->AuxiliaryEffectSlotMax) { // Check that enough memory has been allocted in the 'effectslots' array for n Effect Slots if (!IsBadWritePtr((void*)effectslots, n * sizeof(ALuint))) |