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

Commit

Permalink
Browse files Browse the repository at this point in the history
Added an ifdef so that if you
#define SDL_NO_COMPAT

before you include SDL.h then SDL_compat.h will never be included in your code.
This is useful for making sure that your code uses only SDL 1.3 features.
It is also handy for finding things that are in SDL_compat.h that belong elsewhere.
  • Loading branch information
pendletonrc committed Jun 4, 2009
1 parent 60e69c7 commit cbee37e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/SDL_compat.h
Expand Up @@ -22,6 +22,16 @@

/* This file contains functions for backwards compatibility with SDL 1.2 */

/*
#define SDL_NO_COMPAT to prevent SDL_compat.h from being included.
SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to
SDL 1.3/2.0
*/

#ifdef SDL_NO_COMPAT
#define _SDL_compat_h
#endif

#ifndef _SDL_compat_h
#define _SDL_compat_h

Expand Down

0 comments on commit cbee37e

Please sign in to comment.