Sfoglia il codice sorgente

Fix swipe gestures for web (#3151)

pull/3153/head
ubkp 2 anni fa
committed by GitHub
parent
commit
ffe4d36e0a
Non sono state trovate chiavi note per questa firma nel database ID Chiave GPG: 4AEE18F83AFDEB23
1 ha cambiato i file con 4 aggiunte e 0 eliminazioni
  1. +4
    -0
      src/rcore.c

+ 4
- 0
src/rcore.c Vedi File

@ -6131,6 +6131,10 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent
{
gestureEvent.pointId[i] = CORE.Input.Touch.pointId[i];
gestureEvent.position[i] = CORE.Input.Touch.position[i];
// Normalize gestureEvent.position[i]
gestureEvent.position[i].x /= (float)GetScreenWidth();
gestureEvent.position[i].y /= (float)GetScreenHeight();
}
// Gesture data is sent to gestures system for processing

Caricamento…
Annulla
Salva