user32: Enumerate keyboard rawinput devices.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-04-22 21:26:52 +02:00 committed by Alexandre Julliard
parent 8e4d668e34
commit 91066bd5e0
1 changed files with 16 additions and 0 deletions

View File

@ -39,6 +39,7 @@
#include "initguid.h"
#include "ntddmou.h"
#include "ntddkbd.h"
WINE_DEFAULT_DEBUG_CHANNEL(rawinput);
@ -211,6 +212,21 @@ static void find_devices(void)
SetupDiDestroyDeviceInfoList(set);
set = SetupDiGetClassDevsW(&GUID_DEVINTERFACE_KEYBOARD, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT);
for (idx = 0; SetupDiEnumDeviceInterfaces(set, NULL, &GUID_DEVINTERFACE_KEYBOARD, idx, &iface); ++idx)
{
static const RID_DEVICE_INFO_KEYBOARD keyboard_info = {0, 0, 1, 12, 3, 101};
if (!(device = add_device(set, &iface)))
continue;
device->info.dwType = RIM_TYPEKEYBOARD;
device->info.u.keyboard = keyboard_info;
}
SetupDiDestroyDeviceInfoList(set);
LeaveCriticalSection(&rawinput_devices_cs);
}