diff --git a/Engine/lib/sdl/Android.mk b/Engine/lib/sdl/Android.mk
old mode 100644
new mode 100755
diff --git a/Engine/lib/sdl/BUGS.txt b/Engine/lib/sdl/BUGS.txt
index c5ed3af23..6a4cbb7ad 100644
--- a/Engine/lib/sdl/BUGS.txt
+++ b/Engine/lib/sdl/BUGS.txt
@@ -1,7 +1,7 @@
Bugs are now managed in the SDL bug tracker, here:
- http://bugzilla.libsdl.org/
+ https://bugzilla.libsdl.org/
You may report bugs there, and search to see if a given issue has already
been reported, discussed, and maybe even fixed.
diff --git a/Engine/lib/sdl/CMakeLists.txt b/Engine/lib/sdl/CMakeLists.txt
index 63244a9e2..54a23f0c7 100644
--- a/Engine/lib/sdl/CMakeLists.txt
+++ b/Engine/lib/sdl/CMakeLists.txt
@@ -2,8 +2,19 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
endif()
-cmake_minimum_required(VERSION 2.8)
+cmake_minimum_required(VERSION 2.8.5)
project(SDL2 C)
+
+# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
+# !!! FIXME: for the SDL2 shared library (so you get an
+# !!! FIXME: install_name ("soname") of "@rpath/libSDL-whatever.dylib"
+# !!! FIXME: instead of "/usr/local/lib/libSDL-whatever.dylib"), but I'm
+# !!! FIXME: punting for now and leaving the existing behavior. Until this
+# !!! FIXME: properly resolved, this line silences a warning in CMake 3.0+.
+# !!! FIXME: remove it and this comment entirely once the problem is
+# !!! FIXME: properly resolved.
+#cmake_policy(SET CMP0042 OLD)
+
include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckIncludeFiles)
@@ -15,6 +26,7 @@ include(CheckTypeSize)
include(CheckStructHasMember)
include(CMakeDependentOption)
include(FindPkgConfig)
+include(GNUInstallDirs)
set(CMAKE_MODULE_PATH "${SDL2_SOURCE_DIR}/cmake")
include(${SDL2_SOURCE_DIR}/cmake/macros.cmake)
include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
@@ -29,9 +41,9 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
set(SDL_MAJOR_VERSION 2)
set(SDL_MINOR_VERSION 0)
-set(SDL_MICRO_VERSION 4)
-set(SDL_INTERFACE_AGE 0)
-set(SDL_BINARY_AGE 4)
+set(SDL_MICRO_VERSION 5)
+set(SDL_INTERFACE_AGE 1)
+set(SDL_BINARY_AGE 5)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
# Calculate a libtool-like version number
@@ -147,8 +159,10 @@ endif()
# Default flags, if not set otherwise
if("$ENV{CFLAGS}" STREQUAL "")
- if(USE_GCC OR USE_CLANG)
- set(CMAKE_C_FLAGS "-g -O3")
+ if(CMAKE_BUILD_TYPE STREQUAL "")
+ if(USE_GCC OR USE_CLANG)
+ set(CMAKE_C_FLAGS "-g -O3")
+ endif()
endif()
else()
set(CMAKE_C_FLAGS "$ENV{CFLAGS}")
@@ -183,8 +197,8 @@ endif()
set(SDL_LIBS "-lSDL2")
set(SDL_CFLAGS "")
-# Emscripten toolchain has a nonempty default value for this, and the checks
-# in this file need to change that, so remember the original value, and
+# Emscripten toolchain has a nonempty default value for this, and the checks
+# in this file need to change that, so remember the original value, and
# restore back to that afterwards. For check_function_exists() to work in
# Emscripten, this value must be at its default value.
set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
@@ -192,7 +206,7 @@ set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
if(CYGWIN)
# We build SDL on cygwin without the UNIX emulation layer
include_directories("-I/usr/include/mingw")
- set(CMAKE_REQUIRED_FLAGS "-mno-cygwin")
+ set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -mno-cygwin")
check_c_source_compiles("int main(int argc, char **argv) {}"
HAVE_GCC_NO_CYGWIN)
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
@@ -212,7 +226,7 @@ include_directories(${SDL2_BINARY_DIR}/include ${SDL2_SOURCE_DIR}/include)
set(OPT_DEF_ASM TRUE)
if(EMSCRIPTEN)
# Set up default values for the currently supported set of subsystems:
- # Emscripten/Javascript does not have assembly support, a dynamic library
+ # Emscripten/Javascript does not have assembly support, a dynamic library
# loading architecture, low-level CPU inspection or multithreading.
set(OPT_DEF_ASM FALSE)
set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
@@ -299,6 +313,8 @@ set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS})
set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library")
set(SDL_STATIC ON CACHE BOOL "Build a static version of the library")
+dep_option(SDL_STATIC_PIC "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF)
+
# General source files
file(GLOB SOURCE_FILES
${SDL2_SOURCE_DIR}/src/*.c
@@ -334,6 +350,24 @@ set(HAVE_ASSERTIONS ${ASSERTIONS})
# Compiler option evaluation
if(USE_GCC OR USE_CLANG)
+ # Check for -Wall first, so later things can override pieces of it.
+ check_c_compiler_flag(-Wall HAVE_GCC_WALL)
+ if(HAVE_GCC_WALL)
+ list(APPEND EXTRA_CFLAGS "-Wall")
+ if(HAIKU)
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
+ endif()
+ endif()
+
+ check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
+ if(HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
+ check_c_compiler_flag(-Werror=declaration-after-statement HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT)
+ if(HAVE_GCC_WERROR_DECLARATION_AFTER_STATEMENT)
+ list(APPEND EXTRA_CFLAGS "-Werror=declaration-after-statement")
+ endif()
+ list(APPEND EXTRA_CFLAGS "-Wdeclaration-after-statement")
+ endif()
+
if(DEPENDENCY_TRACKING)
check_c_source_compiles("
#if !defined(__GNUC__) || __GNUC__ < 3
@@ -375,26 +409,16 @@ if(USE_GCC OR USE_CLANG)
endif()
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
- check_c_compiler_flag(-Wall HAVE_GCC_WALL)
- if(HAVE_GCC_WALL)
- list(APPEND EXTRA_CFLAGS "-Wall")
- if(HAIKU)
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
- endif()
- endif()
check_c_compiler_flag(-Wshadow HAVE_GCC_WSHADOW)
if(HAVE_GCC_WSHADOW)
list(APPEND EXTRA_CFLAGS "-Wshadow")
endif()
- # --no-undefined is unsupported with clang
- if(NOT USE_CLANG)
- set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
- check_c_compiler_flag("" HAVE_NO_UNDEFINED)
- set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
- if(HAVE_NO_UNDEFINED)
- list(APPEND EXTRA_LDFLAGS "-Wl,--no-undefined")
- endif()
+ set(CMAKE_REQUIRED_FLAGS "-Wl,--no-undefined")
+ check_c_compiler_flag("" HAVE_NO_UNDEFINED)
+ set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
+ if(HAVE_NO_UNDEFINED)
+ list(APPEND EXTRA_LDFLAGS "-Wl,--no-undefined")
endif()
endif()
@@ -773,6 +797,16 @@ if(EMSCRIPTEN)
set(SOURCE_FILES ${SOURCE_FILES} ${EM_POWER_SOURCES})
set(HAVE_SDL_POWER TRUE)
endif()
+ if(SDL_TIMERS)
+ set(SDL_TIMER_UNIX 1)
+ file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
+ set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
+ set(HAVE_SDL_TIMERS TRUE)
+
+ if(CLOCK_GETTIME)
+ set(HAVE_CLOCK_GETTIME 1)
+ endif()
+ endif()
if(SDL_VIDEO)
set(SDL_VIDEO_DRIVER_EMSCRIPTEN 1)
file(GLOB EM_VIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/emscripten/*.c)
@@ -839,7 +873,7 @@ elseif(UNIX AND NOT APPLE)
#include
There are different solution files for the various - versions of the IDE. Please use the appropiate version + versions of the IDE. Please use the appropriate version 2008, 2010, 2012 or 2013.
@@ -101,7 +101,7 @@ files to project")
Instead of adding the files to your project it is more - desireable to add them to the linker options: Project|Properties|Linker|Command + desirable to add them to the linker options: Project|Properties|Linker|Command Line and type the names of the libraries to link with in the "Additional Options:" box. Note: This must be done for each build configuration (e.g. Release,Debug).
diff --git a/Engine/lib/sdl/VisualC/clean.sh b/Engine/lib/sdl/VisualC/clean.sh deleted file mode 100644 index fd16f9a12..000000000 --- a/Engine/lib/sdl/VisualC/clean.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete -find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -delete -find . -depth -type d \( -name Win32 -o -name x64 \) -exec rm -rv {} \; diff --git a/Engine/lib/sdl/WhatsNew.txt b/Engine/lib/sdl/WhatsNew.txt index 9b7139f5d..1979ac2b3 100644 --- a/Engine/lib/sdl/WhatsNew.txt +++ b/Engine/lib/sdl/WhatsNew.txt @@ -1,6 +1,69 @@ This is a list of major changes in SDL's version history. +--------------------------------------------------------------------------- +2.0.5: +--------------------------------------------------------------------------- + +General: +* Implemented audio capture support for some platforms +* Added SDL_DequeueAudio() to retrieve audio when buffer queuing is turned on for audio capture +* Added events for dragging and dropping text +* Added events for dragging and dropping multiple items +* By default the click raising a window will not be delivered to the SDL application. You can set the hint SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH to "1" to allow that click through to the window. +* Saving a surface with an alpha channel as a BMP will use a newer BMP format that supports alpha information. You can set the hint SDL_HINT_BMP_SAVE_LEGACY_FORMAT to "1" to use the old format. +* Added SDL_GetHintBoolean() to get the boolean value of a hint +* Added SDL_RenderSetIntegerScale() to set whether to smoothly scale or use integral multiples of the viewport size when scaling the rendering output +* Added SDL_CreateRGBSurfaceWithFormat() and SDL_CreateRGBSurfaceWithFormatFrom() to create an SDL surface with a specific pixel format +* Added SDL_GetDisplayUsableBounds() which returns the area usable for windows. For example, on Mac OS X, this subtracts the area occupied by the menu bar and dock. +* Added SDL_GetWindowBordersSize() which returns the size of the window's borders around the client area +* Added a window event SDL_WINDOWEVENT_HIT_TEST when a window had a hit test that wasn't SDL_HITTEST_NORMAL (e.g. in the title bar or window frame) +* Added SDL_SetWindowResizable() to change whether a window is resizable +* Added SDL_SetWindowOpacity() and SDL_GetWindowOpacity() to affect the window transparency +* Added SDL_SetWindowModalFor() to set a window as modal for another window +* Added support for AUDIO_U16LSB and AUDIO_U16MSB to SDL_MixAudioFormat() +* Fixed flipped images when reading back from target textures when using the OpenGL renderer +* Fixed texture color modulation with SDL_BLENDMODE_NONE when using the OpenGL renderer +* Fixed bug where the alpha value of colorkeys was ignored when blitting in some cases + +Windows: +* Added a hint SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING to prevent SDL from raising a debugger exception to name threads. This exception can cause problems with .NET applications when running under a debugger. +* The hint SDL_HINT_THREAD_STACK_SIZE is now supported on Windows +* Fixed XBox controller triggers automatically being pulled at startup +* The first icon from the executable is used as the default window icon at runtime +* Fixed SDL log messages being printed twice if SDL was built with C library support +* Reset dead keys when the SDL window loses focus, so dead keys pressed in SDL applications don't affect text input into other applications. + +Mac OS X: +* Fixed selecting the dummy video driver +* The caps lock key now generates a pressed event when pressed and a released event when released, instead of a press/release event pair when pressed. +* Fixed mouse wheel events on Mac OS X 10.12 +* The audio driver has been updated to use AVFoundation for better compatibility with newer versions of Mac OS X + +Linux: +* Added support for the Fcitx IME +* Added a window event SDL_WINDOWEVENT_TAKE_FOCUS when a window manager asks the SDL window whether it wants to take focus. +* Refresh rates are now rounded instead of truncated, e.g. 59.94 Hz is rounded up to 60 Hz instead of 59. +* Added initial support for touchscreens on Raspberry Pi + +OpenBSD: +* SDL_GetBasePath() is now implemented on OpenBSD + +iOS: +* Added support for dynamically loaded objects on iOS 8 and newer + +tvOS: +* Added support for Apple TV +* Added a hint SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION to control whether he Apple TV remote's joystick axes will automatically match the rotation of the remote. + +Android: +* Fixed SDL not resizing window when Android screen resolution changes +* Corrected the joystick Z axis reporting for the accelerometer + +Emscripten (running in a web browser): +* Many bug fixes and improvements + + --------------------------------------------------------------------------- 2.0.4: --------------------------------------------------------------------------- diff --git a/Engine/lib/sdl/Xcode/SDL/Info-Framework.plist b/Engine/lib/sdl/Xcode/SDL/Info-Framework.plist index bccaa8afc..da4183466 100644 --- a/Engine/lib/sdl/Xcode/SDL/Info-Framework.plist +++ b/Engine/lib/sdl/Xcode/SDL/Info-Framework.plist @@ -11,7 +11,7 @@