1
0
mirror of https://github.com/Tha14/toxic.git synced 2024-06-29 16:37:46 +02:00

Destroy AL context before closing dhndl

fixes seggy on os x, i think
This commit is contained in:
A. L'mao 2014-11-28 22:08:31 -08:00
parent 673800c947
commit 2fa53c0531

View File

@ -323,9 +323,9 @@ DeviceError close_device(DeviceType type, uint32_t device_idx)
alDeleteSources(1, &device->source);
alDeleteBuffers(OPENAL_BUFS, device->buffers);
if ( !alcCloseDevice(device->dhndl) ) rc = de_AlError;
alcMakeContextCurrent(NULL);
if ( device->ctx ) alcDestroyContext(device->ctx);
if ( !alcCloseDevice(device->dhndl) ) rc = de_AlError;
}
free(device);