Philip Rebohle : dxgi: Improve the d3d12_swapchain_CheckColorSpaceSupport() stub.
Module: wine Branch: master Commit: d9c69cbc481114a1e4f2d43952b357dead23ae3b URL: https://source.winehq.org/git/wine.git/?a=commit;h=d9c69cbc481114a1e4f2d4395... Author: Philip Rebohle <philip.rebohle(a)tu-dortmund.de> Date: Fri Apr 17 20:39:19 2020 +0430 dxgi: Improve the d3d12_swapchain_CheckColorSpaceSupport() stub. 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(a)tu-dortmund.de> Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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 bd200dddf0..ad1a74e1b6 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,
participants (1)
-
Alexandre Julliard