Commit 6e559fbd authored by Laurent Aimar's avatar Laurent Aimar

Store D3DCAPS9 inside vout_display_sys_t (direct3d).

parent 8f6f7a2e
......@@ -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
......
......@@ -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;
......
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