aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/Joystick
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2009-11-13 13:24:04 +0000
committerDean Camera <dean@fourwalledcubicle.com>2009-11-13 13:24:04 +0000
commit588886878e0fe948417123b57c108a1bd7992f85 (patch)
treeb2a87de1c9a49c8c10f9978770a089071d03cb2e /Demos/Device/ClassDriver/Joystick
parente625fd6df33ab2112779728622a717589f0b8417 (diff)
downloadlufa-588886878e0fe948417123b57c108a1bd7992f85.tar.gz
lufa-588886878e0fe948417123b57c108a1bd7992f85.tar.bz2
lufa-588886878e0fe948417123b57c108a1bd7992f85.zip
Corrections, improvements and additions to the incomplete RNDISHost demo.
Change device demos which use the joystick to use the natural UP, DOWN, LEFT, RIGHT ordering in all demos when checking the joystick's position.
Diffstat (limited to 'Demos/Device/ClassDriver/Joystick')
-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);