mirror of https://github.com/libsdl-org/SDL.git
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:
parent
ca3c5fd409
commit
2c7c3d4d7b
|
|
@ -4634,7 +4634,11 @@ static Uint32 VULKAN_INTERNAL_CreateSwapchain(
|
||||||
swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
swapchainCreateInfo.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE;
|
||||||
swapchainCreateInfo.queueFamilyIndexCount = 0;
|
swapchainCreateInfo.queueFamilyIndexCount = 0;
|
||||||
swapchainCreateInfo.pQueueFamilyIndices = NULL;
|
swapchainCreateInfo.pQueueFamilyIndices = NULL;
|
||||||
|
#ifdef SDL_PLATFORM_ANDROID
|
||||||
swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
|
swapchainCreateInfo.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
|
||||||
|
#else
|
||||||
|
swapchainCreateInfo.preTransform = swapchainSupportDetails.capabilities.currentTransform;
|
||||||
|
#endif
|
||||||
swapchainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
|
swapchainCreateInfo.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
|
||||||
swapchainCreateInfo.presentMode = SDLToVK_PresentMode[windowData->presentMode];
|
swapchainCreateInfo.presentMode = SDLToVK_PresentMode[windowData->presentMode];
|
||||||
swapchainCreateInfo.clipped = VK_TRUE;
|
swapchainCreateInfo.clipped = VK_TRUE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue