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 - JoystickGetAxis overflows on X360 Controller
Summary: JoystickGetAxis overflows on X360 Controller
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: joystick (show other bugs)
Version: HG 2.0
Hardware: All Windows (All)
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-20 01:12 UTC by Ethan Lee
Modified: 2013-07-01 09:01 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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