Commit 172414ba authored by Thomas Guillem's avatar Thomas Guillem

direct3d9: add hwnd in d3dctx

parent a84e5591
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment