future-proofing for Microsoft's C++/CX extensions, whereby "generic" is a reserved keyword
authorDavid Ludwig <dludwig@pobox.com>
Sat, 20 Apr 2013 23:05:08 -0400
changeset 7082e9d6004d2978
parent 7081 ab543a0ef80c
child 7083 0cb47cc139d3
child 8464 a2a909304cfe
future-proofing for Microsoft's C++/CX extensions, whereby "generic" is a reserved keyword
include/SDL_events.h
src/events/SDL_events.c
     1.1 --- a/include/SDL_events.h	Fri Apr 19 16:02:16 2013 -0700
     1.2 +++ b/include/SDL_events.h	Sat Apr 20 23:05:08 2013 -0400
     1.3 @@ -124,11 +124,11 @@
     1.4  /**
     1.5   *  \brief Fields shared by every event
     1.6   */
     1.7 -typedef struct SDL_GenericEvent
     1.8 +typedef struct SDL_CommonEvent
     1.9  {
    1.10      Uint32 type;
    1.11      Uint32 timestamp;
    1.12 -} SDL_GenericEvent;
    1.13 +} SDL_CommonEvent;
    1.14      
    1.15  /**
    1.16   *  \brief Window state change event data (event.window.*)
    1.17 @@ -464,7 +464,7 @@
    1.18  typedef union SDL_Event
    1.19  {
    1.20      Uint32 type;                    /**< Event type, shared with all events */
    1.21 -    SDL_GenericEvent generic;       /**< Generic event data */
    1.22 +    SDL_CommonEvent common;         /**< Common event data */
    1.23      SDL_WindowEvent window;         /**< Window event data */
    1.24      SDL_KeyboardEvent key;          /**< Keyboard event data */
    1.25      SDL_TextEditingEvent edit;      /**< Text editing event data */
     2.1 --- a/src/events/SDL_events.c	Fri Apr 19 16:02:16 2013 -0700
     2.2 +++ b/src/events/SDL_events.c	Sat Apr 20 23:05:08 2013 -0400
     2.3 @@ -365,7 +365,7 @@
     2.4  SDL_PushEvent(SDL_Event * event)
     2.5  {
     2.6      SDL_EventWatcher *curr;
     2.7 -    event->generic.timestamp = SDL_GetTicks();
     2.8 +    event->common.timestamp = SDL_GetTicks();
     2.9      if (SDL_EventOK && !SDL_EventOK(SDL_EventOKParam, event)) {
    2.10          return 0;
    2.11      }