Emscripten: Fixed SDL_GetTouchDevice() returning 0 for the valid device index.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Tue, 09 Jun 2015 21:06:29 +0200
changeset 97256bfe2f6069b0
parent 9724 ecabd2df00e0
child 9726 c45180a5db6e
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
     1.1 --- a/src/video/emscripten/SDL_emscriptenevents.c	Mon Jun 08 20:46:09 2015 +0200
     1.2 +++ b/src/video/emscripten/SDL_emscriptenevents.c	Tue Jun 09 21:06:29 2015 +0200
     1.3 @@ -375,7 +375,7 @@
     1.4      SDL_WindowData *window_data = userData;
     1.5      int i;
     1.6  
     1.7 -    SDL_TouchID deviceId = 0;
     1.8 +    SDL_TouchID deviceId = 1;
     1.9      if (SDL_AddTouch(deviceId, "") < 0) {
    1.10           return 0;
    1.11      }