aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c')
-rw-r--r--Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
index eee9343d3..04f4d2476 100644
--- a/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
+++ b/Demos/Host/LowLevel/JoystickHostWithParser/JoystickHostWithParser.c
@@ -282,7 +282,7 @@ void ProcessJoystickReport(uint8_t* JoystickReport)
if (!(FoundData))
continue;
- int16_t DeltaMovement = (int16_t)(ReportItem->Value << (16 - ReportItem->Attributes.BitSize));
+ int16_t DeltaMovement = HID_ALIGN_DATA(ReportItem, int16_t);
/* Determine if the report is for the X or Y delta movement */
if (ReportItem->Attributes.Usage.Usage == USAGE_X)