Sfoglia il codice sorgente

change `pointId[]` to `long long`

pull/3880/head
blueloveTH 1 anno fa
parent
commit
a552997745
3 ha cambiato i file con 5 aggiunte e 5 eliminazioni
  1. +1
    -1
      src/raylib.h
  2. +3
    -3
      src/rcore.c
  3. +1
    -1
      src/rgestures.h

+ 1
- 1
src/raylib.h Vedi 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 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 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 Vector2 GetTouchPosition(int index); // Get touch position XY for a touch point index (relative to screen size)
RLAPI int GetTouchPointId(int index); // Get touch point identifier for given index
RLAPI long long GetTouchPointId(int index); // Get touch point identifier for given index
RLAPI int GetTouchPointCount(void); // Get number of touch points RLAPI int GetTouchPointCount(void); // Get number of touch points
//------------------------------------------------------------------------------------ //------------------------------------------------------------------------------------

+ 3
- 3
src/rcore.c Vedi File

@ -323,7 +323,7 @@ typedef struct CoreData {
} Mouse; } Mouse;
struct { struct {
int pointCount; // Number of touch points active int pointCount; // Number of touch points active
int pointId[MAX_TOUCH_POINTS]; // Point identifiers
long long pointId[MAX_TOUCH_POINTS]; // Point identifiers
Vector2 position[MAX_TOUCH_POINTS]; // Touch position on screen Vector2 position[MAX_TOUCH_POINTS]; // Touch position on screen
char currentTouchState[MAX_TOUCH_POINTS]; // Registers current touch state char currentTouchState[MAX_TOUCH_POINTS]; // Registers current touch state
char previousTouchState[MAX_TOUCH_POINTS]; // Registers previous 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 // Get touch point identifier for given index
int GetTouchPointId(int index)
long long GetTouchPointId(int index)
{ {
int id = -1;
long long id = -1;
if (index < MAX_TOUCH_POINTS) id = CORE.Input.Touch.pointId[index]; if (index < MAX_TOUCH_POINTS) id = CORE.Input.Touch.pointId[index];

+ 1
- 1
src/rgestures.h Vedi File

@ -102,7 +102,7 @@ typedef enum {
typedef struct { typedef struct {
int touchAction; int touchAction;
int pointCount; int pointCount;
int pointId[MAX_TOUCH_POINTS];
long long pointId[MAX_TOUCH_POINTS];
Vector2 position[MAX_TOUCH_POINTS]; Vector2 position[MAX_TOUCH_POINTS];
} GestureEvent; } GestureEvent;

Caricamento…
Annulla
Salva