Diff between 69c012fbbefe5f37703585d22c4be4626721ef02 and 66c60e482225a0f418d0cdf505fcc2b423a09daf

Changed Files

File Additions Deletions Status
profiles/input/hog_device.c +13 -1 modified

Full Patch

diff --git a/profiles/input/hog_device.c b/profiles/input/hog_device.c
index 5bd713a..f3b459b 100644
--- a/profiles/input/hog_device.c
+++ b/profiles/input/hog_device.c
@@ -56,6 +56,7 @@
 
 #define HOG_REPORT_TYPE_INPUT	1
 #define HOG_REPORT_TYPE_OUTPUT	2
+#define HOG_REPORT_TYPE_FEATURE	3
 
 #define UHID_DEVICE_FILE	"/dev/uhid"
 
@@ -363,10 +364,20 @@ static void forward_report(struct hog_device *hogdev,
 	int size;
 	guint type;
 
-	type = HOG_REPORT_TYPE_OUTPUT;
 	data = ev->u.output.data;
 	size = ev->u.output.size;
 
+	switch (ev->type) {
+	case UHID_OUTPUT:
+		type = HOG_REPORT_TYPE_OUTPUT;
+		break;
+	case UHID_FEATURE:
+		type = HOG_REPORT_TYPE_FEATURE;
+		break;
+	default:
+		return;
+	}
+
 	l = g_slist_find_custom(hogdev->reports, GUINT_TO_POINTER(type),
 							report_type_cmp);
 	if (!l)
@@ -410,6 +421,7 @@ static gboolean uhid_event_cb(GIOChannel *io, GIOCondition cond,
 
 	switch (ev.type) {
 	case UHID_OUTPUT:
+	case UHID_FEATURE:
 		forward_report(hogdev, &ev);
 		break;
 	case UHID_OUTPUT_EV: