From: Zhiyi Zhang zzhang@codeweavers.com
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- This supersedes patch 165256.
dlls/dxgi/factory.c | 10 ++++++++-- dlls/dxgi/tests/dxgi.c | 6 +++--- 2 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c index 52c145bc6a8..6912fc180ea 100644 --- a/dlls/dxgi/factory.c +++ b/dlls/dxgi/factory.c @@ -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, diff --git a/dlls/dxgi/tests/dxgi.c b/dlls/dxgi/tests/dxgi.c index d123e403ca4..c5e500692cc 100644 --- a/dlls/dxgi/tests/dxgi.c +++ b/dlls/dxgi/tests/dxgi.c @@ -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);
Hi,
While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=53874
Your paranoid android.
=== w2008s64 (64 bit report) ===
dxgi: dxgi.c:4515: Test failed: Got unexpected message 0x46, hwnd 00000000000E0104, wparam 0, lparam 0x22f970. dxgi.c:4515: Test failed: Got unexpected message 0x24, hwnd 00000000000E0104, wparam 0, lparam 0x22f5e0. dxgi.c:4515: Test failed: Got unexpected message 0x1a, hwnd 00000000000E0104, wparam 0x18, lparam 0x22f998. dxgi.c:4515: Test failed: Got unexpected message 0x1a, hwnd 00000000000E0104, wparam 0x2f, lparam 0x22f998.
=== debian9 (32 bit Japanese:Japan report) ===
dxgi: dxgi: Timeout