|
|
@@ -0,0 +1,135 @@
|
|
|
+From 2bb39207206f83b7f349cbe0071c8542994c1680 Mon Sep 17 00:00:00 2001
|
|
|
+From: huangliang <huangliang@arkmicro.com>
|
|
|
+Date: Sat, 6 Sep 2025 14:27:00 +0800
|
|
|
+Subject: [PATCH] fix-inputevent-time-bits64-compile-err
|
|
|
+
|
|
|
+---
|
|
|
+ inputdrivers/linux_input/linux_input.c | 38 +++++++++++++++++++-------
|
|
|
+ 1 file changed, 28 insertions(+), 10 deletions(-)
|
|
|
+
|
|
|
+diff --git a/inputdrivers/linux_input/linux_input.c b/inputdrivers/linux_input/linux_input.c
|
|
|
+index 7e9a6ad..0ef7b44 100644
|
|
|
+--- a/inputdrivers/linux_input/linux_input.c
|
|
|
++++ b/inputdrivers/linux_input/linux_input.c
|
|
|
+@@ -754,7 +754,12 @@ translate_event( const LinuxInputData *data,
|
|
|
+ DFBInputEvent *devt )
|
|
|
+ {
|
|
|
+ devt->flags = DIEF_TIMESTAMP;
|
|
|
++#if _TIME_BITS == 64
|
|
|
++ devt->timestamp.tv_sec = levt->__sec;
|
|
|
++ devt->timestamp.tv_usec = levt->__usec;
|
|
|
++#else
|
|
|
+ devt->timestamp = levt->time;
|
|
|
++#endif
|
|
|
+
|
|
|
+ switch (levt->type) {
|
|
|
+ case EV_KEY:
|
|
|
+@@ -2139,7 +2144,12 @@ touchpad_translate( struct touchpad_fsm_state *state,
|
|
|
+ int abs, rel;
|
|
|
+
|
|
|
+ devt->flags = DIEF_TIMESTAMP | (dfb_config->linux_input_touch_abs ? DIEF_AXISABS : DIEF_AXISREL);
|
|
|
++#if _TIME_BITS == 64
|
|
|
++ devt->timestamp.tv_sec = levt->__sec;
|
|
|
++ devt->timestamp.tv_usec = levt->__usec;
|
|
|
++#else
|
|
|
+ devt->timestamp = levt->time;
|
|
|
++#endif
|
|
|
+ devt->type = DIET_AXISMOTION;
|
|
|
+
|
|
|
+ switch (levt->code) {
|
|
|
+@@ -2204,6 +2214,14 @@ touchpad_fsm( struct touchpad_fsm_state *state,
|
|
|
+ DFBInputEvent *devt )
|
|
|
+ {
|
|
|
+ struct timeval timeout = { 0, 125000 };
|
|
|
++ struct timeval levt_time;
|
|
|
++
|
|
|
++#if _TIME_BITS == 64
|
|
|
++ levt_time.tv_sec = levt->__sec;
|
|
|
++ levt_time.tv_usec = levt->__usec;
|
|
|
++#else
|
|
|
++ levt_time = levt->time;
|
|
|
++#endif
|
|
|
+
|
|
|
+ /* select() timeout? */
|
|
|
+ if (!levt) {
|
|
|
+@@ -2233,7 +2251,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
|
|
|
+
|
|
|
+ /* Check if button release is due. */
|
|
|
+ if (state->fsm_state == TOUCHPAD_FSM_DRAG_START &&
|
|
|
+- timeout_passed( &state->timeout, &levt->time )) {
|
|
|
++ timeout_passed( &state->timeout, &levt_time )) {
|
|
|
+ devt->flags = DIEF_TIMESTAMP;
|
|
|
+ devt->timestamp = state->timeout; /* timeout of levt->time? */
|
|
|
+ devt->type = DIET_BUTTONRELEASE;
|
|
|
+@@ -2255,28 +2273,28 @@ touchpad_fsm( struct touchpad_fsm_state *state,
|
|
|
+ case TOUCHPAD_FSM_START:
|
|
|
+ if (touchpad_finger_landing( levt )) {
|
|
|
+ state->fsm_state = TOUCHPAD_FSM_MAIN;
|
|
|
+- state->timeout = levt->time;
|
|
|
++ state->timeout = levt_time;
|
|
|
+ timeout_add( &state->timeout, &timeout );
|
|
|
+ }
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ case TOUCHPAD_FSM_MAIN:
|
|
|
+ if (touchpad_finger_moving( levt )) {
|
|
|
+- if (1){//timeout_passed( &state->timeout, &levt->time )) {
|
|
|
++ if (1){//timeout_passed( &state->timeout, &levt_time )) {
|
|
|
+ //timeout_clear( &state->timeout );
|
|
|
+ return touchpad_translate( state, levt, devt );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (touchpad_finger_leaving( levt )) {
|
|
|
+- if (!timeout_passed( &state->timeout, &levt->time )) {
|
|
|
++ if (!timeout_passed( &state->timeout, &levt_time )) {
|
|
|
+ devt->flags = DIEF_TIMESTAMP;
|
|
|
+- devt->timestamp = levt->time;
|
|
|
++ devt->timestamp = levt_time;
|
|
|
+ devt->type = DIET_BUTTONPRESS;
|
|
|
+ devt->button = DIBI_FIRST;
|
|
|
+
|
|
|
+ touchpad_fsm_init( state );
|
|
|
+ state->fsm_state = TOUCHPAD_FSM_DRAG_START;
|
|
|
+- state->timeout = levt->time;
|
|
|
++ state->timeout = levt_time;
|
|
|
+ timeout_add( &state->timeout, &timeout );
|
|
|
+ return 1;
|
|
|
+ }
|
|
|
+@@ -2287,7 +2305,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
|
|
|
+ return 0;
|
|
|
+
|
|
|
+ case TOUCHPAD_FSM_DRAG_START:
|
|
|
+- if (timeout_passed( &state->timeout, &levt->time )){
|
|
|
++ if (timeout_passed( &state->timeout, &levt_time )){
|
|
|
+ devt->flags = DIEF_TIMESTAMP;
|
|
|
+ devt->timestamp = state->timeout; /* timeout of levt->time? */
|
|
|
+ devt->type = DIET_BUTTONRELEASE;
|
|
|
+@@ -2299,7 +2317,7 @@ touchpad_fsm( struct touchpad_fsm_state *state,
|
|
|
+ else {
|
|
|
+ if (touchpad_finger_landing( levt )) {
|
|
|
+ state->fsm_state = TOUCHPAD_FSM_DRAG_MAIN;
|
|
|
+- state->timeout = levt->time;
|
|
|
++ state->timeout = levt_time;
|
|
|
+ timeout_add( &state->timeout, &timeout );
|
|
|
+ }
|
|
|
+ }
|
|
|
+@@ -2307,14 +2325,14 @@ touchpad_fsm( struct touchpad_fsm_state *state,
|
|
|
+
|
|
|
+ case TOUCHPAD_FSM_DRAG_MAIN:
|
|
|
+ if (touchpad_finger_moving( levt )) {
|
|
|
+- if (1){//timeout_passed( &state->timeout, &levt->time )) {
|
|
|
++ if (1){//timeout_passed( &state->timeout, &levt_time )) {
|
|
|
+ //timeout_clear( &state->timeout );
|
|
|
+ return touchpad_translate( state, levt, devt );
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else if (touchpad_finger_leaving( levt )) {
|
|
|
+ devt->flags = DIEF_TIMESTAMP;
|
|
|
+- devt->timestamp = levt->time;
|
|
|
++ devt->timestamp = levt_time;
|
|
|
+ devt->type = DIET_BUTTONRELEASE;
|
|
|
+ devt->button = DIBI_FIRST;
|
|
|
+
|
|
|
+--
|
|
|
+2.25.1
|
|
|
+
|