diff options
author | Chris Robinson <[email protected]> | 2010-02-08 16:58:26 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2010-02-08 16:58:26 -0800 |
commit | a329f9c84a154340a61accf5713db522f0a6cf00 (patch) | |
tree | 8019ba38d85d62d8c1a95cf532c94da37d57351f | |
parent | fc96e965ae3a4741f57abfd171ac9d3e7776ce9f (diff) |
Fix retrieval of the current global context when changing it
-rw-r--r-- | Alc/ALc.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); } |