From b6d2db759bed60e8971e08c8ae952a98b4d9b8de Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 18 Aug 2016 16:57:03 -0700 Subject: [PATCH] Minor fix for when -gpu switch not provided --- Texconv/texconv.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp index 4a5abed..b69bad0 100644 --- a/Texconv/texconv.cpp +++ b/Texconv/texconv.cpp @@ -618,7 +618,9 @@ bool CreateDevice( int adapter, _Outptr_ ID3D11Device** pDevice ) } D3D_FEATURE_LEVEL fl; - HRESULT hr = s_DynamicD3D11CreateDevice( pAdapter.Get(), D3D_DRIVER_TYPE_UNKNOWN, nullptr, createDeviceFlags, featureLevels, _countof(featureLevels), + HRESULT hr = s_DynamicD3D11CreateDevice( pAdapter.Get(), + (pAdapter) ? D3D_DRIVER_TYPE_UNKNOWN : D3D_DRIVER_TYPE_HARDWARE, + nullptr, createDeviceFlags, featureLevels, _countof(featureLevels), D3D11_SDK_VERSION, pDevice, &fl, nullptr ); if ( SUCCEEDED(hr) ) {