+ bool IsMouse = false;\r
+\r
+ /* Iterate through the item's collection path, until either the root collection node or a collection with the\r
+ * Mouse Usage is found - this prevents Joysticks, which use identical descriptors except for the Joystick usage\r
+ * parent node, from being erronously treated as a mouse\r
+ */\r
+ for (HID_CollectionPath_t* CurrPath = CurrentItem->CollectionPath; CurrPath != NULL; CurrPath = CurrPath->Parent)\r
+ {\r
+ if ((CurrPath->Usage.Page == USAGE_PAGE_GENERIC_DCTRL) &&\r
+ (CurrPath->Usage.Usage == USAGE_MOUSE))\r
+ {\r
+ IsMouse = true;\r
+ break;\r
+ }\r
+ }\r
+\r
+ /* If a collection with the mouse usage was not found, indicate that we are not interested in this item */\r
+ if (!IsMouse)\r
+ return false;\r
+\r