winemac.drv: Register GUID_DISPLAY_DEVICE_ARRIVAL interface for GPUs.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2021-09-16 15:10:57 +08:00 committed by Alexandre Julliard
parent 9a370223ab
commit 5a804af79b
1 changed files with 7 additions and 0 deletions

View File

@ -1540,6 +1540,13 @@ static BOOL macdrv_init_gpu(HDEVINFO devinfo, const struct macdrv_gpu *gpu, int
if (!link_device(instanceW, &GUID_DEVINTERFACE_DISPLAY_ADAPTER))
goto done;
/* Register GUID_DISPLAY_DEVICE_ARRIVAL */
if (!SetupDiCreateDeviceInterfaceW(devinfo, &device_data, &GUID_DISPLAY_DEVICE_ARRIVAL, NULL, 0, NULL))
goto done;
if (!link_device(instanceW, &GUID_DISPLAY_DEVICE_ARRIVAL))
goto done;
/* Write HardwareID registry property, REG_MULTI_SZ */
written = sprintfW(bufferW, gpu_hardware_id_fmtW, gpu->vendor_id, gpu->device_id);
bufferW[written + 1] = 0;