Wayland: Fixed SDL_GetTouchDevice() returning 0 for the valid device index.
authorPhilipp Wiesemann <philipp.wiesemann@arcor.de>
Tue, 09 Jun 2015 21:06:55 +0200
changeset 9726c45180a5db6e
parent 9725 6bfe2f6069b0
child 9727 b845f659e015
Wayland: Fixed SDL_GetTouchDevice() returning 0 for the valid device index.

The single touch device gets SDL_TouchID 1 (like on Emscripten, iOS and WinRT).
src/video/wayland/SDL_waylandtouch.c
     1.1 --- a/src/video/wayland/SDL_waylandtouch.c	Tue Jun 09 21:06:29 2015 +0200
     1.2 +++ b/src/video/wayland/SDL_waylandtouch.c	Tue Jun 09 21:06:55 2015 +0200
     1.3 @@ -88,7 +88,7 @@
     1.4      uint32_t capabilities = flags >> 16;
     1.5      */
     1.6  
     1.7 -    SDL_TouchID deviceId = 0;
     1.8 +    SDL_TouchID deviceId = 1;
     1.9  	if (SDL_AddTouch(deviceId, "qt_touch_extension") < 0) {
    1.10  		 SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__);
    1.11  	}