Corrections, improvements and additions to the incomplete RNDISHost demo.
[pub/USBasp.git] / Demos / Device / ClassDriver / Joystick / Joystick.c
index 36a74a2..00bcb6f 100644 (file)
@@ -148,10 +148,10 @@ bool CALLBACK_HID_Device_CreateHIDReport(USB_ClassInfo_HID_Device_t* const HIDIn
        else if (JoyStatus_LCL & JOY_DOWN)\r
          JoystickReport->Y =  100;\r
 \r
-       if (JoyStatus_LCL & JOY_RIGHT)\r
-         JoystickReport->X =  100;\r
-       else if (JoyStatus_LCL & JOY_LEFT)\r
+       if (JoyStatus_LCL & JOY_LEFT)\r
          JoystickReport->X = -100;\r
+       else if (JoyStatus_LCL & JOY_RIGHT)\r
+         JoystickReport->X =  100;\r
 \r
        if (JoyStatus_LCL & JOY_PRESS)\r
          JoystickReport->Button  = (1 << 1);\r