diff options
| author | Berni8k <berni8k@yahoo.com> | 2019-03-28 20:38:13 +0100 |
|---|---|---|
| committer | Berni8k <berni8k@yahoo.com> | 2019-03-28 20:38:13 +0100 |
| commit | ea96d0afea630cb5f174a5d433f46f722522fbb3 (patch) | |
| tree | 7f9e59306233612e42d383c29a847a8258713392 /src | |
| parent | b1e914bbf317cad17eeb3b161dc04c0a7ec78d0d (diff) | |
| download | raylib-ea96d0afea630cb5f174a5d433f46f722522fbb3.tar.gz raylib-ea96d0afea630cb5f174a5d433f46f722522fbb3.zip | |
Fixes compile error when SUPPORT_GESTURES_SYSTEM is undefined on RPi
Diffstat (limited to 'src')
| -rw-r--r-- | src/core.c | 40 |
1 files changed, 25 insertions, 15 deletions
@@ -4315,18 +4315,22 @@ static void *EventThread(void *arg) { mousePosition.x += event.value; touchPosition[0].x = mousePosition.x; - - touchAction = TOUCH_MOVE; - gestureUpdate = true; + + #if defined(SUPPORT_GESTURES_SYSTEM) + touchAction = TOUCH_MOVE; + gestureUpdate = true; + #endif } if (event.code == REL_Y) { mousePosition.y += event.value; touchPosition[0].y = mousePosition.y; - - touchAction = TOUCH_MOVE; - gestureUpdate = true; + + #if defined(SUPPORT_GESTURES_SYSTEM) + touchAction = TOUCH_MOVE; + gestureUpdate = true; + #endif } if (event.code == REL_WHEEL) @@ -4342,17 +4346,21 @@ static void *EventThread(void *arg) if (event.code == ABS_X) { mousePosition.x = (event.value - worker->absRange.x)*screenWidth/worker->absRange.width; // Scale acording to absRange - - touchAction = TOUCH_MOVE; - gestureUpdate = true; + + #if defined(SUPPORT_GESTURES_SYSTEM) + touchAction = TOUCH_MOVE; + gestureUpdate = true; + #endif } if (event.code == ABS_Y) { mousePosition.y = (event.value - worker->absRange.y)*screenHeight/worker->absRange.height; // Scale acording to absRange - - touchAction = TOUCH_MOVE; - gestureUpdate = true; + + #if defined(SUPPORT_GESTURES_SYSTEM) + touchAction = TOUCH_MOVE; + gestureUpdate = true; + #endif } // Multitouch movement @@ -4393,9 +4401,11 @@ static void *EventThread(void *arg) { currentMouseStateEvdev[MOUSE_LEFT_BUTTON] = event.value; - if (event.value > 0) touchAction = TOUCH_DOWN; - else touchAction = TOUCH_UP; - gestureUpdate = true; + #if defined(SUPPORT_GESTURES_SYSTEM) + if (event.value > 0) touchAction = TOUCH_DOWN; + else touchAction = TOUCH_UP; + gestureUpdate = true; + #endif } if (event.code == BTN_RIGHT) currentMouseStateEvdev[MOUSE_RIGHT_BUTTON] = event.value; |
