Fixed HID Parser not distributing the Usage Min and Usage Max values across an array...
[pub/lufa.git] / Demos / Host / LowLevel / JoystickHostWithParser / JoystickHostWithParser.c
index eee9343..04f4d24 100644 (file)
@@ -282,7 +282,7 @@ void ProcessJoystickReport(uint8_t* JoystickReport)
                        if (!(FoundData))\r
                          continue;\r
                          \r
-                       int16_t DeltaMovement = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));\r
+                       int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem, int16_t);\r
                        \r
                        /* Determine if the report is for the X or Y delta movement */\r
                        if (ReportItem->Attributes.Usage.Usage == USAGE_X)\r