1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-14 22:29:15 +01:00

[dxgi] Fix GetDisplayModeList1 output for DXGI_FORMAT_UNKNOWN

Fixes a wine test failure.
This commit is contained in:
Philip Rebohle 2019-10-01 21:48:13 +02:00
parent f5515075f2
commit cd82669a85
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -246,6 +246,12 @@ namespace dxvk {
if (pNumModes == nullptr) if (pNumModes == nullptr)
return DXGI_ERROR_INVALID_CALL; return DXGI_ERROR_INVALID_CALL;
// Special case, just return zero modes
if (EnumFormat == DXGI_FORMAT_UNKNOWN) {
*pNumModes = 0;
return S_OK;
}
// Query monitor info to get the device name // Query monitor info to get the device name
::MONITORINFOEXW monInfo; ::MONITORINFOEXW monInfo;
monInfo.cbSize = sizeof(monInfo); monInfo.cbSize = sizeof(monInfo);