summaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-05-21 13:02:56 -0700
committerChris Robinson <[email protected]>2013-05-21 13:02:56 -0700
commiteaccaa50284da45401d841a867a7a10daa00dbd0 (patch)
tree0f6a62e6e13adf982a00175354a288d5e02b9e58 /Alc/ALc.c
parenta5d94f5d09be24bf34cbf8433a288cfd9ca396fb (diff)
Rename the effect state's Destroy method to Destruct
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index aaddfea8..a3012650 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1777,8 +1777,9 @@ static ALCvoid FreeDevice(ALCdevice *device)
if(device->DefaultSlot)
{
- ALeffectState_Destroy(device->DefaultSlot->EffectState);
- device->DefaultSlot->EffectState = NULL;
+ ALeffectState *state = device->DefaultSlot->EffectState;
+ device->DefaultSlot = NULL;
+ ALeffectStateFactory_destroy(ALeffectState_getCreator(state), state);
}
if(device->BufferMap.size > 0)
@@ -2899,8 +2900,9 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName)
}
else if(InitializeEffect(device, device->DefaultSlot, &DefaultEffect) != AL_NO_ERROR)
{
- ALeffectState_Destroy(device->DefaultSlot->EffectState);
+ ALeffectState *state = device->DefaultSlot->EffectState;
device->DefaultSlot = NULL;
+ ALeffectStateFactory_destroy(ALeffectState_getCreator(state), state);
ERR("Failed to initialize the default effect\n");
}
}