FreeBSD USB: added fake hardcoded device parameters in lieu of actual info

The FreeBSD USB code is incomplete, and doesn't really to device
parameter detection yet, leaving the number of buttons and axes 0. This
might cause problems with programs expecting (reasonably) 6 axes, and
"some" buttons. So let's hardcode 6 and 2 respectively until the code is
improved.
pull/65/head
John Tsiombikas 2022-11-30 01:02:47 +02:00
rodzic d8f6de4697
commit aebe1999a6
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -216,6 +216,13 @@ int open_dev_usb(struct device *dev)
dev->read = read_hid;
dev->set_led = set_led_hid;
/* TODO until we flesh out the USB code on FreeBSD, let's fill the structure
* with fake but plausible information.
*/
dev->bnbase = 0;
dev->num_buttons = 2;
dev->num_axes = 6;
return 0;
}