godot/drivers/vulkan
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
..
godot_vulkan.h Move Vulkan includes to a central godot_vulkan.h header 2024-09-29 17:53:18 +02:00
rendering_context_driver_vulkan.cpp Disable extra memory tracking by default 2024-08-24 20:52:39 -03:00
rendering_context_driver_vulkan.h Move Vulkan includes to a central godot_vulkan.h header 2024-09-29 17:53:18 +02:00
rendering_device_driver_vulkan.cpp Fix splash screen upside down on Android 2024-10-31 16:52:26 -03:00
rendering_device_driver_vulkan.h Fix splash screen upside down on Android 2024-10-31 16:52:26 -03:00
SCsub SCons: Add unobtrusive type hints in SCons files 2024-09-25 09:34:35 -05:00
vulkan_hooks.cpp Finish splitting functionality of the Vulkan and D3D12 backends into RenderingDeviceDriver. 2024-02-12 10:02:18 -03:00
vulkan_hooks.h Move Vulkan includes to a central godot_vulkan.h header 2024-09-29 17:53:18 +02:00