diff options
author | George L. Albany <Megacake1234@gmail.com> | 2024-10-31 02:58:33 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-31 02:58:33 +0000 |
commit | 1e356b53ae7768e278b5bad7285184ea1dc4588c (patch) | |
tree | 822e78c8b1b83587f6a732e8c34f0a7161d19bed /platform/android/java_godot_io_wrapper.cpp | |
parent | 3386a662914dde912ab9a7f41266d7c662be7eff (diff) | |
parent | 82de309d58c5f0e221b85463cca2983cd7ed0289 (diff) | |
download | redot-engine-1e356b53ae7768e278b5bad7285184ea1dc4588c.tar.gz |
Merge pull request #823 from Spartan322/merge/8004c75
Merge commit godotengine/godot@8004c75
Diffstat (limited to 'platform/android/java_godot_io_wrapper.cpp')
-rw-r--r-- | platform/android/java_godot_io_wrapper.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/platform/android/java_godot_io_wrapper.cpp b/platform/android/java_godot_io_wrapper.cpp index 651b80e902..a43ad40188 100644 --- a/platform/android/java_godot_io_wrapper.cpp +++ b/platform/android/java_godot_io_wrapper.cpp @@ -68,6 +68,7 @@ GodotIOJavaWrapper::GodotIOJavaWrapper(JNIEnv *p_env, jobject p_godot_io_instanc _has_hardware_keyboard = p_env->GetMethodID(cls, "hasHardwareKeyboard", "()Z"); _set_screen_orientation = p_env->GetMethodID(cls, "setScreenOrientation", "(I)V"); _get_screen_orientation = p_env->GetMethodID(cls, "getScreenOrientation", "()I"); + _get_internal_current_screen_rotation = p_env->GetMethodID(cls, "getInternalCurrentScreenRotation", "()I"); _get_system_dir = p_env->GetMethodID(cls, "getSystemDir", "(IZ)Ljava/lang/String;"); } } @@ -269,6 +270,16 @@ int GodotIOJavaWrapper::get_screen_orientation() { } } +int GodotIOJavaWrapper::get_internal_current_screen_rotation() { + if (_get_internal_current_screen_rotation) { + JNIEnv *env = get_jni_env(); + ERR_FAIL_NULL_V(env, 0); + return env->CallIntMethod(godot_io_instance, _get_internal_current_screen_rotation); + } else { + return 0; + } +} + String GodotIOJavaWrapper::get_system_dir(int p_dir, bool p_shared_storage) { if (_get_system_dir) { JNIEnv *env = get_jni_env(); |