From: Matteo Bruni Subject: [PATCH v2 2/4] winex11: Add DriverVersion registry property to display adapters. Message-Id: <20201001090114.3446199-2-mbruni@codeweavers.com> Date: Thu, 1 Oct 2020 11:01:12 +0200 In-Reply-To: <20201001090114.3446199-1-mbruni@codeweavers.com> References: <20201001090114.3446199-1-mbruni@codeweavers.com> Signed-off-by: Matteo Bruni --- I picked the more or less current version of the AMD driver for the time being. I think we should eventually move wined3d's GPU driver detection and override stuff to the display drivers (TBD how to share the code between the different drivers) so that everything has the same consistent view. dlls/winex11.drv/display.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index cf55a5c1fb67..918339b05f31 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -53,6 +53,7 @@ DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, 0x233a9ef3, 0xafc4, 0x4ab static const WCHAR driver_date_dataW[] = {'D','r','i','v','e','r','D','a','t','e','D','a','t','a',0}; 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 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}; @@ -109,6 +110,7 @@ static const WCHAR monitor_hardware_idW[] = { 'M','O','N','I','T','O','R','\\', '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 struct x11drv_display_device_handler host_handler; struct x11drv_display_device_handler desktop_handler; @@ -476,6 +478,10 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g if (RegSetValueExW(hkey, driver_dateW, 0, REG_SZ, (BYTE *)bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR))) goto done; + if (RegSetValueExW(hkey, driver_versionW, 0, REG_SZ, (const BYTE *)driver_version_fallbackW, + sizeof(driver_version_fallbackW))) + goto done; + RegCloseKey(hkey); /* Retrieve driver value for adapters */ -- 2.26.2