diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c199d0..6a22b54 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,6 @@ SET(SDL2PP_VERSION "${SDL2PP_MAJOR_VERSION}.${SDL2PP_MINOR_VERSION}.${SDL2PP_PAT # there are functions present on wiki, but not yet in stable SDL2 releases; # we hide these under following options -OPTION(SDL2PP_WITH_2_0_4 "Enable new functions available only in SDL2 2.0.4+" OFF) OPTION(SDL2PP_WITH_WERROR "Make warnings fatal" OFF) SET(SDL2PP_CXXSTD "c++11" CACHE STRING "Used c++ standard") diff --git a/SDL2pp/AudioDevice.cc b/SDL2pp/AudioDevice.cc index cf2e8d9..afebf6d 100644 --- a/SDL2pp/AudioDevice.cc +++ b/SDL2pp/AudioDevice.cc @@ -110,7 +110,7 @@ AudioDevice::LockHandle AudioDevice::Lock() { return LockHandle(this); } -#ifdef SDL2PP_WITH_2_0_4 +#if SDL_VERSION_ATLEAST(2, 0, 4) AudioDevice& AudioDevice::QueueAudio(const void* data, Uint32 len) { if (SDL_QueueAudio(device_id_, data, len) != 0) throw Exception("SDL_QueueAudio"); diff --git a/SDL2pp/AudioDevice.hh b/SDL2pp/AudioDevice.hh index fdf6fcc..907ddc6 100644 --- a/SDL2pp/AudioDevice.hh +++ b/SDL2pp/AudioDevice.hh @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -304,7 +305,7 @@ public: //////////////////////////////////////////////////////////// LockHandle Lock(); -#ifdef SDL2PP_WITH_2_0_4 +#if SDL_VERSION_ATLEAST(2, 0, 4) //////////////////////////////////////////////////////////// /// \brief Queue more audio for a non-callback device /// diff --git a/SDL2pp/Config.hh.in b/SDL2pp/Config.hh.in index b4b3c05..89cdeb4 100644 --- a/SDL2pp/Config.hh.in +++ b/SDL2pp/Config.hh.in @@ -31,7 +31,6 @@ #cmakedefine SDL2PP_WITH_IMAGE #cmakedefine SDL2PP_WITH_TTF #cmakedefine SDL2PP_WITH_MIXER -#cmakedefine SDL2PP_WITH_2_0_4 #cmakedefine SDL2PP_WITH_EXPERIMENTAL_OPTIONAL #cmakedefine SDL2PP_WITH_DEPRECATED