[vlc-commits] direct3d9: add hwnd in d3dctx
Thomas Guillem
git at videolan.org
Mon Nov 13 13:12:14 CET 2017
vlc | branch: master | Thomas Guillem <thomas at gllm.fr> | Wed Nov 8 19:09:52 2017 +0100| [172414bafcaa3a8847b1eb475c4a3f4a85fc154a] | committer: Thomas Guillem
direct3d9: add hwnd in d3dctx
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=172414bafcaa3a8847b1eb475c4a3f4a85fc154a
---
modules/video_output/win32/direct3d9.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index 6bf54ec43b..d4088e72ce 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -136,6 +136,7 @@ struct d3dctx
};
D3DPRESENT_PARAMETERS pp;
D3DCAPS9 caps;
+ HWND hwnd;
bool use_ex;
};
@@ -854,7 +855,7 @@ static int Direct3D9FillPresentationParameters(vout_display_t *vd)
ZeroMemory(d3dpp, sizeof(D3DPRESENT_PARAMETERS));
d3dpp->Flags = D3DPRESENTFLAG_VIDEO;
d3dpp->Windowed = TRUE;
- d3dpp->hDeviceWindow = vd->sys->sys.hvideownd;
+ d3dpp->hDeviceWindow = vd->sys->d3dctx.hwnd;
d3dpp->BackBufferWidth = __MAX((unsigned int)GetSystemMetrics(SM_CXVIRTUALSCREEN),
vd->source.i_width);
d3dpp->BackBufferHeight = __MAX((unsigned int)GetSystemMetrics(SM_CYVIRTUALSCREEN),
@@ -887,6 +888,8 @@ static int Direct3D9Open(vout_display_t *vd, video_format_t *fmt)
{
vout_display_sys_t *sys = vd->sys;
+ sys->d3dctx.hwnd = sys->sys.hvideownd;
+
if (Direct3D9FillPresentationParameters(vd))
return VLC_EGENERIC;
More information about the vlc-commits
mailing list