future-proofing for Microsoft's C++/CX extensions, whereby "generic" is a reserved keyword
This commit is contained in:
parent
e4b6ac8025
commit
cf8a84626b
2 changed files with 4 additions and 4 deletions
|
@ -124,11 +124,11 @@ typedef enum
|
|||
/**
|
||||
* \brief Fields shared by every event
|
||||
*/
|
||||
typedef struct SDL_GenericEvent
|
||||
typedef struct SDL_CommonEvent
|
||||
{
|
||||
Uint32 type;
|
||||
Uint32 timestamp;
|
||||
} SDL_GenericEvent;
|
||||
} SDL_CommonEvent;
|
||||
|
||||
/**
|
||||
* \brief Window state change event data (event.window.*)
|
||||
|
@ -464,7 +464,7 @@ typedef struct SDL_SysWMEvent
|
|||
typedef union SDL_Event
|
||||
{
|
||||
Uint32 type; /**< Event type, shared with all events */
|
||||
SDL_GenericEvent generic; /**< Generic event data */
|
||||
SDL_CommonEvent common; /**< Common event data */
|
||||
SDL_WindowEvent window; /**< Window event data */
|
||||
SDL_KeyboardEvent key; /**< Keyboard event data */
|
||||
SDL_TextEditingEvent edit; /**< Text editing event data */
|
||||
|
|
|
@ -365,7 +365,7 @@ int
|
|||
SDL_PushEvent(SDL_Event * event)
|
||||
{
|
||||
SDL_EventWatcher *curr;
|
||||
event->generic.timestamp = SDL_GetTicks();
|
||||
event->common.timestamp = SDL_GetTicks();
|
||||
if (SDL_EventOK && !SDL_EventOK(SDL_EventOKParam, event)) {
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue