mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-06-06 14:43:20 +00:00
Make sure the type in the SDL_Event aligns properly across the union
This commit is contained in:
parent
e9ab2d46de
commit
790cd395f5
2 changed files with 8 additions and 1 deletions
|
|
@ -227,7 +227,11 @@ typedef enum
|
|||
/**
|
||||
* This last event is only for bounding internal arrays
|
||||
*/
|
||||
SDL_EVENT_LAST = 0xFFFF
|
||||
SDL_EVENT_LAST = 0xFFFF,
|
||||
|
||||
/* This just makes sure the enum is the size of Uint32 */
|
||||
SDL_EVENT_ENUM_PADDING = 0x7FFFFFFF
|
||||
|
||||
} SDL_EventType;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@
|
|||
/* Determines how often we wake to call SDL_PumpEvents() in SDL_WaitEventTimeout_Device() */
|
||||
#define PERIODIC_POLL_INTERVAL_NS (3 * SDL_NS_PER_SECOND)
|
||||
|
||||
/* Make sure the type in the SDL_Event aligns properly across the union */
|
||||
SDL_COMPILE_TIME_ASSERT(SDL_Event_type, sizeof(Uint32) == sizeof(SDL_EventType));
|
||||
|
||||
typedef struct SDL_EventWatcher
|
||||
{
|
||||
SDL_EventFilter callback;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue