From: Paul Gofman Subject: [PATCH v2 1/3] winex11.drv: Add GUID_DISPLAY_DEVICE_ARRIVAL interface to display device. Message-Id: <20210906124239.59283-1-pgofman@codeweavers.com> Date: Mon, 6 Sep 2021 15:42:37 +0300 Signed-off-by: Paul Gofman --- dlls/winex11.drv/display.c | 6 ++++++ include/ntddvdeo.h | 1 + 2 files changed, 7 insertions(+) diff --git a/dlls/winex11.drv/display.c b/dlls/winex11.drv/display.c index b3ff213ae89..0b20cff5e79 100644 --- a/dlls/winex11.drv/display.c +++ b/dlls/winex11.drv/display.c @@ -30,6 +30,7 @@ #include "initguid.h" #include "devguid.h" #include "devpkey.h" +#include "ntddvdeo.h" #include "setupapi.h" #define WIN32_NO_STATUS #include "winternl.h" @@ -409,6 +410,7 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g WCHAR *driver, LUID *gpu_luid) { static const BOOL present = TRUE; + SP_DEVICE_INTERFACE_DATA iface_data = {sizeof(iface_data)}; SP_DEVINFO_DATA device_data = {sizeof(device_data)}; WCHAR instanceW[MAX_PATH]; DEVPROPTYPE property_type; @@ -432,6 +434,10 @@ static BOOL X11DRV_InitGpu(HDEVINFO devinfo, const struct x11drv_gpu *gpu, INT g goto done; } + /* Register GUID_DISPLAY_DEVICE_ARRIVAL */ + if (!SetupDiCreateDeviceInterfaceW(devinfo, &device_data, &GUID_DISPLAY_DEVICE_ARRIVAL, NULL, 0, &iface_data)) + 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; diff --git a/include/ntddvdeo.h b/include/ntddvdeo.h index 9523e37f7b4..8736c6cc845 100644 --- a/include/ntddvdeo.h +++ b/include/ntddvdeo.h @@ -21,5 +21,6 @@ DEFINE_GUID(GUID_DEVINTERFACE_DISPLAY_ADAPTER, 0x5b45201d, 0xf2f2, 0x4f3b, 0x85, 0xbb, 0x30, 0xff, 0x1f, 0x95, 0x35, 0x99); DEFINE_GUID(GUID_DEVINTERFACE_MONITOR, 0xe6f07b5f, 0xee97, 0x4a90, 0xb0, 0x76, 0x33, 0xf5, 0x7b, 0xf4, 0xea, 0xa7); +DEFINE_GUID(GUID_DISPLAY_DEVICE_ARRIVAL, 0x1ca05180, 0xa699, 0x450a, 0x9a, 0x0c, 0xde, 0x4f, 0xbe, 0x3d, 0xdd, 0x89); #endif -- 2.31.1