mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 05:36:35 +00:00
Added position to touch press and release events.
This commit is contained in:
parent
e598013d3c
commit
2875ec1242
@ -555,14 +555,18 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
|
|||||||
|
|
||||||
if (inputs[i].dwFlags & TOUCHEVENTF_DOWN)
|
if (inputs[i].dwFlags & TOUCHEVENTF_DOWN)
|
||||||
_glfwInputTouch(window, (int) inputs[i].dwID, GLFW_PRESS);
|
_glfwInputTouch(window, (int) inputs[i].dwID, GLFW_PRESS);
|
||||||
else if (inputs[i].dwFlags & TOUCHEVENTF_UP)
|
|
||||||
_glfwInputTouch(window, (int) inputs[i].dwID, GLFW_RELEASE);
|
if (inputs[i].dwFlags & TOUCHEVENTF_DOWN ||
|
||||||
else if (inputs[i].dwFlags & TOUCHEVENTF_MOVE)
|
inputs[i].dwFlags & TOUCHEVENTF_UP ||
|
||||||
|
inputs[i].dwFlags & TOUCHEVENTF_MOVE)
|
||||||
{
|
{
|
||||||
_glfwInputTouchPos(window, (int) inputs[i].dwID,
|
_glfwInputTouchPos(window, (int) inputs[i].dwID,
|
||||||
inputs[i].x / 100.0 - xpos,
|
inputs[i].x / 100.0 - xpos,
|
||||||
inputs[i].y / 100.0 - ypos);
|
inputs[i].y / 100.0 - ypos);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (inputs[i].dwFlags & TOUCHEVENTF_UP)
|
||||||
|
_glfwInputTouch(window, (int) inputs[i].dwID, GLFW_RELEASE);
|
||||||
}
|
}
|
||||||
|
|
||||||
_glfw_CloseTouchInputHandle((HTOUCHINPUT) lParam);
|
_glfw_CloseTouchInputHandle((HTOUCHINPUT) lParam);
|
||||||
|
Loading…
Reference in New Issue
Block a user