From d1a8b86148b6c0980c3e5250bf723c5641a71e7d Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Wed, 27 Mar 2024 21:16:15 +0800 Subject: [PATCH] Revert "change `pointId[]` to `long long`" This reverts commit a552997745160ac47d97998ad7feae176556e823. --- src/raylib.h | 2 +- src/rcore.c | 6 +++--- src/rgestures.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/raylib.h b/src/raylib.h index a3e2583e2..1a15e124d 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1195,7 +1195,7 @@ RLAPI void SetMouseCursor(int cursor); // Set mouse curso RLAPI int GetTouchX(void); // Get touch position X for touch point 0 (relative to screen size) RLAPI int GetTouchY(void); // Get touch position Y for touch point 0 (relative to screen size) RLAPI Vector2 GetTouchPosition(int index); // Get touch position XY for a touch point index (relative to screen size) -RLAPI long long GetTouchPointId(int index); // Get touch point identifier for given index +RLAPI int GetTouchPointId(int index); // Get touch point identifier for given index RLAPI int GetTouchPointCount(void); // Get number of touch points //------------------------------------------------------------------------------------ diff --git a/src/rcore.c b/src/rcore.c index 2589483a2..7c39a236a 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -323,7 +323,7 @@ typedef struct CoreData { } Mouse; struct { int pointCount; // Number of touch points active - long long pointId[MAX_TOUCH_POINTS]; // Point identifiers + int pointId[MAX_TOUCH_POINTS]; // Point identifiers Vector2 position[MAX_TOUCH_POINTS]; // Touch position on screen char currentTouchState[MAX_TOUCH_POINTS]; // Registers current touch state char previousTouchState[MAX_TOUCH_POINTS]; // Registers previous touch state @@ -3038,9 +3038,9 @@ Vector2 GetTouchPosition(int index) } // Get touch point identifier for given index -long long GetTouchPointId(int index) +int GetTouchPointId(int index) { - long long id = -1; + int id = -1; if (index < MAX_TOUCH_POINTS) id = CORE.Input.Touch.pointId[index]; diff --git a/src/rgestures.h b/src/rgestures.h index 9248b362e..664a6e1cc 100644 --- a/src/rgestures.h +++ b/src/rgestures.h @@ -102,7 +102,7 @@ typedef enum { typedef struct { int touchAction; int pointCount; - long long pointId[MAX_TOUCH_POINTS]; + int pointId[MAX_TOUCH_POINTS]; Vector2 position[MAX_TOUCH_POINTS]; } GestureEvent;