Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class IOSDisplayService implements DisplayService {

static {
System.loadLibrary("Display");
initDisplay();
Platform.runLater(() -> initDisplay());
}

private static ReadOnlyObjectWrapper<DisplayService.Notch> notch;
Expand Down Expand Up @@ -121,4 +121,4 @@ private static void notifyDisplay(String o) {
Platform.runLater(() -> notch.setValue(d));
}
}
}
}
5 changes: 3 additions & 2 deletions modules/display/src/main/native/ios/Display.m
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,14 @@
bool iPhoneX;

JNIEXPORT void JNICALL Java_com_gluonhq_attach_display_impl_IOSDisplayService_initDisplay
(JNIEnv *env, jclass jClass)
(JNIEnv *myenv, jclass jClass)
{
if (DisplayInited)
{
return;
}
DisplayInited = 1;
env = myenv;

mat_jDisplayServiceClass = (*env)->NewGlobalRef(env, (*env)->FindClass(env, "com/gluonhq/attach/display/impl/IOSDisplayService"));
mat_jDisplayService_notifyDisplay = (*env)->GetStaticMethodID(env, mat_jDisplayServiceClass, "notifyDisplay", "(Ljava/lang/String;)V");
Expand Down Expand Up @@ -211,4 +212,4 @@ -(void)OrientationDidChange:(NSNotification*)notification
sendNotch();
}

@end
@end