Fix retrieval of the current global context when changing it

This commit is contained in:
Chris Robinson 2010-02-08 16:58:26 -08:00
parent fc96e965ae
commit a329f9c84a

View File

@ -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);
}