mirror of
https://github.com/openharmony/third_party_mtdev.git
synced 2026-07-20 22:18:23 -04:00
回退 'Pull Request !35 : 相同触摸报点不上报问题修改'
This commit is contained in:
@@ -14,27 +14,7 @@ limitations under the License.
|
|||||||
diff -Naur old/src/core.c new/src/core.c
|
diff -Naur old/src/core.c new/src/core.c
|
||||||
--- old/src/core.c 2021-01-01 00:00:00.000000000 +0800
|
--- old/src/core.c 2021-01-01 00:00:00.000000000 +0800
|
||||||
+++ new/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 @@
|
@@ -297,7 +297,11 @@ static void apply_typeA_changes(struct mtdev_state *state,
|
||||||
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 @@
|
|
||||||
foreach_bit(slot, state->used) {
|
foreach_bit(slot, state->used) {
|
||||||
if (state->data[slot].tracking_id != id)
|
if (state->data[slot].tracking_id != id)
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
Reference in New Issue
Block a user