diff options
author | Chris Robinson <[email protected]> | 2008-02-08 14:44:05 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-02-08 14:44:05 -0800 |
commit | 33680accea1234ed622a84920f360488b1372ed8 (patch) | |
tree | 2e37a4e9cce78acd81cce25310ec76492399200d /Alc | |
parent | 081e593e2b3caf86c7dfb8fa90485c309258ea0d (diff) |
Don't remove the devices from the device list on unexpected shutdown
The close functions will remove it for us
Diffstat (limited to 'Alc')
-rw-r--r-- | Alc/ALc.c | 10 |
1 files changed, 3 insertions, 7 deletions
@@ -1235,8 +1235,6 @@ ALCAPI ALCboolean ALCAPIENTRY alcCloseDevice(ALCdevice *pDevice) ALCvoid ReleaseALC(ALCvoid) { - ALCdevice *Dev; - #ifdef _DEBUG if(g_ulContextCount > 0) AL_PRINT("exit() %u device(s) and %u context(s) NOT deleted\n", g_ulDeviceCount, g_ulContextCount); @@ -1244,12 +1242,10 @@ ALCvoid ReleaseALC(ALCvoid) while(g_pDeviceList) { - Dev = g_pDeviceList; - g_pDeviceList = g_pDeviceList->next; - if(Dev->IsCaptureDevice) - alcCaptureCloseDevice(Dev); + if(g_pDeviceList->IsCaptureDevice) + alcCaptureCloseDevice(g_pDeviceList); else - alcCloseDevice(Dev); + alcCloseDevice(g_pDeviceList); } } |