Browse Source

Revert "change `pointId[]` to `long long`"

This reverts commit a552997745.
pull/3880/head
blueloveTH 9 months ago
parent
commit
d1a8b86148
3 changed files with 5 additions and 5 deletions
  1. +1
    -1
      src/raylib.h
  2. +3
    -3
      src/rcore.c
  3. +1
    -1
      src/rgestures.h

+ 1
- 1
src/raylib.h View File

@ -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
//------------------------------------------------------------------------------------

+ 3
- 3
src/rcore.c View File

@ -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];

+ 1
- 1
src/rgestures.h View File

@ -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;

Loading…
Cancel
Save