Corrected bug on touch position

This commit is contained in:
raysan5 2016-03-20 16:48:23 +01:00
parent fa78023aa4
commit 584e74c676

View file

@ -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 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) 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 static Vector2 touchPosition[MAX_TOUCH_POINTS]; // Touch position on screen
#endif
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB) #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) || defined(PLATFORM_WEB)
static const char *windowTitle; // Window text title... static const char *windowTitle; // Window text title...
@ -1787,6 +1785,9 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
gestureEvent.touchAction = TOUCH_MOVE; gestureEvent.touchAction = TOUCH_MOVE;
// Assign a pointer ID
gestureEvent.pointerId[0] = 0;
// Register touch points count // Register touch points count
gestureEvent.pointCount = 1; gestureEvent.pointCount = 1;