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 2422

Summary: [TRIVIAL] Hexadecimal digit for "half" is 0x8 not 0x5.
Product: SDL Reporter: davidaciko
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED WONTFIX QA Contact: Sam Lantinga <slouken>
Severity: trivial    
Priority: P2    
Version: 2.0.1   
Hardware: All   
OS: All   

Description davidaciko 2014-02-27 09:06:53 UTC
In the typedef enum SDL_EventType, it seems that SDL_CONTROLLERAXISMOTION was intended to fall half-way between SDL_JOYAXISMOTION (0x600) and SDL_FINGERDOWN (0x700), but the digit 0x5 was used instead of 0x8 for half.  This makes it slightly harder to form separate bit-masks for joystick and controller events if more event types are added in the future.  Besides, it bugs my OCD.

Line 114 in SDL_events.h currently erroneously reads:
    SDL_CONTROLLERAXISMOTION  = 0x650, /**< Game controller axis motion */

It should be changed to this:
    SDL_CONTROLLERAXISMOTION  = 0x680, /**< Game controller axis motion */
Comment 1 Sam Lantinga 2014-02-27 14:10:30 UTC
Unfortunately changing it will break binary compatibility.  Thanks for the report!
Comment 2 davidaciko 2014-02-27 20:21:10 UTC
Okay, no problem, thanks! >^,^<