mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 22:13:51 +00:00
(griffin) Fix udev drivers build
This commit is contained in:
parent
cb7b6ef45c
commit
f8e4fa25bb
@ -249,7 +249,7 @@ static void udev_handle_mouse(udev_input_t *udev,
|
||||
}
|
||||
}
|
||||
|
||||
static bool hotplug_available(udev_input_t *udev)
|
||||
static bool udev_input_hotplug_available(udev_input_t *udev)
|
||||
{
|
||||
struct pollfd fds = {0};
|
||||
|
||||
@ -325,7 +325,7 @@ static bool add_device(udev_input_t *udev,
|
||||
return true;
|
||||
}
|
||||
|
||||
static void remove_device(udev_input_t *udev, const char *devnode)
|
||||
static void udev_input_remove_device(udev_input_t *udev, const char *devnode)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
@ -342,7 +342,7 @@ static void remove_device(udev_input_t *udev, const char *devnode)
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_hotplug(udev_input_t *udev)
|
||||
static void udev_input_handle_hotplug(udev_input_t *udev)
|
||||
{
|
||||
bool is_keyboard, is_mouse, is_touchpad;
|
||||
struct udev_device *dev = udev_monitor_receive_device(udev->monitor);
|
||||
@ -394,7 +394,7 @@ static void handle_hotplug(udev_input_t *udev)
|
||||
else if (!strcmp(action, "remove"))
|
||||
{
|
||||
RARCH_LOG("[udev]: Hotplug remove %s: %s.\n", devtype, devnode);
|
||||
remove_device(udev, devnode);
|
||||
udev_input_remove_device(udev, devnode);
|
||||
}
|
||||
|
||||
end:
|
||||
@ -409,8 +409,8 @@ static void udev_input_poll(void *data)
|
||||
|
||||
udev->mouse_x = udev->mouse_y = 0;
|
||||
|
||||
while (hotplug_available(udev))
|
||||
handle_hotplug(udev);
|
||||
while (udev_input_hotplug_available(udev))
|
||||
udev_input_handle_hotplug(udev);
|
||||
|
||||
ret = epoll_wait(udev->epfd, events, ARRAY_SIZE(events), 0);
|
||||
|
||||
|
@ -159,9 +159,9 @@ static bool hotplug_available(void)
|
||||
}
|
||||
|
||||
static void check_device(struct udev_device *dev, const char *path, bool hotplugged);
|
||||
static void remove_device(const char *path);
|
||||
static void udev_joypad_remove_device(const char *path);
|
||||
|
||||
static void handle_hotplug(void)
|
||||
static void udev_joypad_handle_hotplug(void)
|
||||
{
|
||||
struct udev_device *dev = udev_monitor_receive_device(g_udev_mon);
|
||||
if (!dev)
|
||||
@ -182,7 +182,7 @@ static void handle_hotplug(void)
|
||||
else if (!strcmp(action, "remove"))
|
||||
{
|
||||
RARCH_LOG("[udev]: Hotplug remove: %s.\n", devnode);
|
||||
remove_device(devnode);
|
||||
udev_joypad_remove_device(devnode);
|
||||
}
|
||||
|
||||
end:
|
||||
@ -264,7 +264,7 @@ static void udev_joypad_poll(void)
|
||||
{
|
||||
unsigned i;
|
||||
while (hotplug_available())
|
||||
handle_hotplug();
|
||||
udev_joypad_handle_hotplug();
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
udev_poll_pad(&udev_pads[i], i);
|
||||
@ -471,7 +471,7 @@ static void check_device(struct udev_device *dev, const char *path, bool hotplug
|
||||
}
|
||||
}
|
||||
|
||||
static void remove_device(const char *path)
|
||||
static void udev_joypad_remove_device(const char *path)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user