aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-03-20 16:48:23 +0100
committerraysan5 <raysan5@gmail.com>2016-03-20 16:48:23 +0100
commit584e74c6765b63cf6b618f3c38214c3d49322cc2 (patch)
tree5b3b0f44960b010cb14938929319fe231e12640d /src
parentfa78023aa427e0c6e5a25e82102b296c51c24fe4 (diff)
downloadraylib-584e74c6765b63cf6b618f3c38214c3d49322cc2.tar.gz
raylib-584e74c6765b63cf6b618f3c38214c3d49322cc2.zip
Corrected bug on touch position
Diffstat (limited to 'src')
-rw-r--r--src/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core.c b/src/core.c
index 609da64e..37d4a0bf 100644
--- a/src/core.c
+++ b/src/core.c
@@ -193,9 +193,7 @@ static int renderOffsetY = 0; // Offset Y from render area (must b
static bool fullscreen = false; // Fullscreen mode (useful only for PLATFORM_DESKTOP)
static Matrix downscaleView; // Matrix to downscale view (in case screen size bigger than display size)
-#if defined(PLATFORM_ANDROID) || defined(PLATFORM_WEB)
static Vector2 touchPosition[MAX_TOUCH_POINTS]; // Touch position on screen
-#endif
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
static const char *windowTitle; // Window text title...
@@ -1786,6 +1784,9 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
GestureEvent gestureEvent;
gestureEvent.touchAction = TOUCH_MOVE;
+
+ // Assign a pointer ID
+ gestureEvent.pointerId[0] = 0;
// Register touch points count
gestureEvent.pointCount = 1;