Added an ifdef so that if you
authorBob Pendleton <bob@pendleton.com>
Thu, 04 Jun 2009 21:00:45 +0000
changeset 3164c5b2884c26b4
parent 3163 a252014ce27d
child 3165 7168651d5706
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.
include/SDL_compat.h
     1.1 --- a/include/SDL_compat.h	Wed Jun 03 10:40:44 2009 +0000
     1.2 +++ b/include/SDL_compat.h	Thu Jun 04 21:00:45 2009 +0000
     1.3 @@ -22,6 +22,16 @@
     1.4  
     1.5  /* This file contains functions for backwards compatibility with SDL 1.2 */
     1.6  
     1.7 +/* 
     1.8 +   #define SDL_NO_COMPAT to prevent SDL_compat.h from being included.
     1.9 +   SDL_NO_COMPAT is intended to make it easier to covert SDL 1.2 code to
    1.10 +   SDL 1.3/2.0
    1.11 +*/
    1.12 +
    1.13 +#ifdef SDL_NO_COMPAT
    1.14 +#define _SDL_compat_h
    1.15 +#endif
    1.16 +
    1.17  #ifndef _SDL_compat_h
    1.18  #define _SDL_compat_h
    1.19