mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-05 19:08:12 +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.
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user