changeset 3167:0c85abc61e47

Added a #ifndef SDL_NO_COMPAT around SDL_ActiveEvent and SDL_ResizeEvent so that code that has a #defien SDL_NO_COMPAT before the #include SDL.h with not be able to use these obsolete events.
author Bob Pendleton <bob@pendleton.com>
date Fri, 05 Jun 2009 23:36:00 +0000
parents 3a63a5824557
children 6338b7f2d024
files include/SDL_events.h
diffstat 1 files changed, 19 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/include/SDL_events.h	Fri Jun 05 07:35:06 2009 +0000
+++ b/include/SDL_events.h	Fri Jun 05 23:36:00 2009 +0000
@@ -313,20 +313,6 @@
     SDL_SysWMmsg *msg;  /**< driver dependent data, defined in SDL_syswm.h */
 } SDL_SysWMEvent;
 
-/* Typedefs for backwards compatibility */
-typedef struct SDL_ActiveEvent
-{
-    Uint8 type;
-    Uint8 gain;
-    Uint8 state;
-} SDL_ActiveEvent;
-typedef struct SDL_ResizeEvent
-{
-    Uint8 type;
-    int w;
-    int h;
-} SDL_ResizeEvent;
-
 typedef struct SDL_ProximityEvent
 {
     Uint8 type;
@@ -336,6 +322,23 @@
     int y;
 } SDL_ProximityEvent;
 
+/* Typedefs for backwards compatibility */
+#ifndef SDL_NO_COMPAT
+typedef struct SDL_ActiveEvent
+{
+    Uint8 type;
+    Uint8 gain;
+    Uint8 state;
+} SDL_ActiveEvent;
+
+typedef struct SDL_ResizeEvent
+{
+    Uint8 type;
+    int w;
+    int h;
+} SDL_ResizeEvent;
+#endif
+
 /**
  * \union SDL_Event
  *
@@ -360,8 +363,10 @@
     SDL_ProximityEvent proximity;   /**< Proximity In or Out event */
 
     /* Temporarily here for backwards compatibility */
+#ifndef SDL_NO_COMPAT
     SDL_ActiveEvent active;
     SDL_ResizeEvent resize;
+#endif
 } SDL_Event;