dxgi: Implement d3d12_swapchain_GetFullscreenState().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
6d64bfc28b
commit
712d3ca1e4
|
@ -2173,9 +2173,17 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH d3d12_swapchain_SetFullscreen
|
||||||
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenState(IDXGISwapChain3 *iface,
|
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetFullscreenState(IDXGISwapChain3 *iface,
|
||||||
BOOL *fullscreen, IDXGIOutput **target)
|
BOOL *fullscreen, IDXGIOutput **target)
|
||||||
{
|
{
|
||||||
FIXME("iface %p, fullscreen %p, target %p stub!\n", iface, fullscreen, target);
|
struct d3d12_swapchain *swapchain = d3d12_swapchain_from_IDXGISwapChain3(iface);
|
||||||
|
|
||||||
return E_NOTIMPL;
|
TRACE("iface %p, fullscreen %p, target %p.\n", iface, fullscreen, target);
|
||||||
|
|
||||||
|
if (fullscreen)
|
||||||
|
*fullscreen = !swapchain->fullscreen_desc.Windowed;
|
||||||
|
|
||||||
|
if (target)
|
||||||
|
*target = NULL;
|
||||||
|
|
||||||
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc(IDXGISwapChain3 *iface, DXGI_SWAP_CHAIN_DESC *desc)
|
static HRESULT STDMETHODCALLTYPE d3d12_swapchain_GetDesc(IDXGISwapChain3 *iface, DXGI_SWAP_CHAIN_DESC *desc)
|
||||||
|
|
|
@ -4163,7 +4163,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
|
||||||
output = NULL;
|
output = NULL;
|
||||||
fullscreen = FALSE;
|
fullscreen = FALSE;
|
||||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &output);
|
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, &output);
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
todo_wine_if(is_d3d12) ok(!!output, "Test %u: Got unexpected output.\n", i);
|
todo_wine_if(is_d3d12) ok(!!output, "Test %u: Got unexpected output.\n", i);
|
||||||
|
|
||||||
|
@ -4172,20 +4172,20 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
|
||||||
/* Still fullscreen. */
|
/* Still fullscreen. */
|
||||||
fullscreen = FALSE;
|
fullscreen = FALSE;
|
||||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
/* Calling IDXGISwapChain_Present() will exit fullscreen. */
|
/* Calling IDXGISwapChain_Present() will exit fullscreen. */
|
||||||
hr = IDXGISwapChain_Present(swapchain, 0, flags[i]);
|
hr = IDXGISwapChain_Present(swapchain, 0, flags[i]);
|
||||||
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
fullscreen = TRUE;
|
fullscreen = TRUE;
|
||||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
/* Now fullscreen mode is exited. */
|
/* Now fullscreen mode is exited. */
|
||||||
if (!flags[i] && !is_d3d12)
|
if (!flags[i] && !is_d3d12)
|
||||||
/* Still fullscreen on vista and 2008. */
|
/* Still fullscreen on vista and 2008. */
|
||||||
todo_wine ok(!fullscreen || broken(fullscreen), "Test %u: Got unexpected fullscreen status.\n", i);
|
todo_wine ok(!fullscreen || broken(fullscreen), "Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
else
|
else
|
||||||
ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
if (output)
|
if (output)
|
||||||
IDXGIOutput_Release(output);
|
IDXGIOutput_Release(output);
|
||||||
|
|
||||||
|
@ -4201,7 +4201,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
fullscreen = FALSE;
|
fullscreen = FALSE;
|
||||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
|
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
|
||||||
todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
todo_wine_if(!is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
|
@ -4217,7 +4217,7 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
|
||||||
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
fullscreen = FALSE;
|
fullscreen = FALSE;
|
||||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
todo_wine_if(is_d3d12) ok(fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
/* A visible, but with bottom z-order window still causes the
|
/* A visible, but with bottom z-order window still causes the
|
||||||
* swapchain to exit fullscreen mode. */
|
* swapchain to exit fullscreen mode. */
|
||||||
|
@ -4231,8 +4231,8 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
|
||||||
* for d3d12. */
|
* for d3d12. */
|
||||||
fullscreen = TRUE;
|
fullscreen = TRUE;
|
||||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
todo_wine_if(!is_d3d12) ok(is_d3d12 ? fullscreen : !fullscreen,
|
todo_wine ok(is_d3d12 ? fullscreen : !fullscreen,
|
||||||
"Test %u: Got unexpected fullscreen status.\n", i);
|
"Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
|
|
||||||
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
|
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
|
||||||
|
@ -4243,12 +4243,12 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
|
||||||
|
|
||||||
fullscreen = TRUE;
|
fullscreen = TRUE;
|
||||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
if (flags[i] == DXGI_PRESENT_TEST)
|
if (flags[i] == DXGI_PRESENT_TEST)
|
||||||
todo_wine_if(!is_d3d12) ok(is_d3d12 ? fullscreen : !fullscreen,
|
todo_wine ok(is_d3d12 ? fullscreen : !fullscreen,
|
||||||
"Test %u: Got unexpected fullscreen status.\n", i);
|
"Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
else
|
else
|
||||||
todo_wine ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
todo_wine_if(!is_d3d12) ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
|
|
||||||
/* Even though d3d12 doesn't exit fullscreen, a
|
/* Even though d3d12 doesn't exit fullscreen, a
|
||||||
* IDXGISwapChain_ResizeBuffers() is still needed for subsequent
|
* IDXGISwapChain_ResizeBuffers() is still needed for subsequent
|
||||||
|
@ -4302,8 +4302,8 @@ static void test_swapchain_present(IUnknown *device, BOOL is_d3d12)
|
||||||
}
|
}
|
||||||
fullscreen = TRUE;
|
fullscreen = TRUE;
|
||||||
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
hr = IDXGISwapChain_GetFullscreenState(swapchain, &fullscreen, NULL);
|
||||||
todo_wine_if(is_d3d12) ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
ok(hr == S_OK, "Test %u: Got unexpected hr %#x.\n", i, hr);
|
||||||
todo_wine ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
todo_wine_if(!is_d3d12) ok(!fullscreen, "Test %u: Got unexpected fullscreen status.\n", i);
|
||||||
|
|
||||||
DestroyWindow(occluding_window);
|
DestroyWindow(occluding_window);
|
||||||
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
|
hr = IDXGISwapChain_ResizeBuffers(swapchain, 0, 0, 0, DXGI_FORMAT_UNKNOWN, 0);
|
||||||
|
|
Loading…
Reference in New Issue