From 7fda645b16f8cff26aa6e2da47b6854ee4f5700d Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Mon, 11 Feb 2008 17:23:31 -0800 Subject: [PATCH] Call InitAL at the start of some more ALC functions --- Alc/ALc.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Alc/ALc.c b/Alc/ALc.c index 8f15b155..8f0da230 100644 --- a/Alc/ALc.c +++ b/Alc/ALc.c @@ -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 -- 2.11.4.GIT