[vlc-devel] [PATCH 7/7] direct3d9: don't bind the IDirect3DDevice9 to an existing HWND
Steve Lhomme
robux4 at ycbcr.xyz
Wed Jun 26 15:49:04 CEST 2019
It works as long as we provide the window we draw in during the Present call.
---
modules/video_output/win32/direct3d9.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index bbbfcefad0..32b442039a 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -1363,9 +1363,9 @@ static void Swap(vout_display_t *vd)
HRESULT hr;
if (sys->hd3d.use_ex) {
- hr = IDirect3DDevice9Ex_PresentEx(p_d3d9_dev->devex, &src, &src, NULL, NULL, 0);
+ hr = IDirect3DDevice9Ex_PresentEx(p_d3d9_dev->devex, &src, &src, sys->sys.hvideownd, NULL, 0);
} else {
- hr = IDirect3DDevice9_Present(p_d3d9_dev->dev, &src, &src, NULL, NULL);
+ hr = IDirect3DDevice9_Present(p_d3d9_dev->dev, &src, &src, sys->sys.hvideownd, NULL);
}
if (FAILED(hr)) {
msg_Dbg(vd, "Failed Present: 0x%lX", hr);
@@ -1677,7 +1677,7 @@ static int Open(vout_display_t *vd, const vout_display_cfg_t *cfg,
goto error;
}
HRESULT hr = D3D9_CreateDeviceExternal(d3d9_device, &sys->hd3d,
- sys->sys.hvideownd,
+ NULL,
&sys->d3d_dev);
if (FAILED(hr)) {
msg_Err( vd, "D3D9 Creation failed! (hr=0x%lX)", hr);
--
2.17.1
More information about the vlc-devel
mailing list