mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-03 05:01:41 +00:00
(udev_joypad.c) Style nits
This commit is contained in:
parent
22bd3b2d4f
commit
23e2dfafd3
@ -206,14 +206,14 @@ static bool udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char
|
|||||||
int i;
|
int i;
|
||||||
const char *buf;
|
const char *buf;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
struct udev_device *parent;
|
struct udev_device *parent = NULL;
|
||||||
struct udev_joypad *pad = (struct udev_joypad*)&udev_pads[p];
|
struct udev_joypad *pad = (struct udev_joypad*)&udev_pads[p];
|
||||||
unsigned long keybit[NBITS(KEY_MAX)] = {0};
|
unsigned long keybit[NBITS(KEY_MAX)] = {0};
|
||||||
unsigned long absbit[NBITS(ABS_MAX)] = {0};
|
unsigned long absbit[NBITS(ABS_MAX)] = {0};
|
||||||
unsigned long ffbit[NBITS(FF_MAX)] = {0};
|
unsigned long ffbit[NBITS(FF_MAX)] = {0};
|
||||||
unsigned buttons = 0, axes = 0;
|
unsigned buttons = 0, axes = 0;
|
||||||
settings_t *settings = config_get_ptr();
|
autoconfig_params_t params = {{0}};
|
||||||
autoconfig_params_t params = {{0}};
|
settings_t *settings = config_get_ptr();
|
||||||
|
|
||||||
if (ioctl(fd, EVIOCGNAME(sizeof(settings->input.device_names[0])), pad->ident) < 0)
|
if (ioctl(fd, EVIOCGNAME(sizeof(settings->input.device_names[0])), pad->ident) < 0)
|
||||||
{
|
{
|
||||||
@ -238,7 +238,6 @@ static bool udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char
|
|||||||
if (fstat(fd, &st) < 0)
|
if (fstat(fd, &st) < 0)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
||||||
if ((ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) ||
|
if ((ioctl(fd, EVIOCGBIT(EV_KEY, sizeof(keybit)), keybit) < 0) ||
|
||||||
(ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0))
|
(ioctl(fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) < 0))
|
||||||
return false;
|
return false;
|
||||||
@ -276,8 +275,8 @@ static bool udev_add_pad(struct udev_device *dev, unsigned p, int fd, const char
|
|||||||
}
|
}
|
||||||
|
|
||||||
pad->device = st.st_rdev;
|
pad->device = st.st_rdev;
|
||||||
pad->fd = fd;
|
pad->fd = fd;
|
||||||
pad->path = strdup(path);
|
pad->path = strdup(path);
|
||||||
|
|
||||||
if (*pad->ident)
|
if (*pad->ident)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user