[PATCH v2 3/4] winex11: Add ProviderName registry property to display adapters.

Matteo Bruni mbruni at codeweavers.com
Thu Oct 1 04:01:13 CDT 2020


Signed-off-by: Matteo Bruni <mbruni at codeweavers.com>
---
v2: Report NVIDIA as the provider when the vendor ID matches
(as suggested by Paul).

 dlls/winex11.drv/display.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c
index 918339b05f31..a2692e88ef62 100644
--- a/dlls/winex11.drv/display.c
+++ b/dlls/winex11.drv/display.c
@@ -54,6 +54,7 @@ static const WCHAR driver_date_dataW[] = {'D','r','i','v','e','r','D','a','t','e
 static const WCHAR driver_dateW[] = {'D','r','i','v','e','r','D','a','t','e',0};
 static const WCHAR driver_descW[] = {'D','r','i','v','e','r','D','e','s','c',0};
 static const WCHAR driver_versionW[] = {'D','r','i','v','e','r','V','e','r','s','i','o','n',0};
+static const WCHAR provider_nameW[] = {'P','r','o','v','i','d','e','r','N','a','m','e',0};
 static const WCHAR displayW[] = {'D','I','S','P','L','A','Y',0};
 static const WCHAR pciW[] = {'P','C','I',0};
 static const WCHAR video_idW[] = {'V','i','d','e','o','I','D',0};
@@ -111,6 +112,8 @@ static const WCHAR monitor_hardware_idW[] = {
     'D','e','f','a','u','l','t','_','M','o','n','i','t','o','r',0,0};
 static const WCHAR driver_date_fmtW[] = {'%','u','-','%','u','-','%','u',0};
 static const WCHAR driver_version_fallbackW[] ={'2','6','.','2','0','.','1','5','0','0','2','.','6','1',0};
+static const WCHAR provider_name_amdW[] ={'A','d','v','a','n','c','e','d',' ','M','i','c','r','o',' ','D','e','v','i','c','e','s',',',' ','I','n','c','.',0};
+static const WCHAR provider_name_nvidiaW[] ={'N','V','I','D','I','A',0};
 
 static struct x11drv_display_device_handler host_handler;
 struct x11drv_display_device_handler desktop_handler;
@@ -482,6 +485,19 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g
                        sizeof(driver_version_fallbackW)))
         goto done;
 
+    if (gpu->vendor_id == 0x10de)
+    {
+        if (RegSetValueExW(hkey, provider_nameW, 0, REG_SZ, (const BYTE *)provider_name_nvidiaW,
+                           sizeof(provider_name_nvidiaW)))
+            goto done;
+    }
+    else
+    {
+        if (RegSetValueExW(hkey, provider_nameW, 0, REG_SZ, (const BYTE *)provider_name_amdW,
+                           sizeof(provider_name_amdW)))
+            goto done;
+    }
+
     RegCloseKey(hkey);
 
     /* Retrieve driver value for adapters */
-- 
2.26.2




More information about the wine-devel mailing list