1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2025-01-30 19:08:51 -05:00

Add position to touch press and release events

This commit is contained in:
Camilla Berglund 2012-04-25 23:56:56 +02:00
parent b55db82f09
commit 9301f33d6f

View File

@ -618,14 +618,18 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
if (inputs[i].dwFlags & TOUCHEVENTF_DOWN)
_glfwInputTouch(window, (int) inputs[i].dwID, GLFW_PRESS);
else if (inputs[i].dwFlags & TOUCHEVENTF_UP)
_glfwInputTouch(window, (int) inputs[i].dwID, GLFW_RELEASE);
else if (inputs[i].dwFlags & TOUCHEVENTF_MOVE)
if (inputs[i].dwFlags & TOUCHEVENTF_DOWN ||
inputs[i].dwFlags & TOUCHEVENTF_UP ||
inputs[i].dwFlags & TOUCHEVENTF_MOVE)
{
_glfwInputTouchPos(window, (int) inputs[i].dwID,
inputs[i].x / 100.0 - xpos,
inputs[i].y / 100.0 - ypos);
}
if (inputs[i].dwFlags & TOUCHEVENTF_UP)
_glfwInputTouch(window, (int) inputs[i].dwID, GLFW_RELEASE);
}
_glfw_CloseTouchInputHandle((HTOUCHINPUT) lParam);