From a6f4bd5c8949c800a28f2de4291b096caec4cd89 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 20 Aug 2013 21:56:12 +0300 Subject: add configure option --with-sdl2 for enable SDL2 support. --- src/main.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/main.cpp') diff --git a/src/main.cpp b/src/main.cpp index 55af95f4f..7bedd1b9d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -20,6 +20,7 @@ * along with this program. If not, see . */ + #include "main.h" #include "client.h" @@ -46,6 +47,18 @@ #include #endif +#include + +#if SDL_VERSION_ATLEAST(2,0,0) +#ifndef USE_SDL2 +#error using SDL2 headers but configure set to use SDL1.2 +#endif +#else +#ifdef USE_SDL2 +#error using SDL1.2 headers but configure set to use SDL2 +#endif +#endif + #include "debug.h" char *selfName = nullptr; -- cgit v1.2.3-60-g2f50