diff options
author | Aidan MacDonald <amachronic@protonmail.com> | 2021-11-20 19:05:16 +0000 |
---|---|---|
committer | Aidan MacDonald <amachronic@protonmail.com> | 2021-11-24 18:49:03 -0500 |
commit | 44acbc66291da6a8ade8571b73a10e34341a622b (patch) | |
tree | 226f9d9f971756f481455da082443f700bcfc786 /firmware/target/mips/ingenic_x1000/fiiom3k | |
parent | b39acee3abd199d80b84c68ebfa7301b7e7a957e (diff) | |
download | rockbox-44acbc66291da6a8ade8571b73a10e34341a622b.tar.gz rockbox-44acbc66291da6a8ade8571b73a10e34341a622b.zip |
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
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/fiiom3k/button-fiiom3k.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) | |||
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||
321 | static void ft_event_cb(int evt, int tx, int ty) | 321 | static void ft_event_cb(struct ft6x06_state* state) |
322 | { | 322 | { |
323 | /* TODO: convert the touch positions to linear positions. | 323 | /* TODO: convert the touch positions to linear positions. |
324 | * | 324 | * |
@@ -327,7 +327,8 @@ static void ft_event_cb(int evt, int tx, int ty) | |||
327 | * the middle of the touchpad than on the edges, so scrolling feels slow | 327 | * the middle of the touchpad than on the edges, so scrolling feels slow |
328 | * in the middle and faster near the edge. | 328 | * in the middle and faster near the edge. |
329 | */ | 329 | */ |
330 | ft_step_state(__ost_read32(), evt, tx, ty); | 330 | struct ft6x06_point* pt = &state->points[0]; |
331 | ft_step_state(__ost_read32(), pt->event, pt->pos_x, pt->pos_y); | ||
331 | } | 332 | } |
332 | 333 | ||
333 | static void ft_init(void) | 334 | static void ft_init(void) |