comments update
This commit is contained in:
parent
21e98a7eb5
commit
9514b5d75f
|
|
@ -1636,10 +1636,8 @@ static EM_BOOL EmscriptenTouchCallback(int eventType, const EmscriptenTouchEvent
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update mouse position if we detect a single touch.
|
// Update mouse position if we detect a single touch.
|
||||||
// This is essential for raylib to work on touchscreen.
|
if (CORE.Input.Touch.pointCount == 1)
|
||||||
// Otherwise, mouse position will always be 0,0, so that
|
{
|
||||||
// things such as raygui and examples/shapes/shapes_lines_bezier.c won't work
|
|
||||||
if (CORE.Input.Touch.pointCount == 1) {
|
|
||||||
CORE.Input.Mouse.currentPosition.x = CORE.Input.Touch.position[0].x;
|
CORE.Input.Mouse.currentPosition.x = CORE.Input.Touch.position[0].x;
|
||||||
CORE.Input.Mouse.currentPosition.y = CORE.Input.Touch.position[0].y;
|
CORE.Input.Mouse.currentPosition.y = CORE.Input.Touch.position[0].y;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user