mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-22 10:49:02 +00:00
Add keyboard/mouse device index logging
This commit is contained in:
parent
7d34a5f423
commit
5c46e176d5
@ -903,6 +903,7 @@ static bool open_devices(udev_input_t *udev,
|
||||
struct udev_list_entry *devs = NULL;
|
||||
struct udev_list_entry *item = NULL;
|
||||
struct udev_enumerate *enumerate = udev_enumerate_new(udev->udev);
|
||||
int device_index = 0;
|
||||
|
||||
if (!enumerate)
|
||||
return false;
|
||||
@ -926,11 +927,13 @@ static bool open_devices(udev_input_t *udev,
|
||||
|
||||
if (fd != -1)
|
||||
{
|
||||
RARCH_LOG("[udev] Adding device %s as type %s.\n",
|
||||
devnode, type_str);
|
||||
if (!udev_input_add_device(udev, type, devnode, cb))
|
||||
RARCH_ERR("[udev] Failed to open device: %s (%s).\n",
|
||||
devnode, strerror(errno));
|
||||
else
|
||||
RARCH_LOG("[udev]: %s #%d (%s).\n",
|
||||
type == UDEV_INPUT_KEYBOARD ? "Keyboard" : "Mouse",
|
||||
device_index++, devnode);
|
||||
close(fd);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user