Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Added a #ifndef SDL_NO_COMPAT around SDL_ActiveEvent and SDL_ResizeEv…
Browse files Browse the repository at this point in the history
…ent so that code

that has a #defien SDL_NO_COMPAT before the #include SDL.h with not be able to use
these obsolete events.
  • Loading branch information
pendletonrc committed Jun 5, 2009
1 parent a1b3422 commit bd2e129
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions include/SDL_events.h
Expand Up @@ -313,28 +313,31 @@ typedef struct SDL_SysWMEvent
SDL_SysWMmsg *msg; /**< driver dependent data, defined in SDL_syswm.h */
} SDL_SysWMEvent;

typedef struct SDL_ProximityEvent
{
Uint8 type;
Uint8 which;
int cursor;
int x;
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;

typedef struct SDL_ProximityEvent
{
Uint8 type;
Uint8 which;
int cursor;
int x;
int y;
} SDL_ProximityEvent;
#endif

/**
* \union SDL_Event
Expand All @@ -360,8 +363,10 @@ typedef union SDL_Event
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;


Expand Down

0 comments on commit bd2e129

Please sign in to comment.