| Summary: | SDL_SYS_JoystickUpdate_XInput clamps the y axis wrongly | ||
|---|---|---|---|
| Product: | SDL | Reporter: | gummikana <assposti> |
| Component: | joystick | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | CC: | icculus |
| Version: | HG 2.1 | Keywords: | triage-2.0.4 |
| Hardware: | x86_64 | ||
| OS: | Windows 7 | ||
|
Description
gummikana
2015-02-26 10:50:20 UTC
Are you sure this fixes it? If you pass a -32768 here: SDL_PrivateJoystickAxis( joystick, 1, (Sint16)(-SDL_max(-32767, (int)pXInputState->Gamepad.sThumbLY)) ); That becomes: SDL_PrivateJoystickAxis( joystick, 1, (Sint16)(-SDL_max(-32767, (int)-32768)) ); And that SDL_max() will return -32767, since that's greater than -32768...so you still end up clamped between -32767 and 32767, even with the explicit cast. --ryan. Going to mark this as WONTFIX; we have to give up a value somewhere, and this one is as good as any. --ryan. |