mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-02 16:19:09 +00:00
udev_free_pad - weird implementation, cleanup
This commit is contained in:
parent
f42d0a7f7c
commit
dd57369433
@ -314,9 +314,6 @@ static int udev_find_vacant_pad(void)
|
|||||||
|
|
||||||
static void udev_free_pad(unsigned pad, bool hotplug)
|
static void udev_free_pad(unsigned pad, bool hotplug)
|
||||||
{
|
{
|
||||||
settings_t *settings = config_get_ptr();
|
|
||||||
autoconfig_params_t params = {{0}};
|
|
||||||
|
|
||||||
if (udev_pads[pad].fd >= 0)
|
if (udev_pads[pad].fd >= 0)
|
||||||
close(udev_pads[pad].fd);
|
close(udev_pads[pad].fd);
|
||||||
|
|
||||||
@ -326,15 +323,6 @@ static void udev_free_pad(unsigned pad, bool hotplug)
|
|||||||
memset(&udev_pads[pad], 0, sizeof(udev_pads[pad]));
|
memset(&udev_pads[pad], 0, sizeof(udev_pads[pad]));
|
||||||
|
|
||||||
udev_pads[pad].fd = -1;
|
udev_pads[pad].fd = -1;
|
||||||
udev_pads[pad].ident = settings->input.device_names[pad];
|
|
||||||
|
|
||||||
/* Avoid autoconfig spam if we're reiniting driver. */
|
|
||||||
/* TODO - implement VID/PID? */
|
|
||||||
if (hotplug)
|
|
||||||
{
|
|
||||||
params.idx = pad;
|
|
||||||
input_config_autoconfigure_joypad(¶ms);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char *path)
|
static bool udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char *path)
|
||||||
|
Loading…
Reference in New Issue
Block a user