aboutsummaryrefslogtreecommitdiffstats
path: root/Alc/ALc.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2008-02-11 17:23:31 -0800
committerChris Robinson <[email protected]>2008-02-11 17:23:31 -0800
commit7fda645b16f8cff26aa6e2da47b6854ee4f5700d (patch)
treea8788a13f013af4dc405c690b8a7a1d070013c95 /Alc/ALc.c
parentec7f20644da31cce18072ed12e06ef3b991008e8 (diff)
Call InitAL at the start of some more ALC functions
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r--Alc/ALc.c8
1 files changed, 8 insertions, 0 deletions
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