Added patch to improve stubs for dxgi MakeWindowAssociation and GetWindowAssociation.

This commit is contained in:
Sebastian Lackner
2015-08-05 05:32:57 +02:00
parent 16a22ca25b
commit d1b4dd170a
5 changed files with 97 additions and 12 deletions

View File

@@ -0,0 +1,61 @@
From 1833c60c709550a99efa024659eb3149204d13f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Tue, 19 Aug 2014 22:47:51 +0200
Subject: dxgi: Improve stubs for MakeWindowAssociation and
GetWindowAssociation.
---
dlls/dxgi/dxgi_private.h | 1 +
dlls/dxgi/factory.c | 16 ++++++++++++++--
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
index 8703158..85c5ec1 100644
--- a/dlls/dxgi/dxgi_private.h
+++ b/dlls/dxgi/dxgi_private.h
@@ -94,6 +94,7 @@ struct dxgi_factory
IDXGIAdapter1 **adapters;
BOOL extended;
HWND device_window;
+ HWND assoc_window;
};
HRESULT dxgi_factory_create(REFIID riid, void **factory, BOOL extended) DECLSPEC_HIDDEN;
diff --git a/dlls/dxgi/factory.c b/dlls/dxgi/factory.c
index a66585e..1446557 100644
--- a/dlls/dxgi/factory.c
+++ b/dlls/dxgi/factory.c
@@ -163,16 +163,28 @@ static HRESULT STDMETHODCALLTYPE dxgi_factory_EnumAdapters(IDXGIFactory1 *iface,
static HRESULT STDMETHODCALLTYPE dxgi_factory_MakeWindowAssociation(IDXGIFactory1 *iface, HWND window, UINT flags)
{
+ struct dxgi_factory *factory = impl_from_IDXGIFactory1(iface);
+
FIXME("iface %p, window %p, flags %#x stub!\n", iface, window, flags);
- return E_NOTIMPL;
+ if (!window && flags)
+ return DXGI_ERROR_INVALID_CALL;
+
+ factory->assoc_window = window;
+ return S_OK;
}
static HRESULT STDMETHODCALLTYPE dxgi_factory_GetWindowAssociation(IDXGIFactory1 *iface, HWND *window)
{
+ struct dxgi_factory *factory = impl_from_IDXGIFactory1(iface);
+
FIXME("iface %p, window %p stub!\n", iface, window);
- return E_NOTIMPL;
+ if (!window)
+ return DXGI_ERROR_INVALID_CALL;
+
+ *window = factory->assoc_window;
+ return S_OK;
}
static UINT dxgi_rational_to_uint(const DXGI_RATIONAL *rational)
--
2.5.0

View File

@@ -0,0 +1 @@
Fixes: Improve stubs for dxgi MakeWindowAssociation and GetWindowAssociation