diff options
author | Chris Robinson <[email protected]> | 2008-02-11 17:23:31 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2008-02-11 17:23:31 -0800 |
commit | 7fda645b16f8cff26aa6e2da47b6854ee4f5700d (patch) | |
tree | a8788a13f013af4dc405c690b8a7a1d070013c95 | |
parent | ec7f20644da31cce18072ed12e06ef3b991008e8 (diff) |
Call InitAL at the start of some more ALC functions
-rw-r--r-- | Alc/ALc.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1006,6 +1006,8 @@ ALCAPI ALCvoid ALCAPIENTRY alcDestroyContext(ALCcontext *context) { ALCcontext **list; + InitAL(); + // Lock context list SuspendContext(NULL); @@ -1051,6 +1053,8 @@ ALCAPI ALCcontext * ALCAPIENTRY alcGetCurrentContext(ALCvoid) { ALCcontext *pContext = NULL; + InitAL(); + SuspendContext(NULL); pContext = g_pContextList; @@ -1072,6 +1076,8 @@ ALCAPI ALCdevice* ALCAPIENTRY alcGetContextsDevice(ALCcontext *pContext) { ALCdevice *pDevice = NULL; + InitAL(); + SuspendContext(NULL); if (IsContext(pContext)) pDevice = pContext->Device; @@ -1093,6 +1099,8 @@ ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent(ALCcontext *context) ALCcontext *ALContext; ALboolean bReturn = AL_TRUE; + InitAL(); + SuspendContext(NULL); // context must be a valid Context or NULL |