fix: support alcMakeContextCurrent - as recommended in specs!

This commit is contained in:
Brian Matzon 2002-08-27 17:45:40 +00:00
parent ec489c911d
commit 8d51bb4b8e
1 changed files with 4 additions and 0 deletions

View File

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