Commit 2011e3d2 authored by Bob Pendleton's avatar Bob Pendleton

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.

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%403624
parent 3795d42a
...@@ -313,28 +313,31 @@ typedef struct SDL_SysWMEvent ...@@ -313,28 +313,31 @@ typedef struct SDL_SysWMEvent
SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */ SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
} SDL_SysWMEvent; } SDL_SysWMEvent;
typedef struct SDL_ProximityEvent
{
Uint8 type;
Uint8 which;
int cursor;
int x;
int y;
} SDL_ProximityEvent;
/* Typedefs for backwards compatibility */ /* Typedefs for backwards compatibility */
#ifndef SDL_NO_COMPAT
typedef struct SDL_ActiveEvent typedef struct SDL_ActiveEvent
{ {
Uint8 type; Uint8 type;
Uint8 gain; Uint8 gain;
Uint8 state; Uint8 state;
} SDL_ActiveEvent; } SDL_ActiveEvent;
typedef struct SDL_ResizeEvent typedef struct SDL_ResizeEvent
{ {
Uint8 type; Uint8 type;
int w; int w;
int h; int h;
} SDL_ResizeEvent; } SDL_ResizeEvent;
#endif
typedef struct SDL_ProximityEvent
{
Uint8 type;
Uint8 which;
int cursor;
int x;
int y;
} SDL_ProximityEvent;
/** /**
* \union SDL_Event * \union SDL_Event
...@@ -360,8 +363,10 @@ typedef union SDL_Event ...@@ -360,8 +363,10 @@ typedef union SDL_Event
SDL_ProximityEvent proximity; /**< Proximity In or Out event */ SDL_ProximityEvent proximity; /**< Proximity In or Out event */
/* Temporarily here for backwards compatibility */ /* Temporarily here for backwards compatibility */
#ifndef SDL_NO_COMPAT
SDL_ActiveEvent active; SDL_ActiveEvent active;
SDL_ResizeEvent resize; SDL_ResizeEvent resize;
#endif
} SDL_Event; } SDL_Event;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment