From b906eb37ed7f08a52accc81f8c49bce57ec27561 Mon Sep 17 00:00:00 2001 From: James Ross-Gowan Date: Thu, 9 Jun 2016 00:01:58 +1000 Subject: hwdec_d3d11eglrgb: reduce log level when probing When using --hwdec=auto, systems that don't provide D3D11_CREATE_DEVICE_VIDEO_SUPPORT, which probably includes all Windows Vista and 7 systems, will print an error message. Reduce the log level to verbose when probing and skip the error message entirely if d3d11.dll is not present. This commit is in a similar spirit to 991af7d. --- video/out/opengl/hwdec_d3d11eglrgb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'video/out/opengl/hwdec_d3d11eglrgb.c') diff --git a/video/out/opengl/hwdec_d3d11eglrgb.c b/video/out/opengl/hwdec_d3d11eglrgb.c index 10470c2bf8..33d37af5b8 100644 --- a/video/out/opengl/hwdec_d3d11eglrgb.c +++ b/video/out/opengl/hwdec_d3d11eglrgb.c @@ -125,7 +125,8 @@ static int create(struct gl_hwdec *hw) HANDLE d3d11_dll = GetModuleHandleW(L"d3d11.dll"); if (!d3d11_dll) { - MP_ERR(hw, "Failed to load D3D11 library\n"); + if (!hw->probing) + MP_ERR(hw, "Failed to load D3D11 library\n"); goto fail; } @@ -138,8 +139,9 @@ static int create(struct gl_hwdec *hw) D3D11_CREATE_DEVICE_VIDEO_SUPPORT, NULL, 0, D3D11_SDK_VERSION, &p->d3d11_device, NULL, NULL); if (FAILED(hr)) { - MP_ERR(hw, "Failed to create D3D11 Device: %s\n", - mp_HRESULT_to_str(hr)); + int lev = hw->probing ? MSGL_V : MSGL_ERR; + mp_msg(hw->log, lev, "Failed to create D3D11 Device: %s\n", + mp_HRESULT_to_str(hr)); goto fail; } -- cgit v1.2.3