aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/Joystick/Joystick.c
diff options
context:
space:
mode:
Diffstat (limited to 'Demos/Device/ClassDriver/Joystick/Joystick.c')
-rw-r--r--Demos/Device/ClassDriver/Joystick/Joystick.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Demos/Device/ClassDriver/Joystick/Joystick.c b/Demos/Device/ClassDriver/Joystick/Joystick.c
index 36a74a218..00bcb6fe4 100644
--- a/Demos/Device/ClassDriver/Joystick/Joystick.c
+++ b/Demos/Device/ClassDriver/Joystick/Joystick.c
@@ -148,10 +148,10 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
else if (JoyStatus_LCL & JOY_DOWN)
JoystickReport->Y = 100;
- if (JoyStatus_LCL & JOY_RIGHT)
- JoystickReport->X = 100;
- else if (JoyStatus_LCL & JOY_LEFT)
+ if (JoyStatus_LCL & JOY_LEFT)
JoystickReport->X = -100;
+ else if (JoyStatus_LCL & JOY_RIGHT)
+ JoystickReport->X = 100;
if (JoyStatus_LCL & JOY_PRESS)
JoystickReport->Button = (1 << 1);