Hi, I have a Logitech gamepad. My application recognizes there's a controller of id 0. When I start my Pong game, the left pad moves upward for some odd reason. However, I'm not pressing up on the gamepad's Y axis when this happens.
While debugging, I get this value for joy.y_pos = "-0.0015259022". This is without pressing anything on the gamepad. I would expect the value to be 0. My gamepad works for other games, so I'm not sure why this is causing different behavior.
Moving the pad up/down on the Y-axis has no effect, as the pad just keeps wanting to move upward. The controller was calibrated.
I'm using SFML 2.1 on Win32(Windows 7). Controller: Logitech 940-000110 Gamepad F310. Are there any known reasons to this problem? Thanks.
joy.y_pos = sfJoystick_getAxisPosition(JOYSTICK_ID_0, sfJoystickY);
if (joy.y_pos < 0) {
joy.blnDown = FALSE;
joy.blnUp = TRUE;
}
else if (joy.y_pos > 0) {
joy.blnDown = TRUE;
joy.blnUp = FALSE;
}