modules/graphics/src/main/native-glass/ios/GlassScreen.m

Print this page

        

@@ -34,31 +34,38 @@
 
 static inline jobject createJavaScreen(JNIEnv *env, UIScreen* screen)
 {
     jmethodID screenInit = (*env)->GetMethodID(env, mat_jScreenClass,
                                                    "<init>",
-                                                   "(JIIIIIIIIIIIF)V");
+                                                   "(JIIIIIIIIIIIIIIIFFFF)V");
 
+    jfloat outputScale = (jfloat) [screen scale];
     return (jobject)(*env)->NewObject(env, mat_jScreenClass, screenInit,
                                       ptr_to_jlong(screen),
 
                                       32,
 
                                       (jint)[screen bounds].origin.x,
                                       (jint)[screen bounds].origin.y,
                                       (jint)[screen bounds].size.width,
                                       (jint)[screen bounds].size.height,
 
+                                      (jint)[screen bounds].origin.x,
+                                      (jint)[screen bounds].origin.y,
+                                      (jint)[screen bounds].size.width,
+                                      (jint)[screen bounds].size.height,
+
                                       (jint)[screen applicationFrame].origin.x,
                                       (jint)[screen applicationFrame].origin.y,
                                       (jint)[screen applicationFrame].size.width,
                                       (jint)[screen applicationFrame].size.height,
 
 
                                       (jint)[screen currentMode].size.width,
                                       (jint)[screen currentMode].size.height,
-                                      (jfloat)[screen scale]);
+                                      1.0f, 1.0f,
+                                      outputScale, outputScale);
 
 }
 
 void GlassScreenDidChangeScreenParameters(JNIEnv *env)
 {