Commit 6c3c5b23 authored by Zhiyi Zhang's avatar Zhiyi Zhang Committed by Alexandre Julliard

dxgi: Implement dxgi_factory_GetWindowAssociation().

parent 434b6fe0
......@@ -181,9 +181,15 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IWineDXGIFac
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IWineDXGIFactory *iface, HWND *window)
{
FIXME("iface %p, window %p stub!\n", iface, window);
TRACE("iface %p, window %p.\n", iface, window);
return E_NOTIMPL;
if (!window)
return DXGI_ERROR_INVALID_CALL;
/* The tests show that this always returns NULL for some unknown reason. */
*window = NULL;
return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_factory_CreateSwapChain(IWineDXGIFactory *iface,
......
......@@ -5064,7 +5064,7 @@ static void test_window_association(void)
refcount = IDXGIAdapter_Release(adapter);
hr = IDXGIFactory_GetWindowAssociation(factory, NULL);
todo_wine ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
ok(hr == DXGI_ERROR_INVALID_CALL, "Got unexpected hr %#x.\n", hr);
for (i = 0; i <= DXGI_MWA_VALID; ++i)
{
......@@ -5080,11 +5080,11 @@ static void test_window_association(void)
hwnd = (HWND)0xdeadbeef;
hr = IDXGIFactory_GetWindowAssociation(factory, &hwnd);
todo_wine ok(hr == S_OK, "Got unexpected hr %#x for flags %#x.\n", hr, i);
ok(hr == S_OK, "Got unexpected hr %#x for flags %#x.\n", hr, i);
/* Apparently GetWindowAssociation() always returns NULL, even when
* MakeWindowAssociation() and GetWindowAssociation() are both
* successfully called. */
todo_wine ok(!hwnd, "Expect null associated window.\n");
ok(!hwnd, "Expect null associated window.\n");
}
hr = IDXGIFactory_MakeWindowAssociation(factory, swapchain_desc.OutputWindow, DXGI_MWA_VALID + 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment