From f589310ef2e38ec0a4b57f79b619d8f8de02450b Mon Sep 17 00:00:00 2001
From: XProger <xproger@list.ru>
Date: Wed, 2 Jan 2019 04:25:03 +0300
Subject: [PATCH] fix unusable touch by adding touch identifier into
 touchPosition

---
 nx/include/switch/services/hid.h | 1 +
 nx/source/services/hid.c         | 1 +
 2 files changed, 2 insertions(+)

diff --git a/nx/include/switch/services/hid.h b/nx/include/switch/services/hid.h
index b7185afa..d2bd8e84 100644
--- a/nx/include/switch/services/hid.h
+++ b/nx/include/switch/services/hid.h
@@ -325,6 +325,7 @@ typedef enum
 
 typedef struct touchPosition
 {
+    u32 id;
     u32 px;
     u32 py;
     u32 dx;
diff --git a/nx/source/services/hid.c b/nx/source/services/hid.c
index 2e688937..5d29c925 100644
--- a/nx/source/services/hid.c
+++ b/nx/source/services/hid.c
@@ -472,6 +472,7 @@ void hidTouchRead(touchPosition *pos, u32 point_id) {
             return;
         }
 
+        pos->id = g_touchEntry.touches[point_id].touchIndex;
         pos->px = g_touchEntry.touches[point_id].x;
         pos->py = g_touchEntry.touches[point_id].y;
         pos->dx = g_touchEntry.touches[point_id].diameterX;