summaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-20 21:56:12 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:13 +0300
commita6f4bd5c8949c800a28f2de4291b096caec4cd89 (patch)
tree2c5f70b72038b47f10b08d319e26aa923ab4701a /src/main.cpp
parentf92e278da564dab15d984dcaba153c1a92752651 (diff)
downloadmanaplus-a6f4bd5c8949c800a28f2de4291b096caec4cd89.tar.gz
manaplus-a6f4bd5c8949c800a28f2de4291b096caec4cd89.tar.bz2
manaplus-a6f4bd5c8949c800a28f2de4291b096caec4cd89.tar.xz
manaplus-a6f4bd5c8949c800a28f2de4291b096caec4cd89.zip
add configure option --with-sdl2 for enable SDL2 support.
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp13
1 files changed, 13 insertions, 0 deletions
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 <http://www.gnu.org/licenses/>.
*/
+
#include "main.h"
#include "client.h"
@@ -46,6 +47,18 @@
#include <windows.h>
#endif
+#include <SDL_version.h>
+
+#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;