Fix retrieval of the current global context when changing it
This commit is contained in:
parent
fc96e965ae
commit
a329f9c84a
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user