Skip to content

Commit 3d97056

Browse files
committed
fix gamecube y
1 parent f13cfc4 commit 3d97056

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=GameControllersSTM32
2-
version=0.0.3
2+
version=0.0.4
33
author=Alexander Pruss
44
maintainer=arpruss <[email protected]>
55
sentence=Support Nunchuck, GameCube controller and Game Port joysticks on STM32F1

src/gamecube.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ bool GameCubeController::readWithRumble(GameControllerData_t* data, bool rumble)
9494
data->device = CONTROLLER_GAMECUBE;
9595
data->buttons = gcData.buttons;
9696
data->joystickX = rescale(gcData.joystickX);
97-
data->joystickY = rescale(gcData.joystickY);
97+
data->joystickY = 1023-rescale(gcData.joystickY);
9898
data->cX = rescale(gcData.cX);
99-
data->cY = rescale(gcData.cY);
99+
data->cY = 1023-rescale(gcData.cY);
100100
data->shoulderLeft = rescale(gcData.shoulderLeft);
101101
data->shoulderRight = rescale(gcData.shoulderRight);
102102
return true;

0 commit comments

Comments
 (0)