| Summary: | [TRIVIAL] Hexadecimal digit for "half" is 0x8 not 0x5. | ||
|---|---|---|---|
| Product: | SDL | Reporter: | davidaciko |
| Component: | events | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED WONTFIX | QA Contact: | Sam Lantinga <slouken> |
| Severity: | trivial | ||
| Priority: | P2 | ||
| Version: | 2.0.1 | ||
| Hardware: | All | ||
| OS: | All | ||
Unfortunately changing it will break binary compatibility. Thanks for the report! Okay, no problem, thanks! >^,^< |
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 */