Skip to content

Commit

Permalink
Change the wireless device guess heuristic
Browse files Browse the repository at this point in the history
The wireless device guess heuristic chooses between a spacemouse
wireless, or a spacemouse wireless pro. Since the spacemouse wireless
only has 2 buttons, it's best to choose pro if we get anything beyond
that.

See: FreeSpacenav/spnavcfg#45
  • Loading branch information
jtsiomb committed Jul 12, 2024
1 parent c6f8a6b commit d7e6f2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dev_usb_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int open_dev_usb(struct device *dev)
/* Wireless devices use the same dongle, try to guess which actual
* device this is, and apply the button hack if it's a SpcMouse Pro
*/
if(dev->num_buttons >= 255) {
if(dev->num_buttons > 2) {
dev->type = DEV_SMPROW;
dev->bnhack = bnhack_smpro;
dev->num_buttons = bnhack_smpro(-1);
Expand Down

0 comments on commit d7e6f2c

Please sign in to comment.