mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
* Input: Harden setCurrentMtSlotChecked The current implementation was assuming that the only case where we might be missing slot storage was for the *first* contact point, given that ABS_MT_SLOT is (if all goes well) guaranteed to be present and come first for every subsequent additional contact points. While this works just fine in practice, we can simplify and generalize the check by just checking if we've actually recorded the requested slot, even if it's not the first contact point. The hit check is possibly ever so slightly faster than the length computation, to boot. * Input: Handle snow_protocol devices with newer hardware revisions that do *NOT* need the snow quirks. If a sane input frame is detected, the snow quirks will be disabled at runtime, ensuring sane behavior. Given the extremely non-standard behavior of the snow quirks, this is fairly easy to detect, as a snow device will *never* emit EV_ABS:ABS_MT_TRACKING_ID:-1, so if we catch one, it's not snow ;). (We've had reports of this on a Clara HD, FWIW)