mirror of https://github.com/encounter/SDL.git
Emscripten: Fixed SDL_GetTouchDevice() returning 0 for the valid device index.
The single touch device gets SDL_TouchID 1 (like on iOS and WinRT).
This commit is contained in:
parent
86e9ab79ce
commit
5d6aa08b28
|
@ -375,7 +375,7 @@ Emscripten_HandleTouch(int eventType, const EmscriptenTouchEvent *touchEvent, vo
|
||||||
SDL_WindowData *window_data = userData;
|
SDL_WindowData *window_data = userData;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
SDL_TouchID deviceId = 0;
|
SDL_TouchID deviceId = 1;
|
||||||
if (SDL_AddTouch(deviceId, "") < 0) {
|
if (SDL_AddTouch(deviceId, "") < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue