diff --git a/source/blender/blenlib/CMakeLists.txt b/source/blender/blenlib/CMakeLists.txt index 49cc426b43f..315a49679a4 100644 --- a/source/blender/blenlib/CMakeLists.txt +++ b/source/blender/blenlib/CMakeLists.txt @@ -445,7 +445,6 @@ if(WIN32) ) list(APPEND LIB bf_intern_utfconv - dxguid dxgi ) list(APPEND SRC diff --git a/source/blender/blenlib/intern/winstuff.cc b/source/blender/blenlib/intern/winstuff.cc index ee3e1ca72af..777799d148d 100644 --- a/source/blender/blenlib/intern/winstuff.cc +++ b/source/blender/blenlib/intern/winstuff.cc @@ -458,27 +458,25 @@ bool BLI_windows_get_directx_driver_version(const wchar_t *deviceSubString, { IDXGIFactory *pFactory = NULL; IDXGIAdapter *pAdapter = NULL; - if (CreateDXGIFactory(&IID_IDXGIFactory, (void **)&pFactory) == S_OK) { - for (UINT i = 0; IDXGIFactory_EnumAdapters(pFactory, i, &pAdapter) != DXGI_ERROR_NOT_FOUND; - ++i) { + if (CreateDXGIFactory(__uuidof(IDXGIFactory), (void **)&pFactory) == S_OK) { + for (UINT i = 0; pFactory->EnumAdapters(i, &pAdapter) != DXGI_ERROR_NOT_FOUND; ++i) { LARGE_INTEGER version; - if (IDXGIAdapter_CheckInterfaceSupport(pAdapter, &IID_IDXGIDevice, &version) == S_OK) { + if (pAdapter->CheckInterfaceSupport(__uuidof(IDXGIDevice), &version) == S_OK) { DXGI_ADAPTER_DESC desc; - if (IDXGIAdapter_GetDesc(pAdapter, &desc) == S_OK) { + if (pAdapter->GetDesc(&desc) == S_OK) { if (wcsstr(desc.Description, deviceSubString)) { *r_driverVersion = version.QuadPart; - IDXGIAdapter_Release(pAdapter); - IDXGIFactory_Release(pFactory); + pAdapter->Release(); + pFactory->Release(); return true; } } } - IDXGIAdapter_Release(pAdapter); + pAdapter->Release(); } - - IDXGIFactory_Release(pFactory); + pFactory->Release(); } return false;