From b2d96ee0872422043acdd7db44f4b2ad6a7015e9 Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Wed, 9 Mar 2022 21:27:33 +0000 Subject: [PATCH] [d3d9] Fix fallthroughs in PickFormats --- src/d3d9/d3d9_swapchain.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/d3d9/d3d9_swapchain.cpp b/src/d3d9/d3d9_swapchain.cpp index 606bd192..d6e52dd6 100644 --- a/src/d3d9/d3d9_swapchain.cpp +++ b/src/d3d9/d3d9_swapchain.cpp @@ -1117,8 +1117,9 @@ namespace dxvk { switch (Format) { default: - Logger::warn(str::format("D3D9SwapChainEx: Unexpected format: ", Format)); - + Logger::warn(str::format("D3D9SwapChainEx: Unexpected format: ", Format)); + [[fallthrough]]; + case D3D9Format::A8R8G8B8: case D3D9Format::X8R8G8B8: case D3D9Format::A8B8G8R8: @@ -1138,12 +1139,12 @@ namespace dxvk { pDstFormats[n++] = { VK_FORMAT_B5G5R5A1_UNORM_PACK16, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; pDstFormats[n++] = { VK_FORMAT_R5G5B5A1_UNORM_PACK16, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; pDstFormats[n++] = { VK_FORMAT_A1R5G5B5_UNORM_PACK16, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; - } + } break; case D3D9Format::R5G6B5: { pDstFormats[n++] = { VK_FORMAT_B5G6R5_UNORM_PACK16, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; pDstFormats[n++] = { VK_FORMAT_R5G6B5_UNORM_PACK16, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR }; - } + } break; } return n;