dix: when comparing axis modes, compare the bits, not the bytes.
The DeviceEvent's mode field is a set of bits for each valuator, not bytes. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
This commit is contained in:
parent
6f12934d4e
commit
4f3e670fd2
|
@ -327,7 +327,7 @@ countValuators(DeviceEvent *ev, int *first)
|
|||
/* Assume mode of 0th valuator matches XI1 device mode. Stop when the
|
||||
* event mode changes since XI1 can't handle mixed mode devices.
|
||||
*/
|
||||
if (ev->valuators.mode[i] != ev->valuators.mode[0])
|
||||
if (BitIsOn(ev->valuators.mode, i) != BitIsOn(ev->valuators.mode, 0))
|
||||
break;
|
||||
|
||||
if (BitIsOn(ev->valuators.mask, i))
|
||||
|
|
Loading…
Reference in New Issue
Block a user