mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-17 19:48:51 +00:00
Only use VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR on Android
This fixes Nintendo Switch where the identity bit isn't available. We only needed this on Android to automatically handle device user orientation.
(cherry picked from commit 2c7c3d4d7b)
This commit is contained in:
parent
110a832f5c
commit
18d93d11e1
1 changed files with 4 additions and 0 deletions
|
|
@ -4634,7 +4634,11 @@ static Uint32 VULKAN_INTERNAL_CreateSwapchain(
|
|||
swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||
swapchainCreateInfo.queueFamilyIndexCount = 0;
|
||||
swapchainCreateInfo.pQueueFamilyIndices = NULL;
|
||||
#ifdef SDL_PLATFORM_ANDROID
|
||||
swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
|
||||
#else
|
||||
swapchainCreateInfo.preTransform = swapchainSupportDetails.capabilities.currentTransform;
|
||||
#endif
|
||||
swapchainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
|
||||
swapchainCreateInfo.presentMode = SDLToVK_PresentMode[windowData->presentMode];
|
||||
swapchainCreateInfo.clipped = VK_TRUE;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue