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 5242 - KMOD_* flags unnecessarily macros; breaks OGRE
Summary: KMOD_* flags unnecessarily macros; breaks OGRE
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: events (show other bugs)
Version: HG 2.1
Hardware: All All
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-22 15:16 UTC by Rainer Deyke
Modified: 2020-08-10 15:43 UTC (History)
0 users

See Also:


Attachments
Patch that fixes the problem (692 bytes, patch)
2020-07-22 15:16 UTC, Rainer Deyke
Details | Diff
fixed patch (722 bytes, patch)
2020-07-22 17:06 UTC, Rainer Deyke
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Deyke 2020-07-22 15:16:45 UTC
Created attachment 4424 [details]
Patch that fixes the problem

While most of the KMOD_* flags are enums, the combination flags KMOD_CTRL, KMOD_ALT, KMOD_SHIFT and KMOD_GUI are defined as macros.  This breaks third-party code that uses these KMOD_* names for local identifiers, such as OGRE.  The correct thing to do is to make them all enums.
Comment 1 Rainer Deyke 2020-07-22 17:06:51 UTC
Created attachment 4425 [details]
fixed patch
Comment 2 Sam Lantinga 2020-08-10 15:43:22 UTC
Looks good, thanks!
https://hg.libsdl.org/SDL/rev/15a0bc9612e9