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 7082 e9d6004d2978
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
--- a/include/SDL_events.h	Fri Apr 19 16:02:16 2013 -0700
+++ b/include/SDL_events.h	Sat Apr 20 23:05:08 2013 -0400
@@ -124,11 +124,11 @@
 /**
  *  \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 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 */
--- a/src/events/SDL_events.c	Fri Apr 19 16:02:16 2013 -0700
+++ b/src/events/SDL_events.c	Sat Apr 20 23:05:08 2013 -0400
@@ -365,7 +365,7 @@
 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;
     }