回退 'Pull Request !35 : 相同触摸报点不上报问题修改'

This commit is contained in:
oh_ci
2024-06-19 06:57:52 +00:00
committed by Gitee
parent 8d904eeea0
commit 179220ce06
+1 -21
View File
@@ -14,27 +14,7 @@ limitations under the License.
diff -Naur old/src/core.c new/src/core.c
--- old/src/core.c 2021-01-01 00:00:00.000000000 +0800
+++ new/src/core.c 2021-01-01 00:00:00.000000000 +0800
@@ -252,7 +252,8 @@
struct input_event ev;
int i, count = 0;
foreach_bit(i, prop)
- if (get_sval(&state->data[slot], i) != get_sval(data, i))
+ if (mtdev_mt2abs(i) == ABS_MT_POSITION_X || mtdev_mt2abs(i) == ABS_MT_POSITION_Y ||
+ get_sval(&state->data[slot], i) != get_sval(data, i))
count++;
if (!count)
return;
@@ -268,7 +269,8 @@
foreach_bit(i, prop) {
ev.code = mtdev_mt2abs(i);
ev.value = get_sval(data, i);
- if (get_sval(&state->data[slot], i) != ev.value) {
+ if (ev.code == ABS_MT_POSITION_X || ev.code == ABS_MT_POSITION_Y ||
+ get_sval(&state->data[slot], i) != ev.value) {
evbuf_put(&state->outbuf, &ev);
set_sval(&state->data[slot], i, ev.value);
}
@@ -297,7 +299,11 @@
@@ -297,7 +297,11 @@ static void apply_typeA_changes(struct mtdev_state *state,
foreach_bit(slot, state->used) {
if (state->data[slot].tracking_id != id)
continue;