mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-15 03:04:47 +00:00
winebus.sys: Report WINEBUS\WINE_COMP_HID compatible id.
And match it in winehid.sys instead of individual bus ids. Signed-off-by: Rémi Bernon <rbernon@codeweavers.com> Signed-off-by: Zebediah Figura <zfigura@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
b755d58b13
commit
06ab0d5405
|
@ -226,7 +226,7 @@ static WCHAR *get_device_id(DEVICE_OBJECT *device)
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
static WCHAR *get_compatible_ids(DEVICE_OBJECT *device)
|
static WCHAR *get_hardware_ids(DEVICE_OBJECT *device)
|
||||||
{
|
{
|
||||||
struct device_extension *ext = (struct device_extension *)device->DeviceExtension;
|
struct device_extension *ext = (struct device_extension *)device->DeviceExtension;
|
||||||
WCHAR *dst;
|
WCHAR *dst;
|
||||||
|
@ -240,6 +240,24 @@ static WCHAR *get_compatible_ids(DEVICE_OBJECT *device)
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static WCHAR *get_compatible_ids(DEVICE_OBJECT *device)
|
||||||
|
{
|
||||||
|
static const WCHAR hid_compat[] =
|
||||||
|
{
|
||||||
|
'W','I','N','E','B','U','S','\\','W','I','N','E','_','C','O','M','P','_','H','I','D',0
|
||||||
|
};
|
||||||
|
DWORD size = sizeof(hid_compat);
|
||||||
|
WCHAR *dst;
|
||||||
|
|
||||||
|
if ((dst = ExAllocatePool(PagedPool, size + sizeof(WCHAR))))
|
||||||
|
{
|
||||||
|
memcpy(dst, hid_compat, sizeof(hid_compat));
|
||||||
|
dst[size / sizeof(WCHAR)] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
return dst;
|
||||||
|
}
|
||||||
|
|
||||||
static void remove_pending_irps(DEVICE_OBJECT *device)
|
static void remove_pending_irps(DEVICE_OBJECT *device)
|
||||||
{
|
{
|
||||||
struct device_extension *ext = device->DeviceExtension;
|
struct device_extension *ext = device->DeviceExtension;
|
||||||
|
@ -444,7 +462,7 @@ static NTSTATUS handle_IRP_MN_QUERY_ID(DEVICE_OBJECT *device, IRP *irp)
|
||||||
{
|
{
|
||||||
case BusQueryHardwareIDs:
|
case BusQueryHardwareIDs:
|
||||||
TRACE("BusQueryHardwareIDs\n");
|
TRACE("BusQueryHardwareIDs\n");
|
||||||
irp->IoStatus.Information = (ULONG_PTR)get_compatible_ids(device);
|
irp->IoStatus.Information = (ULONG_PTR)get_hardware_ids(device);
|
||||||
break;
|
break;
|
||||||
case BusQueryCompatibleIDs:
|
case BusQueryCompatibleIDs:
|
||||||
TRACE("BusQueryCompatibleIDs\n");
|
TRACE("BusQueryCompatibleIDs\n");
|
||||||
|
|
|
@ -7,12 +7,7 @@ Class=HIDClass
|
||||||
Wine=mfg_section
|
Wine=mfg_section
|
||||||
|
|
||||||
[mfg_section]
|
[mfg_section]
|
||||||
Wine hidraw device=device_section,HIDRAW
|
Wine HID compatible device=device_section,WINEBUS\WINE_COMP_HID
|
||||||
Wine IOHID device=device_section,IOHID
|
|
||||||
Wine libevent device=device_section,LNXEV
|
|
||||||
Wine SDL HID device=device_section,SDLJOY
|
|
||||||
Wine mouse device=device_section,WINEMOUSE
|
|
||||||
Wine keyboard device=device_section,WINEKEYBOARD
|
|
||||||
|
|
||||||
[device_section.Services]
|
[device_section.Services]
|
||||||
AddService = winehid,0x2,svc_section
|
AddService = winehid,0x2,svc_section
|
||||||
|
|
Loading…
Reference in a new issue