Commit 6dc57087 authored by Steve Lhomme's avatar Steve Lhomme Committed by 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's avatarJean-Baptiste Kempf <jb@videolan.org>
(cherry picked from commit e501dc96)
Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent 0b8b4fe6
...@@ -278,7 +278,7 @@ bool isNvidiaHardware(ID3D11Device *d3ddev) ...@@ -278,7 +278,7 @@ bool isNvidiaHardware(ID3D11Device *d3ddev)
return result; return result;
} }
#if !VLC_WINSTORE_APP
static HKEY GetAdapterRegistry(DXGI_ADAPTER_DESC *adapterDesc) static HKEY GetAdapterRegistry(DXGI_ADAPTER_DESC *adapterDesc)
{ {
HKEY hKey; HKEY hKey;
...@@ -303,6 +303,7 @@ static HKEY GetAdapterRegistry(DXGI_ADAPTER_DESC *adapterDesc) ...@@ -303,6 +303,7 @@ static HKEY GetAdapterRegistry(DXGI_ADAPTER_DESC *adapterDesc)
} }
return NULL; return NULL;
} }
#endif
int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wdmm_version *min_ver) 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 ...@@ -320,7 +321,9 @@ int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wd
return VLC_SUCCESS; return VLC_SUCCESS;
LONG err = ERROR_ACCESS_DENIED; LONG err = ERROR_ACCESS_DENIED;
#if !VLC_WINSTORE_APP #if VLC_WINSTORE_APP
return VLC_SUCCESS;
#else
TCHAR szData[256]; TCHAR szData[256];
DWORD len = 256; DWORD len = 256;
HKEY hKey = GetAdapterRegistry(&adapterDesc); HKEY hKey = GetAdapterRegistry(&adapterDesc);
...@@ -329,7 +332,6 @@ int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wd ...@@ -329,7 +332,6 @@ int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wd
err = RegQueryValueEx( hKey, TEXT("DriverVersion"), NULL, NULL, (LPBYTE) &szData, &len ); err = RegQueryValueEx( hKey, TEXT("DriverVersion"), NULL, NULL, (LPBYTE) &szData, &len );
RegCloseKey(hKey); RegCloseKey(hKey);
#endif
if (err != ERROR_SUCCESS ) if (err != ERROR_SUCCESS )
return VLC_EGENERIC; return VLC_EGENERIC;
...@@ -348,6 +350,7 @@ int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wd ...@@ -348,6 +350,7 @@ int D3D11CheckDriverVersion(ID3D11Device *d3ddev, UINT vendorId, const struct wd
build > min_ver->build))))); build > min_ver->build)))));
return newer ? VLC_SUCCESS : VLC_EGENERIC; return newer ? VLC_SUCCESS : VLC_EGENERIC;
#endif
} }
const d3d_format_t *FindD3D11Format(ID3D11Device *d3ddevice, const d3d_format_t *FindD3D11Format(ID3D11Device *d3ddevice,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment