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 - [TRIVIAL] Hexadecimal digit for "half" is 0x8 not 0x5.
Summary: [TRIVIAL] Hexadecimal digit for "half" is 0x8 not 0x5.
Status: RESOLVED WONTFIX
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: 2.0.1
Hardware: All All
: P2 trivial
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-27 09:06 UTC by davidaciko
Modified: 2014-02-27 20:21 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 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! >^,^<