mirror of
https://github.com/doitsujin/dxvk.git
synced 2024-12-02 01:24:11 +01:00
[dxgi] Fix GetDisplayModeList behaviour with a zero mode count
Allocate at least one array element so that we don't accidentally treat the mode list like it was NULL. Fixes a wine test failure.
This commit is contained in:
parent
2f4e4abcac
commit
f5515075f2
@ -219,7 +219,7 @@ namespace dxvk {
|
||||
std::vector<DXGI_MODE_DESC1> modes;
|
||||
|
||||
if (pDesc)
|
||||
modes.resize(*pNumModes);
|
||||
modes.resize(std::max(1u, *pNumModes));
|
||||
|
||||
HRESULT hr = GetDisplayModeList1(
|
||||
EnumFormat, Flags, pNumModes,
|
||||
|
Loading…
Reference in New Issue
Block a user