Parcourir la source

Understand mouse as touch in web

pull/107/head
raysan5 il y a 9 ans
Parent
révision
fa78023aa4
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. +2
    -0
      src/core.c

+ 2
- 0
src/core.c Voir le fichier

@ -1793,6 +1793,8 @@ static void MouseCursorPosCallback(GLFWwindow *window, double x, double y)
// Register touch points position, only one point registered
gestureEvent.position[0] = (Vector2){ (float)x, (float)y };
touchPosition[0] = gestureEvent.position[0];
// Normalize gestureEvent.position[0] for screenWidth and screenHeight
gestureEvent.position[0].x /= (float)GetScreenWidth();
gestureEvent.position[0].y /= (float)GetScreenHeight();

||||||
x
 
000:0
Chargement…
Annuler
Enregistrer