vlc | branch: master | Steve Lhomme <[email protected]> | Wed Jul 3 09:28:21 2019 +0200| [c3ebcb368968b0939940d452dc4ac26a54a74916] | committer: Steve Lhomme
d3d9_fmt: check that the external device is a IDirect3D9Ex or not We need to know for OpenGL compatibility > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=c3ebcb368968b0939940d452dc4ac26a54a74916 --- modules/video_chroma/d3d9_fmt.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c index e7579abf12..566140a971 100644 --- a/modules/video_chroma/d3d9_fmt.c +++ b/modules/video_chroma/d3d9_fmt.c @@ -25,6 +25,7 @@ #include <assert.h> +#include <initguid.h> #include "d3d9_fmt.h" typedef picture_sys_d3d9_t VA_PICSYS; @@ -269,5 +270,9 @@ void D3D9_CloneExternal(d3d9_handle_t *hd3d, IDirect3D9 *dev) hd3d->obj = dev; IDirect3D9_AddRef( hd3d->obj ); hd3d->hdll = NULL; - hd3d->use_ex = false; /* we don't care */ + + void *pv = NULL; + hd3d->use_ex = SUCCEEDED(IDirect3D9_QueryInterface(dev, &IID_IDirect3D9Ex, &pv)); + if (hd3d->use_ex && pv) + IDirect3D9Ex_Release((IDirect3D9Ex*) pv); } _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
