openal32: Pass invalid contexts to the host OpenAL lib so it can set the proper error state.
This commit is contained in:
parent
3b6ac3000f
commit
19bc84c86d
|
@ -175,15 +175,11 @@ ALCboolean CDECL wine_alcMakeContextCurrent(ALCcontext *context)
|
||||||
|
|
||||||
EnterCriticalSection(&openal_cs);
|
EnterCriticalSection(&openal_cs);
|
||||||
if(context && !(ctx=ValidateCtx(context)))
|
if(context && !(ctx=ValidateCtx(context)))
|
||||||
{
|
|
||||||
FIXME("Could not find context %p in context list\n", context);
|
FIXME("Could not find context %p in context list\n", context);
|
||||||
LeaveCriticalSection(&openal_cs);
|
|
||||||
return ALC_FALSE;
|
|
||||||
}
|
|
||||||
|
|
||||||
if(alcMakeContextCurrent(ctx ? ctx->ctx : NULL) == ALC_FALSE)
|
if(alcMakeContextCurrent(context) == ALC_FALSE)
|
||||||
{
|
{
|
||||||
WARN("Failed to make context %p current\n", ctx->ctx);
|
WARN("Failed to make context %p current\n", context);
|
||||||
LeaveCriticalSection(&openal_cs);
|
LeaveCriticalSection(&openal_cs);
|
||||||
return ALC_FALSE;
|
return ALC_FALSE;
|
||||||
}
|
}
|
||||||
|
@ -257,6 +253,7 @@ ALvoid CDECL wine_alcDestroyContext(ALCcontext *context)
|
||||||
if(!(*list))
|
if(!(*list))
|
||||||
{
|
{
|
||||||
FIXME("Could not find context %p in context list\n", context);
|
FIXME("Could not find context %p in context list\n", context);
|
||||||
|
alcDestroyContext(context);
|
||||||
LeaveCriticalSection(&openal_cs);
|
LeaveCriticalSection(&openal_cs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue