Skip to content

Commit

Permalink
Emscripten: Fixed SDL_GetTouchDevice() returning 0 for the valid devi…
Browse files Browse the repository at this point in the history
…ce index.

The single touch device gets SDL_TouchID 1 (like on iOS and WinRT).
  • Loading branch information
philippwiesemann committed Jun 9, 2015
1 parent 86e9ab7 commit 5d6aa08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/emscripten/SDL_emscriptenevents.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5d6aa08

Please sign in to comment.