浏览代码

Fix Android multi-touch (#1869)

pull/1874/head
Humberto Yeverino Jr 4 年前
committed by GitHub
父节点
当前提交
8277597bcf
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. +7
    -0
      src/core.c

+ 7
- 0
src/core.c 查看文件

@ -5249,6 +5249,13 @@ static int32_t AndroidInputCallback(struct android_app *app, AInputEvent *event)
CORE.Input.Touch.position[0].x = AMotionEvent_getX(event, 0);
CORE.Input.Touch.position[0].y = AMotionEvent_getY(event, 0);
unsigned int touchCount = AMotionEvent_getPointerCount(event);
for (int i = 1; i < touchCount && i < MAX_TOUCH_POINTS; i++)
{
CORE.Input.Touch.position[i].x = AMotionEvent_getX(event, i);
CORE.Input.Touch.position[i].y = AMotionEvent_getY(event, i);
}
int32_t action = AMotionEvent_getAction(event);
unsigned int flags = action & AMOTION_EVENT_ACTION_MASK;

正在加载...
取消
保存