[vlc-commits] D3D9: log error on D3D_Create failure

Jean-Baptiste Kempf git at videolan.org
Sun Feb 11 11:50:46 CET 2018


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sun Feb 11 11:50:29 2018 +0100| [ffbdd59c6244aaeee39e939a0b2388e5d5ee20fe] | committer: Jean-Baptiste Kempf

D3D9: log error on D3D_Create failure

Ref #19652

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ffbdd59c6244aaeee39e939a0b2388e5d5ee20fe
---

 modules/video_output/win32/direct3d9.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/win32/direct3d9.c b/modules/video_output/win32/direct3d9.c
index d60e92e7ed..3ed8fb8942 100644
--- a/modules/video_output/win32/direct3d9.c
+++ b/modules/video_output/win32/direct3d9.c
@@ -765,9 +765,13 @@ static int Direct3D9Open(vout_display_t *vd, video_format_t *fmt)
 {
     vout_display_sys_t *sys = vd->sys;
 
-    if (FAILED(D3D9_CreateDevice(vd, &sys->hd3d, sys->sys.hvideownd,
-                                 &vd->source, &sys->d3d_dev)))
+    HRESULT hr = D3D9_CreateDevice(vd, &sys->hd3d, sys->sys.hvideownd,
+                                 &vd->source, &sys->d3d_dev);
+
+    if (FAILED(hr)) {
+        msg_Err( vd, "D3D9 Creation failed! (hr=0x%0lx)", hr);
         return VLC_EGENERIC;
+    }
 
     const d3d9_device_t *p_d3d9_dev = &sys->d3d_dev;
     /* */



More information about the vlc-commits mailing list