=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: dxgi: Implement dxgi_swapchain_GetFullscreenState().

Alexandre Julliard julliard at winehq.org
Wed Aug 3 18:09:17 CDT 2016


Module: wine
Branch: master
Commit: f586cc98a02b140678ceb59a3021bacdd90a36d6
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=f586cc98a02b140678ceb59a3021bacdd90a36d6

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Aug  3 09:41:40 2016 +0200

dxgi: Implement dxgi_swapchain_GetFullscreenState().

Signed-off-by: Józef Kucia <jkucia at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dxgi/dxgi_private.h |  3 +++
 dlls/dxgi/swapchain.c    | 18 ++++++++++++++++--
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/dlls/dxgi/dxgi_private.h b/dlls/dxgi/dxgi_private.h
index 680f835..7148811 100644
--- a/dlls/dxgi/dxgi_private.h
+++ b/dlls/dxgi/dxgi_private.h
@@ -160,6 +160,9 @@ struct dxgi_swapchain
     struct wined3d_swapchain *wined3d_swapchain;
     IWineDXGIDevice *device;
     IDXGIFactory *factory;
+
+    BOOL fullscreen;
+    IDXGIOutput *target;
 };
 
 HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device *device,
diff --git a/dlls/dxgi/swapchain.c b/dlls/dxgi/swapchain.c
index 54bd52d..6b80ead 100644
--- a/dlls/dxgi/swapchain.c
+++ b/dlls/dxgi/swapchain.c
@@ -212,9 +212,21 @@ static HRESULT STDMETHODCALLTYPE DECLSPEC_HOTPATCH dxgi_swapchain_SetFullscreenS
 static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetFullscreenState(IDXGISwapChain *iface,
         BOOL *fullscreen, IDXGIOutput **target)
 {
-    FIXME("iface %p, fullscreen %p, target %p stub!\n", iface, fullscreen, target);
+    struct dxgi_swapchain *swapchain = impl_from_IDXGISwapChain(iface);
 
-    return E_NOTIMPL;
+    TRACE("iface %p, fullscreen %p, target %p.\n", iface, fullscreen, target);
+
+    if (fullscreen)
+        *fullscreen = swapchain->fullscreen;
+
+    if (target)
+    {
+        *target = swapchain->target;
+        if (*target)
+            IDXGIOutput_AddRef(*target);
+    }
+
+    return S_OK;
 }
 
 static HRESULT STDMETHODCALLTYPE dxgi_swapchain_GetDesc(IDXGISwapChain *iface, DXGI_SWAP_CHAIN_DESC *desc)
@@ -408,6 +420,8 @@ HRESULT dxgi_swapchain_init(struct dxgi_swapchain *swapchain, struct dxgi_device
 
     swapchain->IDXGISwapChain_iface.lpVtbl = &dxgi_swapchain_vtbl;
     swapchain->refcount = 1;
+    swapchain->fullscreen = FALSE;
+    swapchain->target = NULL;
     wined3d_mutex_lock();
     wined3d_private_store_init(&swapchain->private_store);
 




More information about the wine-cvs mailing list