mirror of
https://github.com/libSDL2pp/libSDL2pp.git
synced 2025-08-03 10:55:57 -04:00
Switch to automatic SDL 2.0.4 detection
This commit is contained in:
parent
6532490388
commit
56d1890fff
@ -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")
|
||||
|
@ -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");
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include <string>
|
||||
|
||||
#include <SDL2/SDL_audio.h>
|
||||
#include <SDL2/SDL_version.h>
|
||||
|
||||
#include <SDL2pp/Optional.hh>
|
||||
#include <SDL2pp/Config.hh>
|
||||
@ -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
|
||||
///
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user