We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1921

Summary: JoystickGetAxis overflows on X360 Controller
Product: SDL Reporter: Ethan Lee <flibitijibibo>
Component: joystickAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   

Description Ethan Lee 2013-06-20 01:12:14 UTC
The problematic revision: http://hg.libsdl.org/SDL/rev/a8145f734ad3

After this revision, moving the 360 controller's left stick to the bottom (maximum Y value) overflows to -32768. 

Was there a specific case that caused this change?

This is what we're doing in MG-SDL2 with GameController:

https://github.com/flibitijibibo/MonoGame/blob/monogame-sdl2/MonoGame.Framework/SDL2/Input/SDL2_GamePad.cs#L656

Should we be doing something else (besides being ashamed of ourselves for all the casting)?
Comment 1 Ethan Lee 2013-07-01 09:01:06 UTC
This was fixed in revision 46de847fef38:

http://hg.libsdl.org/SDL/rev/46de847fef38