From 0bd64b7975722382773a5928e80dfe64da30b335 Mon Sep 17 00:00:00 2001 From: Mickaël Malécot Date: Sat, 9 May 2020 12:39:41 +0200 Subject: Gamepad axis bug fixes and improvement (#1228) * Fix gamepad axis count * Fix Xbox axis drawing * Ignore low axis values * Revert "Fix gamepad axis count" This reverts commit f08ae4bf * Fix GamepadAxis API * Fix conflict with master * Revert Gamepad MAX definitions * Revert MAX_GAMEPAD_AXIS update --- examples/core/core_input_gamepad.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'examples') diff --git a/examples/core/core_input_gamepad.c b/examples/core/core_input_gamepad.c index 51646aab..ab4b731a 100644 --- a/examples/core/core_input_gamepad.c +++ b/examples/core/core_input_gamepad.c @@ -92,13 +92,13 @@ int main(void) DrawCircle(259, 152, 39, BLACK); DrawCircle(259, 152, 34, LIGHTGRAY); DrawCircle(259 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_X)*20), - 152 - (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK); + 152 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_LEFT_Y)*20), 25, BLACK); // Draw axis: right joystick DrawCircle(461, 237, 38, BLACK); DrawCircle(461, 237, 33, LIGHTGRAY); DrawCircle(461 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_X)*20), - 237 - (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK); + 237 + (GetGamepadAxisMovement(GAMEPAD_PLAYER1, GAMEPAD_AXIS_RIGHT_Y)*20), 25, BLACK); // Draw axis: left-right triggers DrawRectangle(170, 30, 15, 70, GRAY); -- cgit v1.2.3