瀏覽代碼

Fix swipe gestures for web (#3151)

pull/3153/head
ubkp 1 年之前
committed by GitHub
父節點
當前提交
ffe4d36e0a
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: 4AEE18F83AFDEB23
共有 1 個檔案被更改,包括 4 行新增0 行删除
  1. +4
    -0
      src/rcore.c

+ 4
- 0
src/rcore.c 查看文件

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

Loading…
取消
儲存