From 5d6aa08b2809338c68578f94ab77e496d50b3290 Mon Sep 17 00:00:00 2001 From: Philipp Wiesemann Date: Tue, 9 Jun 2015 21:06:29 +0200 Subject: [PATCH] Emscripten: Fixed SDL_GetTouchDevice() returning 0 for the valid device index. The single touch device gets SDL_TouchID 1 (like on iOS and WinRT). --- src/video/emscripten/SDL_emscriptenevents.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/emscripten/SDL_emscriptenevents.c b/src/video/emscripten/SDL_emscriptenevents.c index d87be820f..79fa310f8 100644 --- a/src/video/emscripten/SDL_emscriptenevents.c +++ b/src/video/emscripten/SDL_emscriptenevents.c @@ -375,7 +375,7 @@ Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, vo SDL_WindowData *window_data = userData; int i; - SDL_TouchID deviceId = 0; + SDL_TouchID deviceId = 1; if (SDL_AddTouch(deviceId, "") < 0) { return 0; }