From 43fb0b33994dba667ab3f1c107b7393ac3166ffe Mon Sep 17 00:00:00 2001 From: Linus Date: Wed, 4 Nov 2020 22:15:50 +0100 Subject: [PATCH] Force to request absinfo also onmultitouch axes The dev before me left a comment on handling that later. Not sure if there is any special case that needed to be implemented which I now completly ignored. --- src/lib.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f0af09d..9079eed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -795,10 +795,13 @@ impl Device { do_ioctl!(eviocgkey(self.fd, transmute::<&mut [u32], &mut [u8]>(self.state.key_vals.as_mut_slice()))); } if self.ty.contains(ABSOLUTE) { - for idx in 0..0x28 { + for idx in 0..0x3f { let abs = 1 << idx; // ignore multitouch, we'll handle that later. - if abs < ABS_MT_SLOT.bits() && self.abs.bits() & abs != 0 { + // + // handling later removed. not sure what the intention of "handling that later" was + // the abs data seems to be fine (tested ABS_MT_POSITION_X/Y) + if self.abs.bits() & abs != 0 { do_ioctl!(eviocgabs(self.fd, idx as u32, &mut self.state.abs_vals[idx as usize])); } }