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@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
d5e24897e2
commit
7d70d45984
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue