From: Philip Rebohle philip.rebohle@tu-dortmund.de
Monster Hunter World needs this function to succeed. This behaves correctly under the assumption that the system has no HDR support, and only reports standard sRGB as supported.
Signed-off-by: Philip Rebohle philip.rebohle@tu-dortmund.de Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- This supersedes patch 183537. Mostly unmodified.
dlls/dxgi/swapchain.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c index bd200dddf08..ad1a74e1b62 100644 --- a/dlls/dxgi/swapchain.c +++ b/dlls/dxgi/swapchain.c @@ -2685,10 +2685,19 @@ static UINT STDMETHODCALLTYPE d3d12_swapchain_GetCurrentBackBufferIndex(IDXGISwa static HRESULT STDMETHODCALLTYPE d3d12_swapchain_CheckColorSpaceSupport(IDXGISwapChain3 *iface, DXGI_COLOR_SPACE_TYPE colour_space, UINT *colour_space_support) { - FIXME("iface %p, colour_space %#x, colour_space_support %p stub!\n", + UINT support_flags = 0; + + FIXME("iface %p, colour_space %#x, colour_space_support %p semi-stub!\n", iface, colour_space, colour_space_support);
- return E_NOTIMPL; + if (!colour_space_support) + return E_INVALIDARG; + + if (colour_space == DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709) + support_flags |= DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG_PRESENT; + + *colour_space_support = support_flags; + return S_OK; }
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_SetColorSpace1(IDXGISwapChain3 *iface,