Commit 3c630291 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

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: 's avatarRémi Bernon <rbernon@codeweavers.com> Signed-off-by: 's avatarHans Leidekker <hans@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 4b9d3909
...@@ -3878,8 +3878,9 @@ static enum fill_status fill_videocontroller( struct table *table, const struct ...@@ -3878,8 +3878,9 @@ static enum fill_status fill_videocontroller( struct table *table, const struct
hr = IDXGIAdapter_GetDesc( adapter, &desc ); hr = IDXGIAdapter_GetDesc( adapter, &desc );
if (SUCCEEDED(hr)) if (SUCCEEDED(hr))
{ {
vidmem = desc.DedicatedVideoMemory; if (desc.DedicatedVideoMemory > UINT_MAX) vidmem = 0xfff00000;
name = desc.Description; else vidmem = desc.DedicatedVideoMemory;
name = desc.Description;
} }
done: done:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment