[vlc-commits] direct3d11: pass the D3D11 handle to the internal swapchain callbacks

Steve Lhomme git at videolan.org
Thu May 9 15:31:17 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu May  9 13:44:14 2019 +0200| [73d03d93ae723d4f607dc3df0792f34dc2645292] | committer: Steve Lhomme

direct3d11: pass the D3D11 handle to the internal swapchain callbacks

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

 modules/video_output/win32/direct3d11.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 1fc16e9fe3..5d66e36e3d 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -106,6 +106,7 @@ typedef struct {
 struct d3d11_local_swapchain
 {
     vlc_object_t           *obj;
+    d3d11_handle_t         *hd3d;
     d3d11_device_t         d3d_dev;
 
     const d3d_format_t     *pixelFormat;
@@ -522,8 +523,7 @@ static bool LocalSwapchainSetupDevice( void *opaque, const struct device_cfg_t *
                                          cfg->hardware_decoding,
                                          &display->d3d_dev );
 #else /* !VLC_WINSTORE_APP */
-    vout_display_sys_t *sys = vd->sys;
-    hr = D3D11_CreateDevice( display->obj, &sys->hd3d, NULL,
+    hr = D3D11_CreateDevice( display->obj, display->hd3d, NULL,
                              cfg->hardware_decoding,
                              &display->d3d_dev );
 #endif /* !VLC_WINSTORE_APP */
@@ -610,6 +610,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
     if (sys->swapCb == NULL || sys->startEndRenderingCb == NULL || sys->updateOutputCb == NULL)
     {
         sys->internal_swapchain.obj = VLC_OBJECT(vd);
+        sys->internal_swapchain.hd3d =  &sys->hd3d;
         sys->outside_opaque = vd;
         sys->setupDeviceCb       = LocalSwapchainSetupDevice;
         sys->cleanupDeviceCb     = LocalSwapchainCleanupDevice;



More information about the vlc-commits mailing list