Module: wine
Branch: master
Commit: 7d70d459842d7fd09352314b8bfea7216f87a89e
URL:
https://source.winehq.org/git/wine.git/?a=commit;h=7d70d459842d7fd09352314b…
Author: Zhiyi Zhang <zzhang(a)codeweavers.com>
Date: Tue Jul 16 17:37:14 2019 +0800
winex11.drv: Add DriverDateData registry property to display adapters.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=35345.
Signed-off-by: Zhiyi Zhang <zzhang(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winex11.drv/display.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c
index 7ddaf1c..435c0b8 100644
--- a/dlls/winex11.drv/display.c
+++ b/dlls/winex11.drv/display.c
@@ -45,6 +45,7 @@ DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_RCMONITOR, 0x233a9ef3, 0xafc4,
0x4abd,
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_RCWORK, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64,
0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 4);
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5,
0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 5);
+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_descW[] =
{'D','r','i','v','e','r','D','e','s','c',0};
static const WCHAR displayW[] =
{'D','I','S','P','L','A','Y',0};
static const WCHAR pciW[] = {'P','C','I',0};
@@ -126,6 +127,7 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu
*gpu, INT g
INT written;
DWORD size;
BOOL ret = FALSE;
+ FILETIME filetime;
sprintfW(instanceW, gpu_instance_fmtW, gpu->vendor_id, gpu->device_id,
gpu->subsys_id, gpu->revision_id, gpu_index);
if (!SetupDiOpenDeviceInfoW(devinfo, instanceW, NULL, 0, &device_data))
@@ -155,6 +157,11 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu
*gpu, INT g
if (RegSetValueExW(hkey, driver_descW, 0, REG_SZ, (const BYTE *)gpu->name,
(strlenW(gpu->name) + 1) * sizeof(WCHAR)))
goto done;
+ /* Write DriverDateData value, using current time as driver date, needed by Evoland
*/
+ GetSystemTimeAsFileTime(&filetime);
+ if (RegSetValueExW(hkey, driver_date_dataW, 0, REG_BINARY, (BYTE *)&filetime,
sizeof(filetime)))
+ goto done;
+
RegCloseKey(hkey);
/* Retrieve driver value for adapters */