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

Summary: KMOD_* flags unnecessarily macros; breaks OGRE
Product: SDL Reporter: Rainer Deyke <rainerd>
Component: eventsAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.1   
Hardware: All   
OS: All   
Attachments: Patch that fixes the problem
fixed patch

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