[vlc-commits] Store D3DCAPS9 inside vout_display_sys_t (direct3d).

Laurent Aimar git at videolan.org
Thu Apr 28 23:35:07 CEST 2011


vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Apr 11 20:53:05 2011 +0200| [6e559fbd2bf4a329f9f3ec3039b1fa1c6381f1f7] | committer: Laurent Aimar

Store D3DCAPS9 inside vout_display_sys_t (direct3d).

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6e559fbd2bf4a329f9f3ec3039b1fa1c6381f1f7
---

 modules/video_output/msw/common.h   |    1 +
 modules/video_output/msw/direct3d.c |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/modules/video_output/msw/common.h b/modules/video_output/msw/common.h
index d905586..af66808 100644
--- a/modules/video_output/msw/common.h
+++ b/modules/video_output/msw/common.h
@@ -176,6 +176,7 @@ struct vout_display_sys_t
     // core objects
     HINSTANCE               hd3d9_dll;       /* handle of the opened d3d9 dll */
     LPDIRECT3D9             d3dobj;
+    D3DCAPS9                d3dcaps;
     LPDIRECT3DDEVICE9       d3ddev;
     D3DPRESENT_PARAMETERS   d3dpp;
     // scene objects
diff --git a/modules/video_output/msw/direct3d.c b/modules/video_output/msw/direct3d.c
index c15efda..4dc294c 100644
--- a/modules/video_output/msw/direct3d.c
+++ b/modules/video_output/msw/direct3d.c
@@ -464,13 +464,13 @@ static int Direct3DCreate(vout_display_t *vd)
     /*
     ** Get device capabilities
     */
-    D3DCAPS9 d3dCaps;
-    ZeroMemory(&d3dCaps, sizeof(d3dCaps));
-    HRESULT hr = IDirect3D9_GetDeviceCaps(d3dobj, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &d3dCaps);
+    ZeroMemory(&sys->d3dcaps, sizeof(sys->d3dcaps));
+    HRESULT hr = IDirect3D9_GetDeviceCaps(d3dobj, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, &sys->d3dcaps);
     if (FAILED(hr)) {
        msg_Err(vd, "Could not read adapter capabilities. (hr=0x%lX)", hr);
        return VLC_EGENERIC;
     }
+
     /* TODO: need to test device capabilities and select the right render function */
 
     return VLC_SUCCESS;



More information about the vlc-commits mailing list