浏览代码

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).
Philipp Wiesemann 10 年之前
父节点
当前提交
cd1d7c94e9
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/video/wayland/SDL_waylandtouch.c

+ 1 - 1
src/video/wayland/SDL_waylandtouch.c

@@ -88,7 +88,7 @@ touch_handle_touch(void *data,
     uint32_t capabilities = flags >> 16;
     */
 
-    SDL_TouchID deviceId = 0;
+    SDL_TouchID deviceId = 1;
 	if (SDL_AddTouch(deviceId, "qt_touch_extension") < 0) {
 		 SDL_Log("error: can't add touch %s, %d", __FILE__, __LINE__);
 	}