You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
set Configuration.screenWidthDp and Configuration.screenHeightDp
This commit is contained in:
@@ -59,6 +59,13 @@ JNIEXPORT void JNICALL Java_android_content_Context_native_1updateConfig(JNIEnv
|
|||||||
g_variant_unref(color_sheme);
|
g_variant_unref(color_sheme);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
GdkDisplay *display = gdk_display_get_default();
|
||||||
|
GdkMonitor *monitor = g_list_model_get_item(gdk_display_get_monitors(display), 0);
|
||||||
|
GdkRectangle geometry;
|
||||||
|
gdk_monitor_get_geometry(monitor, &geometry);
|
||||||
|
|
||||||
|
_SET_INT_FIELD(config, "screenWidthDp", geometry.width);
|
||||||
|
_SET_INT_FIELD(config, "screenHeightDp", geometry.height);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT void JNICALL Java_android_content_Context_nativeOpenFile(JNIEnv *env, jclass class, jint fd)
|
JNIEXPORT void JNICALL Java_android_content_Context_nativeOpenFile(JNIEnv *env, jclass class, jint fd)
|
||||||
|
|||||||
Reference in New Issue
Block a user