mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 23:31:53 -05:00
Merge commit godotengine/godot@428a762e98
This commit is contained in:
@@ -69,6 +69,7 @@ GodotIOJavaWrapper::GodotIOJavaWrapper(JNIEnv *p_env, jobject p_godot_io_instanc
|
||||
_set_screen_orientation = p_env->GetMethodID(cls, "setScreenOrientation", "(I)V");
|
||||
_get_screen_orientation = p_env->GetMethodID(cls, "getScreenOrientation", "()I");
|
||||
_get_system_dir = p_env->GetMethodID(cls, "getSystemDir", "(IZ)Ljava/lang/String;");
|
||||
_get_display_rotation = p_env->GetMethodID(cls, "getDisplayRotation", "()I");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,6 +292,16 @@ String GodotIOJavaWrapper::get_system_dir(int p_dir, bool p_shared_storage) {
|
||||
}
|
||||
}
|
||||
|
||||
int GodotIOJavaWrapper::get_display_rotation() {
|
||||
if (_get_display_rotation) {
|
||||
JNIEnv *env = get_jni_env();
|
||||
ERR_FAIL_NULL_V(env, 0);
|
||||
return env->CallIntMethod(godot_io_instance, _get_display_rotation);
|
||||
} else {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
// SafeNumeric because it can be changed from non-main thread and we need to
|
||||
// ensure the change is immediately visible to other threads.
|
||||
static SafeNumeric<int> virtual_keyboard_height;
|
||||
|
||||
Reference in New Issue
Block a user