winex11: Add DriverDate registry property to display adapters.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com> Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
cdf013b9b9
commit
bd27af974a
|
@ -51,6 +51,7 @@ DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_RCWORK, 0x233a9ef3, 0xafc4, 0x4abd, 0x
|
||||||
DEFINE_DEVPROPKEY(WINE_DEVPROPKEY_MONITOR_ADAPTERNAME, 0x233a9ef3, 0xafc4, 0x4abd, 0xb5, 0x64, 0xc3, 0x2f, 0x21, 0xf1, 0x53, 0x5b, 5);
|
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_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_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 displayW[] = {'D','I','S','P','L','A','Y',0};
|
||||||
static const WCHAR pciW[] = {'P','C','I',0};
|
static const WCHAR pciW[] = {'P','C','I',0};
|
||||||
|
@ -107,6 +108,7 @@ static const WCHAR monitor_instance_fmtW[] = {
|
||||||
static const WCHAR monitor_hardware_idW[] = {
|
static const WCHAR monitor_hardware_idW[] = {
|
||||||
'M','O','N','I','T','O','R','\\',
|
'M','O','N','I','T','O','R','\\',
|
||||||
'D','e','f','a','u','l','t','_','M','o','n','i','t','o','r',0,0};
|
'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 struct x11drv_display_device_handler host_handler;
|
static struct x11drv_display_device_handler host_handler;
|
||||||
struct x11drv_display_device_handler desktop_handler;
|
struct x11drv_display_device_handler desktop_handler;
|
||||||
|
@ -403,14 +405,15 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g
|
||||||
SP_DEVINFO_DATA device_data = {sizeof(device_data)};
|
SP_DEVINFO_DATA device_data = {sizeof(device_data)};
|
||||||
WCHAR instanceW[MAX_PATH];
|
WCHAR instanceW[MAX_PATH];
|
||||||
DEVPROPTYPE property_type;
|
DEVPROPTYPE property_type;
|
||||||
|
SYSTEMTIME systemtime;
|
||||||
WCHAR bufferW[1024];
|
WCHAR bufferW[1024];
|
||||||
|
FILETIME filetime;
|
||||||
HKEY hkey = NULL;
|
HKEY hkey = NULL;
|
||||||
GUID guid;
|
GUID guid;
|
||||||
LUID luid;
|
LUID luid;
|
||||||
INT written;
|
INT written;
|
||||||
DWORD size;
|
DWORD size;
|
||||||
BOOL ret = FALSE;
|
BOOL ret = FALSE;
|
||||||
FILETIME filetime;
|
|
||||||
|
|
||||||
TRACE("GPU id:0x%s name:%s.\n", wine_dbgstr_longlong(gpu->id), wine_dbgstr_w(gpu->name));
|
TRACE("GPU id:0x%s name:%s.\n", wine_dbgstr_longlong(gpu->id), wine_dbgstr_w(gpu->name));
|
||||||
|
|
||||||
|
@ -468,6 +471,11 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g
|
||||||
if (RegSetValueExW(hkey, driver_date_dataW, 0, REG_BINARY, (BYTE *)&filetime, sizeof(filetime)))
|
if (RegSetValueExW(hkey, driver_date_dataW, 0, REG_BINARY, (BYTE *)&filetime, sizeof(filetime)))
|
||||||
goto done;
|
goto done;
|
||||||
|
|
||||||
|
GetSystemTime(&systemtime);
|
||||||
|
sprintfW(bufferW, driver_date_fmtW, systemtime.wMonth, systemtime.wDay, systemtime.wYear);
|
||||||
|
if (RegSetValueExW(hkey, driver_dateW, 0, REG_SZ, (BYTE *)bufferW, (strlenW(bufferW) + 1) * sizeof(WCHAR)))
|
||||||
|
goto done;
|
||||||
|
|
||||||
RegCloseKey(hkey);
|
RegCloseKey(hkey);
|
||||||
|
|
||||||
/* Retrieve driver value for adapters */
|
/* Retrieve driver value for adapters */
|
||||||
|
|
Loading…
Reference in New Issue