aboutsummaryrefslogtreecommitdiffstats
path: root/Alc
diff options
context:
space:
mode:
Diffstat (limited to 'Alc')
-rw-r--r--Alc/ALc.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/Alc/ALc.c b/Alc/ALc.c
index 290e9593..2e2501b3 100644
--- a/Alc/ALc.c
+++ b/Alc/ALc.c
@@ -1499,8 +1499,13 @@ ALCAPI ALCboolean ALCAPIENTRY alcMakeContextCurrent(ALCcontext *context)
// context must be a valid Context or NULL
if(context == NULL || IsContext(context))
{
- if((ALContext=GetContextSuspended()) != NULL)
+ ALContext = g_pContextList;
+ while(ALContext && !ALContext->InUse)
+ ALContext = ALContext->next;
+
+ if(ALContext != NULL)
{
+ SuspendContext(ALContext);
ALContext->InUse=AL_FALSE;
ProcessContext(ALContext);
}