Fixes compile error when SUPPORT_GESTURES_SYSTEM is undefined on RPi

This commit is contained in:
Berni8k 2019-03-28 20:38:13 +01:00
parent b1e914bbf3
commit ea96d0afea

View File

@ -4315,18 +4315,22 @@ static void *EventThread(void *arg)
{ {
mousePosition.x += event.value; mousePosition.x += event.value;
touchPosition[0].x = mousePosition.x; touchPosition[0].x = mousePosition.x;
touchAction = TOUCH_MOVE; #if defined(SUPPORT_GESTURES_SYSTEM)
gestureUpdate = true; touchAction = TOUCH_MOVE;
gestureUpdate = true;
#endif
} }
if (event.code == REL_Y) if (event.code == REL_Y)
{ {
mousePosition.y += event.value; mousePosition.y += event.value;
touchPosition[0].y = mousePosition.y; touchPosition[0].y = mousePosition.y;
touchAction = TOUCH_MOVE; #if defined(SUPPORT_GESTURES_SYSTEM)
gestureUpdate = true; touchAction = TOUCH_MOVE;
gestureUpdate = true;
#endif
} }
if (event.code == REL_WHEEL) if (event.code == REL_WHEEL)
@ -4342,17 +4346,21 @@ static void *EventThread(void *arg)
if (event.code == ABS_X) if (event.code == ABS_X)
{ {
mousePosition.x = (event.value - worker->absRange.x)*screenWidth/worker->absRange.width; // Scale acording to absRange mousePosition.x = (event.value - worker->absRange.x)*screenWidth/worker->absRange.width; // Scale acording to absRange
touchAction = TOUCH_MOVE; #if defined(SUPPORT_GESTURES_SYSTEM)
gestureUpdate = true; touchAction = TOUCH_MOVE;
gestureUpdate = true;
#endif
} }
if (event.code == ABS_Y) if (event.code == ABS_Y)
{ {
mousePosition.y = (event.value - worker->absRange.y)*screenHeight/worker->absRange.height; // Scale acording to absRange mousePosition.y = (event.value - worker->absRange.y)*screenHeight/worker->absRange.height; // Scale acording to absRange
touchAction = TOUCH_MOVE; #if defined(SUPPORT_GESTURES_SYSTEM)
gestureUpdate = true; touchAction = TOUCH_MOVE;
gestureUpdate = true;
#endif
} }
// Multitouch movement // Multitouch movement
@ -4393,9 +4401,11 @@ static void *EventThread(void *arg)
{ {
currentMouseStateEvdev[MOUSE_LEFT_BUTTON] = event.value; currentMouseStateEvdev[MOUSE_LEFT_BUTTON] = event.value;
if (event.value > 0) touchAction = TOUCH_DOWN; #if defined(SUPPORT_GESTURES_SYSTEM)
else touchAction = TOUCH_UP; if (event.value > 0) touchAction = TOUCH_DOWN;
gestureUpdate = true; else touchAction = TOUCH_UP;
gestureUpdate = true;
#endif
} }
if (event.code == BTN_RIGHT) currentMouseStateEvdev[MOUSE_RIGHT_BUTTON] = event.value; if (event.code == BTN_RIGHT) currentMouseStateEvdev[MOUSE_RIGHT_BUTTON] = event.value;