[vlc-commits] direct3d11: init the common window before setting the internal swapchain values
Steve Lhomme
git at videolan.org
Wed Jun 5 17:39:20 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jun 5 17:12:50 2019 +0200| [932e0e47c1c73d0f56e47ac29bdf84406a7d05b7] | committer: Steve Lhomme
direct3d11: init the common window before setting the internal swapchain values
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=932e0e47c1c73d0f56e47ac29bdf84406a7d05b7
---
modules/video_output/win32/direct3d11.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index 44ba25fd0c..f0054b0f3c 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -683,17 +683,6 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
if ( sys->setupDeviceCb == NULL || sys->swapCb == NULL || sys->startEndRenderingCb == NULL || sys->updateOutputCb == NULL )
{
- /* use our internal swapchain callbacks */
- sys->internal_swapchain.obj = VLC_OBJECT(vd);
- sys->internal_swapchain.hd3d = &sys->hd3d;
- sys->outside_opaque = &sys->internal_swapchain;
- sys->setupDeviceCb = LocalSwapchainSetupDevice;
- sys->cleanupDeviceCb = LocalSwapchainCleanupDevice;
- sys->updateOutputCb = LocalSwapchainUpdateOutput;
- sys->swapCb = LocalSwapchainSwap;
- sys->startEndRenderingCb = LocalSwapchainStartEndRendering;
- sys->selectPlaneCb = LocalSwapchainSelectPlane;
-
#if VLC_WINSTORE_APP
/* LEGACY, the d3dcontext and swapchain were given by the host app */
if (var_InheritInteger(vd, "winrt-d3dcontext") == 0)
@@ -707,6 +696,17 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
goto error;
sys->internal_swapchain.swapchainHwnd = sys->sys.hvideownd;
#endif /* !VLC_WINSTORE_APP */
+
+ /* use our internal swapchain callbacks */
+ sys->internal_swapchain.obj = VLC_OBJECT(vd);
+ sys->internal_swapchain.hd3d = &sys->hd3d;
+ sys->outside_opaque = &sys->internal_swapchain;
+ sys->setupDeviceCb = LocalSwapchainSetupDevice;
+ sys->cleanupDeviceCb = LocalSwapchainCleanupDevice;
+ sys->updateOutputCb = LocalSwapchainUpdateOutput;
+ sys->swapCb = LocalSwapchainSwap;
+ sys->startEndRenderingCb = LocalSwapchainStartEndRendering;
+ sys->selectPlaneCb = LocalSwapchainSelectPlane;
}
if (vd->source.projection_mode != PROJECTION_MODE_RECTANGULAR && sys->sys.hvideownd)
More information about the vlc-commits
mailing list