Module: wine Branch: master Commit: 19bc84c86dacf0b6a0ec802a9b27ff940f7afc17 URL: http://source.winehq.org/git/wine.git/?a=commit;h=19bc84c86dacf0b6a0ec802a9b...
Author: Chris Robinson chris.kcat@gmail.com Date: Thu Sep 10 12:12:08 2009 -0700
openal32: Pass invalid contexts to the host OpenAL lib so it can set the proper error state.
---
dlls/openal32/openal.c | 9 +++------ 1 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/openal32/openal.c b/dlls/openal32/openal.c index 75654fc..e4da15b 100644 --- a/dlls/openal32/openal.c +++ b/dlls/openal32/openal.c @@ -175,15 +175,11 @@ ALCboolean CDECL wine_alcMakeContextCurrent(ALCcontext *context)
EnterCriticalSection(&openal_cs); if(context && !(ctx=ValidateCtx(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); return ALC_FALSE; } @@ -257,6 +253,7 @@ ALvoid CDECL wine_alcDestroyContext(ALCcontext *context) if(!(*list)) { FIXME("Could not find context %p in context list\n", context); + alcDestroyContext(context); LeaveCriticalSection(&openal_cs); return; }