mirror of https://github.com/nirenjan/libx52.git
Fix bug where input is not getting reported
Because the joystick type was never set, the input irq handler never called the x52pro_decode_urb function. This fixes that issue, however, it still needs verification that the changes work.pull/3/head
parent
7db56ee069
commit
a69ea22457
|
@ -77,8 +77,7 @@ static ssize_t show_text_line(struct device *dev, char *buf, u8 line)
|
||||||
line--; /* Convert to 0-based line number */
|
line--; /* Convert to 0-based line number */
|
||||||
|
|
||||||
if (joy->feat_mfd) {
|
if (joy->feat_mfd) {
|
||||||
//return sprintf(buf, "%s\n", joy->line[line].text);
|
return sprintf(buf, "%s\n", joy->line[line].text);
|
||||||
return sprintf(buf, "%s\n", joy->phys);
|
|
||||||
} else {
|
} else {
|
||||||
sprintf(buf, "\n");
|
sprintf(buf, "\n");
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
@ -403,6 +402,7 @@ static int x52_probe(struct usb_interface *intf,
|
||||||
dev_err(&intf->dev, "Out of memory: Cannot create joystick\n");
|
dev_err(&intf->dev, "Out of memory: Cannot create joystick\n");
|
||||||
goto error;
|
goto error;
|
||||||
}
|
}
|
||||||
|
joy->type = x52_devices[i].type;
|
||||||
|
|
||||||
idev = input_allocate_device();
|
idev = input_allocate_device();
|
||||||
if (idev == NULL) {
|
if (idev == NULL) {
|
||||||
|
|
Loading…
Reference in New Issue