mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-18 09:18:15 +00:00
Fixes compile error when SUPPORT_GESTURES_SYSTEM is undefined on RPi
This commit is contained in:
10
src/core.c
10
src/core.c
@@ -4316,8 +4316,10 @@ static void *EventThread(void *arg)
|
|||||||
mousePosition.x += event.value;
|
mousePosition.x += event.value;
|
||||||
touchPosition[0].x = mousePosition.x;
|
touchPosition[0].x = mousePosition.x;
|
||||||
|
|
||||||
|
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||||
touchAction = TOUCH_MOVE;
|
touchAction = TOUCH_MOVE;
|
||||||
gestureUpdate = true;
|
gestureUpdate = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.code == REL_Y)
|
if (event.code == REL_Y)
|
||||||
@@ -4325,8 +4327,10 @@ static void *EventThread(void *arg)
|
|||||||
mousePosition.y += event.value;
|
mousePosition.y += event.value;
|
||||||
touchPosition[0].y = mousePosition.y;
|
touchPosition[0].y = mousePosition.y;
|
||||||
|
|
||||||
|
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||||
touchAction = TOUCH_MOVE;
|
touchAction = TOUCH_MOVE;
|
||||||
gestureUpdate = true;
|
gestureUpdate = true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.code == REL_WHEEL)
|
if (event.code == REL_WHEEL)
|
||||||
@@ -4343,16 +4347,20 @@ static void *EventThread(void *arg)
|
|||||||
{
|
{
|
||||||
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
|
||||||
|
|
||||||
|
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||||
touchAction = TOUCH_MOVE;
|
touchAction = TOUCH_MOVE;
|
||||||
gestureUpdate = true;
|
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
|
||||||
|
|
||||||
|
#if defined(SUPPORT_GESTURES_SYSTEM)
|
||||||
touchAction = TOUCH_MOVE;
|
touchAction = TOUCH_MOVE;
|
||||||
gestureUpdate = true;
|
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 defined(SUPPORT_GESTURES_SYSTEM)
|
||||||
if (event.value > 0) touchAction = TOUCH_DOWN;
|
if (event.value > 0) touchAction = TOUCH_DOWN;
|
||||||
else touchAction = TOUCH_UP;
|
else touchAction = TOUCH_UP;
|
||||||
gestureUpdate = true;
|
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;
|
||||||
|
Reference in New Issue
Block a user