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