From 8d51bb4b8eaeb6f12cb7ec73daeb6f28811aec59 Mon Sep 17 00:00:00 2001 From: Brian Matzon Date: Tue, 27 Aug 2002 17:45:40 +0000 Subject: [PATCH] fix: support alcMakeContextCurrent - as recommended in specs! --- src/native/win32/org_lwjgl_openal_ALC.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/native/win32/org_lwjgl_openal_ALC.cpp b/src/native/win32/org_lwjgl_openal_ALC.cpp index 5a24c804..72035a10 100644 --- a/src/native/win32/org_lwjgl_openal_ALC.cpp +++ b/src/native/win32/org_lwjgl_openal_ALC.cpp @@ -182,6 +182,10 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALC_createContext (JNIEnv *env, * ALCboolean alcMakeContextCurrent(ALCcontext *context); */ JNIEXPORT jboolean JNICALL Java_org_lwjgl_openal_ALC_makeContextCurrent (JNIEnv *env, jobject obj, jobject context) { + if(context == NULL) { + return alcMakeContextCurrent(NULL); + } + /* get context address */ jclass context_class = env->GetObjectClass(context); jfieldID context_field = env->GetFieldID(context_class, "context", "I");