From 9301f33d6fc0191589a9f7aa62701f78bf56bc73 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Wed, 25 Apr 2012 23:56:56 +0200 Subject: [PATCH] Add position to touch press and release events --- src/win32_window.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/win32_window.c b/src/win32_window.c index 348764040..264895783 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -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);