godot/platform/android
Matias N. Goldberg b9a2f108fc Fix splash screen upside down on Android
Fixes an issue introduced in #96439 (see
https://github.com/godotengine/godot/pull/96439#issuecomment-2447288702)

Godot was relying on Java's
activity.getWindowManager().getDefaultDisplay().getRotation(); to apply
pre-rotation but this is wrong.

First, getRotation() may temporarily return a different value from the
correct one; which is what was causing the splash screen to be upside
down. It would return -90 instead of 90 for the first rendered frame.

But unfortunately, the splash screen is just one frame rendered for a
very long time, so the error lingered for a long time for everyone to
see.

Second, to determine what rotation to use, we should be looking at what
Vulkan told us, which is the value we pass to
VkSurfaceTransformFlagBitsKHR::preTransform.

This commit removes the now-unnecessary
screen_get_internal_current_rotation() function (which was introduced by
#96439) and now saves the preTransform value in the swapchain.
2024-10-31 16:52:26 -03:00
..
api Remove the restriction on supported types for Godot Android plugins 2024-09-29 14:32:10 -07:00
doc_classes Update documentation for Android immersive mode 2024-10-22 22:55:43 +05:30
export Don't include core/io/image.h in core/os/os.h 2024-10-18 19:04:19 +03:00
java Fix splash screen upside down on Android 2024-10-31 16:52:26 -03:00
plugin Remove the restriction on supported types for Godot Android plugins 2024-09-29 14:32:10 -07:00
android_input_handler.cpp
android_input_handler.h
android_keys_utils.cpp
android_keys_utils.h
audio_driver_opensl.cpp Android: Ensure cleanup of all subobjects in the OpenSL audio driver 2024-07-30 17:20:46 +02:00
audio_driver_opensl.h Android: Ensure cleanup of all subobjects in the OpenSL audio driver 2024-07-30 17:20:46 +02:00
detect.py Merge pull request #96439 from darksylinc/matias-TheForge-pr03-rebased 2024-10-29 12:34:40 -07:00
dir_access_jandroid.cpp Update the GodotHost interface to support signing and verifying Android apks 2024-08-26 11:16:38 -07:00
dir_access_jandroid.h Update the GodotHost interface to support signing and verifying Android apks 2024-08-26 11:16:38 -07:00
display_server_android.cpp Fix splash screen upside down on Android 2024-10-31 16:52:26 -03:00
display_server_android.h Fix splash screen upside down on Android 2024-10-31 16:52:26 -03:00
file_access_android.cpp Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
file_access_android.h Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
file_access_filesystem_jandroid.cpp Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
file_access_filesystem_jandroid.h Reduce code duplication in FileAccess 2024-09-01 12:39:32 +02:00
java_class_wrapper.cpp Remove the restriction on supported types for Godot Android plugins 2024-09-29 14:32:10 -07:00
java_godot_io_wrapper.cpp Fix splash screen upside down on Android 2024-10-31 16:52:26 -03:00
java_godot_io_wrapper.h Fix splash screen upside down on Android 2024-10-31 16:52:26 -03:00
java_godot_lib_jni.cpp [Android] Implement native input dialog support 2024-10-29 20:02:08 +05:30
java_godot_lib_jni.h [Android] Implement native input dialog support 2024-10-29 20:02:08 +05:30
java_godot_view_wrapper.cpp
java_godot_view_wrapper.h
java_godot_wrapper.cpp [Android] Implement native input dialog support 2024-10-29 20:02:08 +05:30
java_godot_wrapper.h [Android] Implement native input dialog support 2024-10-29 20:02:08 +05:30
jni_utils.cpp Fix JavaClassWrapper so it actually works 2024-09-02 08:54:23 -05:00
jni_utils.h Fix JavaClassWrapper so it actually works 2024-09-02 08:54:23 -05:00
net_socket_android.cpp
net_socket_android.h
os_android.cpp Update the GodotHost interface to support signing and verifying Android apks 2024-08-26 11:16:38 -07:00
os_android.h Update the GodotHost interface to support signing and verifying Android apks 2024-08-26 11:16:38 -07:00
platform_config.h
platform_gl.h
README.md
rendering_context_driver_vulkan_android.cpp Move Vulkan includes to a central godot_vulkan.h header 2024-09-29 17:53:18 +02:00
rendering_context_driver_vulkan_android.h
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
string_android.h
thread_jandroid.cpp
thread_jandroid.h
tts_android.cpp
tts_android.h

Android platform port

This folder contains the Java and C++ (JNI) code for the Android platform port, using Gradle as a build system.

Documentation

Artwork license

logo.png and run_icon.png are licensed under Creative Commons Attribution 3.0 Unported per the Android logo usage guidelines:

The Android robot is reproduced or modified from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.