Fix macOS 12.5.1 support

This commit is contained in:
Michael Pfaff 2022-09-26 23:23:48 -04:00
parent c7e9e36013
commit e9b94885d9
Signed by: michael
GPG Key ID: CF402C4A012AA9D4
1 changed files with 2 additions and 2 deletions

View File

@ -132,7 +132,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_nUpdate
(JNIEnv *env, jclass clazz, jobject context_handle) {
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
MacOSXContext *context_info = (MacOSXContext *)(*env)->GetDirectBufferAddress(env, context_handle);
[context_info->context update];
[context_info->context performSelectorOnMainThread:@selector(update) withObject:nil waitUntilDone:YES];
[pool release];
}
@ -163,7 +163,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_opengl_MacOSXContextImplementation_setView
peer_info->glLayer->setViewport = YES;
}
[context_info->context setView: peer_info->window_info->view];
[context_info->context performSelectorOnMainThread:@selector(setView:) withObject:peer_info->window_info->view waitUntilDone:YES];
}
else {
[context_info->context setPixelBuffer:peer_info->pbuffer cubeMapFace:0 mipMapLevel:0 currentVirtualScreen:0];