mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-03-02 04:29:14 +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;
|
std::vector<DXGI_MODE_DESC1> modes;
|
||||||
|
|
||||||
if (pDesc)
|
if (pDesc)
|
||||||
modes.resize(*pNumModes);
|
modes.resize(std::max(1u, *pNumModes));
|
||||||
|
|
||||||
HRESULT hr = GetDisplayModeList1(
|
HRESULT hr = GetDisplayModeList1(
|
||||||
EnumFormat, Flags, pNumModes,
|
EnumFormat, Flags, pNumModes,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user