2008-04-25 07:28:51 +00:00
|
|
|
#ifndef __SDL_INC_H
|
|
|
|
#define __SDL_INC_H
|
|
|
|
|
2013-10-07 10:03:11 +00:00
|
|
|
// Workaround for i686-MinGW-w64.
|
|
|
|
#if defined __MINGW64_VERSION_MAJOR && !defined __MINGW64__
|
|
|
|
# define __MINGW64_VERSION_MAJOR_BACKUP __MINGW64_VERSION_MAJOR
|
|
|
|
# undef __MINGW64_VERSION_MAJOR
|
|
|
|
#endif
|
|
|
|
|
2008-08-20 22:58:09 +00:00
|
|
|
#if defined(SDL_FRAMEWORK)
|
2013-10-06 07:49:53 +00:00
|
|
|
# if (SDL_TARGET == 2)
|
|
|
|
# include <SDL2/SDL.h>
|
2013-10-07 10:05:03 +00:00
|
|
|
# include <SDL2/SDL_syswm.h>
|
2013-10-06 07:49:53 +00:00
|
|
|
# else
|
2008-04-25 07:28:51 +00:00
|
|
|
# include <SDL/SDL.h>
|
2013-10-07 10:05:03 +00:00
|
|
|
# include <SDL/SDL_syswm.h>
|
2013-10-06 07:49:53 +00:00
|
|
|
# endif
|
2008-04-25 07:28:51 +00:00
|
|
|
#else
|
2013-10-06 07:49:53 +00:00
|
|
|
# include "SDL.h"
|
2008-04-25 07:28:51 +00:00
|
|
|
#endif
|
|
|
|
|
2013-10-07 10:03:11 +00:00
|
|
|
#if defined __MINGW64_VERSION_MAJOR_BACKUP && !defined __MINGW64__
|
|
|
|
# define __MINGW64_VERSION_MAJOR __MINGW64_VERSION_MAJOR_BACKUP
|
|
|
|
# undef __MINGW64_VERSION_MAJOR_BACKUP
|
|
|
|
#endif
|
|
|
|
|
2008-04-25 07:28:51 +00:00
|
|
|
/* =================================================================
|
|
|
|
Minimum required SDL versions:
|
|
|
|
=================================================================== */
|
|
|
|
|
|
|
|
#define SDL_MIN_X 1
|
|
|
|
#define SDL_MIN_Y 2
|
|
|
|
#define SDL_MIN_Z 10
|
|
|
|
|
|
|
|
#define SDL_REQUIREDVERSION (SDL_VERSIONNUM(SDL_MIN_X,SDL_MIN_Y,SDL_MIN_Z))
|
|
|
|
|
|
|
|
#define SDL_MIXER_MIN_X 1
|
|
|
|
#define SDL_MIXER_MIN_Y 2
|
|
|
|
#define SDL_MIXER_MIN_Z 7
|
|
|
|
#define MIX_REQUIREDVERSION (SDL_VERSIONNUM(SDL_MIXER_MIN_X,SDL_MIXER_MIN_Y,SDL_MIXER_MIN_Z))
|
|
|
|
|
|
|
|
#if !(SDL_VERSION_ATLEAST(SDL_MIN_X,SDL_MIN_Y,SDL_MIN_Z))
|
|
|
|
#error SDL version found is too old
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(_NEED_SDLMIXER)
|
2008-08-20 22:58:09 +00:00
|
|
|
# if defined(SDL_FRAMEWORK)
|
2013-02-18 08:48:18 +00:00
|
|
|
# if defined(_WIN32) || defined(GEKKO)
|
2013-10-06 07:49:53 +00:00
|
|
|
# if (SDL_TARGET == 2)
|
|
|
|
# include <SDL2/SDL_mixer.h>
|
|
|
|
# else
|
|
|
|
# include <SDL/SDL_mixer.h>
|
|
|
|
# endif
|
2012-11-24 09:13:29 +00:00
|
|
|
# else
|
2013-10-06 07:49:53 +00:00
|
|
|
# if (SDL_TARGET == 2)
|
|
|
|
# include <SDL2_mixer/SDL_mixer.h>
|
|
|
|
# else
|
|
|
|
# include <SDL_mixer/SDL_mixer.h>
|
|
|
|
# endif
|
2012-11-24 09:13:29 +00:00
|
|
|
# endif
|
2008-04-25 07:28:51 +00:00
|
|
|
# else
|
|
|
|
# include "SDL_mixer.h"
|
|
|
|
# endif
|
|
|
|
/* starting with 1.2.1, SDL_mixer provides MIX_xxx version
|
|
|
|
macros. the new SDL_MIXER_xxx version macros start with
|
|
|
|
1.2.6 but they keep backwards compatibility. 1.2.0 does
|
|
|
|
not even have any version macros, so let's reject it */
|
|
|
|
#if !defined(MIX_MAJOR_VERSION) || !defined(MIX_MINOR_VERSION) || !defined(MIX_PATCHLEVEL)
|
|
|
|
#error SDL_mixer version found is too old
|
|
|
|
#endif
|
|
|
|
#ifndef MIX_COMPILEDVERSION
|
|
|
|
#define MIX_COMPILEDVERSION (SDL_VERSIONNUM(MIX_MAJOR_VERSION,MIX_MINOR_VERSION,MIX_PATCHLEVEL))
|
|
|
|
#endif
|
|
|
|
#if MIX_COMPILEDVERSION < MIX_REQUIREDVERSION
|
|
|
|
#error SDL_mixer version found is too old
|
|
|
|
#endif /* end of bad version error */
|
|
|
|
#endif /* end of SDL_mixer checks */
|
|
|
|
|
|
|
|
#endif /* __SDL_INC_H */
|
|
|
|
|