From 44acbc66291da6a8ade8571b73a10e34341a622b Mon Sep 17 00:00:00 2001 From: Aidan MacDonald Date: Sat, 20 Nov 2021 19:05:16 +0000 Subject: Shanling Q1: enable multi-touch reporting The FT6x06 driver used for the Shanling Q1's touchscreen has been extended to report more than one touch point. It can also return the gesture detected by the controller, but this doesn't seem to report anything useful on the Q1. Multi-touch is only useful in 3x3 grid mode since the Rockbox button API cannot report more than one touch point. The FiiO M3K uses the same driver so it's been updated to the multi-touch API, but functionality is unchanged. Change-Id: I4de42f44808d6eb902e3da212d8f936b7a5042c7 --- firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k') diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c b/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c index 04e3102d42..24daf2ef69 100644 --- a/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c +++ b/firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c @@ -318,7 +318,7 @@ static void ft_step_state(uint32_t t, int evt, int tx, int ty) } } -static void ft_event_cb(int evt, int tx, int ty) +static void ft_event_cb(struct ft6x06_state* state) { /* TODO: convert the touch positions to linear positions. * @@ -327,7 +327,8 @@ static void ft_event_cb(int evt, int tx, int ty) * the middle of the touchpad than on the edges, so scrolling feels slow * in the middle and faster near the edge. */ - ft_step_state(__ost_read32(), evt, tx, ty); + struct ft6x06_point* pt = &state->points[0]; + ft_step_state(__ost_read32(), pt->event, pt->pos_x, pt->pos_y); } static void ft_init(void) -- cgit v1.2.3