From: Zhiyi Zhang Subject: [PATCH 2/2] winex11.drv: Add DriverDateData registry property to display adapters. Message-Id: Date: Tue, 16 Jul 2019 17:37:14 +0800 Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=35345. Signed-off-by: Zhiyi Zhang --- 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 7ddaf1c10d..435c0b878c 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 */ -- 2.20.1