[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-cvs
Subject:    =?UTF-8?Q?R=C3=A9mi_Bernon_=3A_wbemprox=3A_Report_4095MiB_video_memory_if?= =?UTF-8?Q?_it_overflows=
From:       Alexandre Julliard <julliard () winehq ! org>
Date:       2020-09-30 19:35:30
Message-ID: E1kNhsw-0002fA-56 () winehq ! org
[Download RAW message or body]

Module: wine
Branch: master
Commit: 3c63029180bd86011b34b530e754dffdf532752d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3c63029180bd86011b34b530e754dffdf532752d

Author: Rémi Bernon <rbernon@codeweavers.com>
Date:   Wed Sep 30 12:37:40 2020 +0200

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>

---

 dlls/wbemprox/builtin.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/dlls/wbemprox/builtin.c b/dlls/wbemprox/builtin.c
index 4326822193..8daa55eaeb 100644
--- a/dlls/wbemprox/builtin.c
+++ b/dlls/wbemprox/builtin.c
@@ -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:


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic