From 1c4ab54d2591c497a48df7f800510db356f5607b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 29 Aug 2013 15:59:17 +0300 Subject: move SDL2 preprocessor checks into localconsts.h also allow use SDL2 on broken systems where SDL2 is used/stored as SDL1.2. --- src/localconsts.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/localconsts.h') diff --git a/src/localconsts.h b/src/localconsts.h index 9eb34c328..ead9eb459 100644 --- a/src/localconsts.h +++ b/src/localconsts.h @@ -18,6 +18,19 @@ * along with this program. If not, see . */ +#if SDL_VERSION_ATLEAST(2, 0, 0) +#ifndef USE_SDL2 +#warning using SDL2 headers but configure set to use SDL1.2 +#warning please add configure flag --with-sdl2 +#define USE_SDL2 +#endif +#else +#ifdef USE_SDL2 +#error using SDL1.2 headers but configure set to use SDL2 +#error please remove configure flag --with-sdl2 +#endif +#endif + #if !defined(__GXX_EXPERIMENTAL_CXX0X__) #undef nullptr #define nullptr 0 -- cgit v1.2.3-70-g09d2