Add SDL2 support to build system.

Dolphin code already builds against SDL2 but the build system never
checks for SDL2, which is the what latest SDL is called now. SDL2
replaces SDL 1.3. This allows Dolphin to be build against SDL2, which
activates certain new features such as the haptic interface.
This commit is contained in:
Scott Moreau
2012-07-12 16:38:29 -06:00
parent 8dd11bd1c0
commit 80c15f21b4
4 changed files with 209 additions and 21 deletions

View File

@ -5,23 +5,15 @@
#include <list>
#ifdef _WIN32
#include <SDL.h>
#else
#include <SDL/SDL.h>
#endif
#include <SDL.h>
#if SDL_VERSION_ATLEAST(1, 3, 0)
#define USE_SDL_HAPTIC
#endif
#ifdef USE_SDL_HAPTIC
#include <SDL_haptic.h>
#define SDL_INIT_FLAGS SDL_INIT_JOYSTICK | SDL_INIT_HAPTIC
#ifdef _WIN32
#include <SDL_haptic.h>
#else
#include <SDL/SDL_haptic.h>
#endif
#else
#define SDL_INIT_FLAGS SDL_INIT_JOYSTICK
#endif