mirror of
https://github.com/trezor/trezor-firmware.git
synced 2025-03-17 16:46:05 +00:00
fix(core): fix doubled touch clicks
[no changelog]
This commit is contained in:
parent
283baa412a
commit
b4200162ab
@ -388,9 +388,15 @@ uint32_t touch_get_event(void) {
|
||||
// Finger was just pressed down
|
||||
event = TOUCH_START | xy;
|
||||
} else {
|
||||
// It looks like we have missed the lift up event
|
||||
// We should send the TOUCH_END event here with old coordinates
|
||||
event = TOUCH_END | touch_pack_xy(driver->last_x, driver->last_y);
|
||||
if ((x != driver->last_x) || (y != driver->last_y)) {
|
||||
// It looks like we have missed the lift up event
|
||||
// We should send the TOUCH_END event here with old coordinates
|
||||
event = TOUCH_END | touch_pack_xy(driver->last_x, driver->last_y);
|
||||
} else {
|
||||
// We have received the same coordinates as before,
|
||||
// probably this is the same start event, or a quick bounce,
|
||||
// we should ignore it.
|
||||
}
|
||||
}
|
||||
} else if ((nb_touches == 1) && (flags == FT6X63_EVENT_CONTACT)) {
|
||||
if (driver->pressed) {
|
||||
|
Loading…
Reference in New Issue
Block a user