godot/platform
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
..
android Fix splash screen upside down on Android 2024-10-31 16:52:26 -03:00
ios Merge pull request #98615 from Summersay415/three-opengls-please 2024-10-29 19:25:48 -05:00
linuxbsd Merge pull request #98615 from Summersay415/three-opengls-please 2024-10-29 19:25:48 -05:00
macos Merge pull request #98615 from Summersay415/three-opengls-please 2024-10-29 19:25:48 -05:00
web Merge pull request #97555 from dustdfg/platform_methods/extract_validate_arch 2024-10-25 13:03:48 -05:00
windows Merge pull request #98615 from Summersay415/three-opengls-please 2024-10-29 19:25:48 -05:00
register_platform_apis.h
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00