[vlc-commits] d3d11_fmt: consider drivers are always OK on the Winstore builds

Steve Lhomme git at videolan.org
Mon Dec 4 01:17:10 CET 2017


vlc/vlc-3.0 | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Fri Dec  1 11:30:11 2017 +0100| [6dc57087c4b907d67e5d924f7200f3035faa7a4a] | committer: Jean-Baptiste Kempf

d3d11_fmt: consider drivers are always OK on the Winstore builds

Too bad if they're not, there's no way to check.

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
(cherry picked from commit e501dc96a1e30a19ca5cc5d18b5d100ec4512369)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_chroma/d3d11_fmt.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 978ec91a73..8d3b3bd848 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -278,7 +278,7 @@ bool isNvidiaHardware(ID3D11Device *d3ddev)
     return result;
 }
 
-
+#if !VLC_WINSTORE_APP
 static HKEY GetAdapterRegistry(DXGI_ADAPTER_DESC *adapterDesc)
 {
     HKEY hKey;
@@ -303,6 +303,7 @@ static HKEY GetAdapterRegistry(DXGI_ADAPTER_DESC *adapterDesc)
     }
     return NULL;
 }
+#endif
 
 int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wdmm_version *min_ver)
 {
@@ -320,7 +321,9 @@ int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wd
         return VLC_SUCCESS;
 
     LONG err = ERROR_ACCESS_DENIED;
-#if !VLC_WINSTORE_APP
+#if VLC_WINSTORE_APP
+    return VLC_SUCCESS;
+#else
     TCHAR szData[256];
     DWORD len = 256;
     HKEY hKey = GetAdapterRegistry(&adapterDesc);
@@ -329,7 +332,6 @@ int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wd
 
     err = RegQueryValueEx( hKey, TEXT("DriverVersion"), NULL, NULL, (LPBYTE) &szData, &len );
     RegCloseKey(hKey);
-#endif
 
     if (err != ERROR_SUCCESS )
         return VLC_EGENERIC;
@@ -348,6 +350,7 @@ int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wd
                                                        build > min_ver->build)))));
 
     return newer ? VLC_SUCCESS : VLC_EGENERIC;
+#endif
 }
 
 const d3d_format_t *FindD3D11Format(ID3D11Device *d3ddevice,



More information about the vlc-commits mailing list