mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-23 10:13:02 +01:00
Merge pull request #283 from stal888/master
Destroy AL context before closing dhndl
This commit is contained in:
commit
7e49ba92b2
@ -323,9 +323,9 @@ DeviceError close_device(DeviceType type, uint32_t device_idx)
|
|||||||
alDeleteSources(1, &device->source);
|
alDeleteSources(1, &device->source);
|
||||||
alDeleteBuffers(OPENAL_BUFS, device->buffers);
|
alDeleteBuffers(OPENAL_BUFS, device->buffers);
|
||||||
|
|
||||||
if ( !alcCloseDevice(device->dhndl) ) rc = de_AlError;
|
|
||||||
alcMakeContextCurrent(NULL);
|
alcMakeContextCurrent(NULL);
|
||||||
if ( device->ctx ) alcDestroyContext(device->ctx);
|
if ( device->ctx ) alcDestroyContext(device->ctx);
|
||||||
|
if ( !alcCloseDevice(device->dhndl) ) rc = de_AlError;
|
||||||
}
|
}
|
||||||
|
|
||||||
free(device);
|
free(device);
|
||||||
|
Loading…
Reference in New Issue
Block a user