Skip to content

Commit 45d8534

Browse files
committed
reorder y
1 parent 41adfc2 commit 45d8534

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/gamecube.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ bool GameCubeController::readWithRumble(GameControllerData_t* data, bool rumble)
9494
data->joystickX = rescale(gcData.joystickX);
9595
data->joystickY = rescale(gcData.joystickY);
9696
data->cX = rescale(gcData.cX);
97-
data->cY = rescale(gcData.cY);
97+
data->cY = 1023-rescale(gcData.cY);
9898
data->shoulderLeft = rescale(gcData.shoulderLeft);
9999
data->shoulderRight = rescale(gcData.shoulderRight);
100100
return true;

src/nunchuck.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ bool NunchuckController::read(GameControllerData_t* data) {
7171
return 0;
7272
memset(data, 0, sizeof(GameControllerData_t));
7373
data->joystickX = rescale(buffer[0]);
74-
data->joystickY = rescale(buffer[1]);
74+
data->joystickY = 1023-rescale(buffer[1]);
7575
data->buttons = 0;
7676
if (! (buffer[5] & 1) ) // Z
7777
data->buttons |= 1;

0 commit comments

Comments
 (0)