1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 20:06:18 +00:00

wbemprox: Report 4095MiB video memory if it overflows.

That's what Windows do apparently. Anything with more than 4GiB of VRAM
would report less otherwise, confusing the VRAM detection in some games.

The Mafia III launcher is trying to open a warning popup with a 8GiB
VRAM GPU for instance, as the reported value overflows to 0.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2020-09-30 12:37:40 +02:00 committed by Alexandre Julliard
parent 4b9d3909b8
commit 3c63029180

View File

@ -3878,8 +3878,9 @@ static enum fill_status fill_videocontroller( struct table *table, const struct
hr = IDXGIAdapter_GetDesc( adapter, &desc );
if (SUCCEEDED(hr))
{
vidmem = desc.DedicatedVideoMemory;
name = desc.Description;
if (desc.DedicatedVideoMemory > UINT_MAX) vidmem = 0xfff00000;
else vidmem = desc.DedicatedVideoMemory;
name = desc.Description;
}
done: