Browse Source

Update to SDL-2.0.13-13958 and link statically to SDL2 and OpenAL

master
C. J. Howard 3 years ago
parent
commit
7356e20fa1
1033 changed files with 106916 additions and 13701 deletions
  1. +7
    -1
      CMakeLists.txt
  2. +155
    -0
      modules/SDL2/.hgignore
  3. +40
    -0
      modules/SDL2/.hgtags
  4. +8
    -1
      modules/SDL2/Android.mk
  5. +459
    -114
      modules/SDL2/CMakeLists.txt
  6. +1
    -1
      modules/SDL2/COPYING.txt
  7. +7
    -2
      modules/SDL2/Makefile.in
  8. +9
    -4
      modules/SDL2/Makefile.os2
  9. +2
    -1
      modules/SDL2/Makefile.psp
  10. +0
    -119
      modules/SDL2/SDL2.spec
  11. +7
    -0
      modules/SDL2/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj
  12. +21
    -0
      modules/SDL2/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj.filters
  13. +7
    -0
      modules/SDL2/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj
  14. +21
    -0
      modules/SDL2/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj.filters
  15. +19
    -6
      modules/SDL2/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj
  16. +21
    -0
      modules/SDL2/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj.filters
  17. +11
    -0
      modules/SDL2/VisualC/SDL.sln
  18. +20
    -3
      modules/SDL2/VisualC/SDL/SDL.vcxproj
  19. +22
    -1
      modules/SDL2/VisualC/SDL/SDL.vcxproj.filters
  20. +0
    -2
      modules/SDL2/VisualC/SDLmain/SDLmain.vcxproj
  21. +0
    -2
      modules/SDL2/VisualC/SDLtest/SDLtest.vcxproj
  22. +199
    -0
      modules/SDL2/VisualC/tests/testsensor/testsensor.vcxproj
  23. +63
    -0
      modules/SDL2/WhatsNew.txt
  24. +149
    -2
      modules/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
  25. +4
    -0
      modules/SDL2/Xcode-iOS/Test/Info.plist
  26. +60
    -56
      modules/SDL2/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
  27. +2
    -2
      modules/SDL2/Xcode/SDL/Info-Framework.plist
  28. +9555
    -2201
      modules/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj
  29. +22
    -0
      modules/SDL2/Xcode/SDL/hidapi/Info.plist
  30. +1
    -1
      modules/SDL2/Xcode/SDL/pkg-support/resources/License.txt
  31. +9313
    -0
      modules/SDL2/aclocal.m4
  32. +90
    -0
      modules/SDL2/android-project-ant/AndroidManifest.xml
  33. +17
    -0
      modules/SDL2/android-project-ant/ant.properties
  34. +17
    -0
      modules/SDL2/android-project-ant/build.properties
  35. +93
    -0
      modules/SDL2/android-project-ant/build.xml
  36. +11
    -0
      modules/SDL2/android-project-ant/default.properties
  37. +1
    -0
      modules/SDL2/android-project-ant/jni/Android.mk
  38. +10
    -0
      modules/SDL2/android-project-ant/jni/Application.mk
  39. +18
    -0
      modules/SDL2/android-project-ant/jni/src/Android.mk
  40. +12
    -0
      modules/SDL2/android-project-ant/jni/src/Android_static.mk
  41. +20
    -0
      modules/SDL2/android-project-ant/proguard-project.txt
  42. +14
    -0
      modules/SDL2/android-project-ant/project.properties
  43. BIN
      modules/SDL2/android-project-ant/res/drawable-hdpi/ic_launcher.png
  44. BIN
      modules/SDL2/android-project-ant/res/drawable-mdpi/ic_launcher.png
  45. BIN
      modules/SDL2/android-project-ant/res/drawable-xhdpi/ic_launcher.png
  46. BIN
      modules/SDL2/android-project-ant/res/drawable-xxhdpi/ic_launcher.png
  47. +13
    -0
      modules/SDL2/android-project-ant/res/layout/main.xml
  48. +4
    -0
      modules/SDL2/android-project-ant/res/values/strings.xml
  49. +22
    -0
      modules/SDL2/android-project-ant/src/org/libsdl/app/HIDDevice.java
  50. +650
    -0
      modules/SDL2/android-project-ant/src/org/libsdl/app/HIDDeviceBLESteamController.java
  51. +669
    -0
      modules/SDL2/android-project-ant/src/org/libsdl/app/HIDDeviceManager.java
  52. +309
    -0
      modules/SDL2/android-project-ant/src/org/libsdl/app/HIDDeviceUSB.java
  53. +84
    -0
      modules/SDL2/android-project-ant/src/org/libsdl/app/SDL.java
  54. +2356
    -0
      modules/SDL2/android-project-ant/src/org/libsdl/app/SDLActivity.java
  55. +387
    -0
      modules/SDL2/android-project-ant/src/org/libsdl/app/SDLAudioManager.java
  56. +788
    -0
      modules/SDL2/android-project-ant/src/org/libsdl/app/SDLControllerManager.java
  57. +8
    -0
      modules/SDL2/android-project/app/build.gradle
  58. +20
    -0
      modules/SDL2/android-project/app/jni/CMakeLists.txt
  59. +13
    -0
      modules/SDL2/android-project/app/jni/src/CMakeLists.txt
  60. +15
    -1
      modules/SDL2/android-project/app/src/main/AndroidManifest.xml
  61. +3
    -0
      modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java
  62. +14
    -8
      modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java
  63. +61
    -74
      modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
  64. +22
    -20
      modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
  65. +137
    -40
      modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
  66. +26163
    -0
      modules/SDL2/autom4te.cache/output.0
  67. +78
    -0
      modules/SDL2/autom4te.cache/requests
  68. +1973
    -0
      modules/SDL2/autom4te.cache/traces.0
  69. +3
    -44
      modules/SDL2/build-scripts/checker-buildbot.sh
  70. +3
    -4
      modules/SDL2/build-scripts/emscripten-buildbot.sh
  71. +8
    -6
      modules/SDL2/build-scripts/iosbuild.sh
  72. +1
    -8
      modules/SDL2/build-scripts/ltmain.sh
  73. +3
    -3
      modules/SDL2/build-scripts/os2-buildbot.sh
  74. +2
    -4
      modules/SDL2/build-scripts/raspberrypi-buildbot.sh
  75. +21
    -1
      modules/SDL2/build-scripts/showrev.sh
  76. +25
    -0
      modules/SDL2/build-scripts/showrev.sh.orig
  77. +11
    -23
      modules/SDL2/build-scripts/windows-buildbot-zipper.bat
  78. +1
    -1
      modules/SDL2/build-scripts/winrtbuild.ps1
  79. +27
    -15
      modules/SDL2/cmake/sdlchecks.cmake
  80. +819
    -289
      modules/SDL2/configure
  81. +302
    -86
      modules/SDL2/configure.ac
  82. +19
    -1
      modules/SDL2/debian/changelog
  83. +6
    -6
      modules/SDL2/debian/copyright
  84. +1
    -0
      modules/SDL2/debian/libsdl2-dev.install
  85. +19
    -0
      modules/SDL2/docs/README-android.md
  86. +53
    -1
      modules/SDL2/docs/README-cmake.md
  87. +16
    -0
      modules/SDL2/docs/README-ios.md
  88. +6
    -9
      modules/SDL2/docs/README-linux.md
  89. +3
    -1
      modules/SDL2/include/SDL.h
  90. +3
    -1
      modules/SDL2/include/SDL_assert.h
  91. +1
    -1
      modules/SDL2/include/SDL_atomic.h
  92. +1
    -1
      modules/SDL2/include/SDL_audio.h
  93. +1
    -1
      modules/SDL2/include/SDL_bits.h
  94. +4
    -1
      modules/SDL2/include/SDL_blendmode.h
  95. +1
    -1
      modules/SDL2/include/SDL_clipboard.h
  96. +1
    -1
      modules/SDL2/include/SDL_config.h
  97. +28
    -3
      modules/SDL2/include/SDL_config.h.cmake
  98. +21
    -7
      modules/SDL2/include/SDL_config.h.in
  99. +5
    -3
      modules/SDL2/include/SDL_config_android.h
  100. +8
    -2
      modules/SDL2/include/SDL_config_iphoneos.h

+ 7
- 1
CMakeLists.txt View File

@ -59,6 +59,11 @@ ExternalProject_Add(SDL2
CMAKE_ARGS
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DCMAKE_INSTALL_PREFIX=${MODULE_INSTALL_DIR}"
"-DSDL_SHARED=OFF"
"-DSDL_STATIC=ON"
"-LIBC=ON"
"-DHAVE_LIBC=ON"
"-DFORCE_STATIC_VCRT=ON"
BUILD_ALWAYS 0)
# Build OpenAL Soft module
@ -69,7 +74,8 @@ ExternalProject_Add(openal-soft
CMAKE_ARGS
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
"-DCMAKE_INSTALL_PREFIX=${MODULE_INSTALL_DIR}"
"-DLIBTYPE=SHARED"
"-DLIBTYPE=STATIC"
"-DFORCE_STATIC_VCRT=ON"
"-DALSOFT_UTILS=OFF"
"-DALSOFT_EXAMPLES=OFF"
"-DALSOFT_TESTS=OFF"

+ 155
- 0
modules/SDL2/.hgignore View File

@ -0,0 +1,155 @@
syntax:glob
aclocal.m4
autom4te*
config.cache
config.log
config.status
libtool
Makefile
Makefile.rules
sdl2-config
sdl2-config.cmake
sdl2.pc
SDL2.spec
build
gen
Build
# for CMake
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
cmake_uninstall.cmake
SDL2ConfigVersion.cmake
*.a
*.la
*.so
*.so.*
.ninja_*
*.ninja
# for CLion
.idea
cmake-build-*
# for Xcode
*.orig
*.swp
*.tmp
*.rej
*~
*.o
*.mode1*
*.perspective*
*.pbxuser
(^|/)build($|/)
.DS_Store
xcuserdata
*.xcworkspace
# for Visual C++
Debug
Release
*.user
*.ncb
*.suo
*.sdf
VisualC/tests/loopwave/sample.wav
VisualC/tests/testautomation/CompareSurfaces0001_Reference.bmp
VisualC/tests/testautomation/CompareSurfaces0001_TestOutput.bmp
VisualC/tests/testgamecontroller/axis.bmp
VisualC/tests/testgamecontroller/button.bmp
VisualC/tests/testgamecontroller/controllermap.bmp
VisualC/tests/testoverlay2/moose.dat
VisualC/tests/testrendertarget/icon.bmp
VisualC/tests/testrendertarget/sample.bmp
VisualC/tests/testscale/icon.bmp
VisualC/tests/testscale/sample.bmp
VisualC/tests/testsprite2/icon.bmp
VisualC/visualtest/icon.bmp
VisualC/visualtest/testquit.actions
VisualC/visualtest/testquit.config
VisualC/visualtest/testquit.exe
VisualC/visualtest/testquit.parameters
VisualC/visualtest/testsprite2.exe
VisualC/visualtest/testsprite2_sample.actions
VisualC/visualtest/testsprite2_sample.config
VisualC/visualtest/testsprite2_sample.parameters
# for Android
android-project/local.properties
test/aclocal.m4
test/autom4te*
test/config.cache
test/config.log
test/config.status
test/Makefile
test/SDL2.dll
test/checkkeys
test/controllermap
test/loopwave
test/loopwavequeue
test/testatomic
test/testaudiocapture
test/testaudiohotplug
test/testaudioinfo
test/testautomation
test/testbounds
test/testcustomcursor
test/testdisplayinfo
test/testdraw2
test/testdrawchessboard
test/testdropfile
test/testerror
test/testfile
test/testfilesystem
test/testgamecontroller
test/testgesture
test/testgl2
test/testgles
test/testgles2
test/testhaptic
test/testhittesting
test/testhotplug
test/testiconv
test/testime
test/testintersections
test/testjoystick
test/testkeys
test/testloadso
test/testlock
test/testmessage
test/testmultiaudio
test/testnative
test/testoverlay2
test/testplatform
test/testpower
test/testqsort
test/testrelative
test/testrendercopyex
test/testrendertarget
test/testresample
test/testrumble
test/testscale
test/testsem
test/testsensor
test/testshader
test/testshape
test/testsprite2
test/testspriteminimal
test/teststreaming
test/testthread
test/testtimer
test/testver
test/testviewport
test/testvulkan
test/testwm2
test/testyuv
test/torturethread
test/*.exe
test/*,e1f
test/*,ff8
test/*.dSYM
buildbot
test/buildbot

+ 40
- 0
modules/SDL2/.hgtags View File

@ -0,0 +1,40 @@
0afe0e38e02cf2048e93582f01c52fbb91d3c7bb release-1.2.7
230b156829ed13b31134d96f689c917981f57b84 release-1.2.5
27cab50ec9c746e886ce0f3fdaa0b0cdc55a594f release-1.2.11
2fe3fbd2bff50165b3cad33bf40d70b3bb3c9fd0 release-1.2.3
3c052d3bcc76c899dfd4846be76243a78e8c7180 release-1.2.4
3c5eed71a3320962551af3b3dfbee0c99fcf0086 release-1.2.10
4867f7f7dd3426d1dbbeef48b3f3b3aa19590cc4 release-1.2.12
6e28dae59e3baf4447c83e833a8d2ac912536f5b release-1.2.1
7c2589fb8d4df54c6faabd3faebd0c0e73f67879 release-1.2.13
86de11faf082881ad9b73a1a1d78733ca07f8db8 release-1.2.6
bb051fa871aa0b53ea57df56a446cec3bb85924c release-1.2.2
cfcb2e1c36ebe9809577adf768b0ec53e8768af9 release-1.2.8
e044e7c70a50a2f54d14ee20d0933e904e5853b6 release-1.2.9
f14cf9d71233934811774f941d0de121d5f96ccf release-1.2.14
39c22a953456f6c9e2c8993c8ff973824104102a pre-touch-removal
ccf5fbfa2afabab429ad911308f362201a94d810 macosx_10_4_supported
d6a8fa507a45d9de7258e51585eab3e45c415149 release-2.0.0
a8bd63b33636715f2cf6e7d36ab7201acbd478fe release-2.0.1
a8bd63b33636715f2cf6e7d36ab7201acbd478fe release-2.0.1
715a01415ac9305b9f8ec72b99fcf8cc9dd64dde release-2.0.1
715a01415ac9305b9f8ec72b99fcf8cc9dd64dde release-2.0.1
9ec71e56071cc80eda6691a3f8719ed5395dfcfb release-2.0.1
9ec71e56071cc80eda6691a3f8719ed5395dfcfb release-2.0.1
0000000000000000000000000000000000000000 release-2.0.1
0000000000000000000000000000000000000000 release-2.0.1
b9663c77f5c95ebf05f3c18e80619caae8ae1460 release-2.0.1
be2102f000d0d2d9bab75e9703a1d503d0f6bb33 release-2.0.2
f285b9487756ff681f76c85644222c03a7bfa1c7 release-2.0.3
f285b9487756ff681f76c85644222c03a7bfa1c7 release-2.0.3
704a0bfecf754e4e1383f83c7d5118b00cae26ea release-2.0.3
e12c387305129c847b3928a123300b113782fe3f release-2.0.4
007dfe83abf81b1ff5df40186f65e8e64987b825 release-2.0.5
8df7a59b55283aa09889522369a2b32674c048de release-2.0.6
2088cd828335797d73d151e3288d899f77204862 release-2.0.7
f1084c419f33610cf274e309a8b2798d2ae665c7 release-2.0.8
8feb5da6f2fb75703bde2c06813375af984a57f0 release-2.0.9
bc90ce38f1e27ace54b83bebf987993002504f7f release-2.0.10
78d0bb6f3b8f9b8f2a76cb357a407bc7ace57234 release-2.0.12
78d0bb6f3b8f9b8f2a76cb357a407bc7ace57234 release-2.0.12
355a4f94a782747a990b2fedaebc7bebd280e153 release-2.0.12

+ 8
- 1
modules/SDL2/Android.mk View File

@ -33,7 +33,10 @@ LOCAL_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/src/joystick/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/hidapi/*.c) \
$(wildcard $(LOCAL_PATH)/src/joystick/virtual/*.c) \
$(wildcard $(LOCAL_PATH)/src/loadso/dlopen/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/*.c) \
$(wildcard $(LOCAL_PATH)/src/locale/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/*.c) \
$(wildcard $(LOCAL_PATH)/src/power/android/*.c) \
$(wildcard $(LOCAL_PATH)/src/filesystem/android/*.c) \
@ -64,7 +67,11 @@ LOCAL_CFLAGS += \
-Wmissing-variable-declarations \
-Wfloat-conversion \
-Wshorten-64-to-32 \
-Wunreachable-code-return
-Wunreachable-code-return \
-Wshift-sign-overflow \
-Wstrict-prototypes \
-Wkeyword-macro \
# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare

+ 459
- 114
modules/SDL2/CMakeLists.txt View File

@ -2,7 +2,7 @@ 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.11)
cmake_minimum_required(VERSION 3.0.0)
project(SDL2 C CXX)
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
@ -15,7 +15,6 @@ project(SDL2 C CXX)
# !!! FIXME: properly resolved.
#cmake_policy(SET CMP0042 OLD)
include(CheckFunctionExists)
include(CheckLibraryExists)
include(CheckIncludeFiles)
include(CheckIncludeFile)
@ -42,12 +41,12 @@ 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 10)
set(SDL_INTERFACE_AGE 0)
set(SDL_BINARY_AGE 10)
set(SDL_MICRO_VERSION 13)
set(SDL_INTERFACE_AGE 1)
set(SDL_BINARY_AGE 13)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
# the following should match the versions in Xcode project file:
set(DYLIB_CURRENT_VERSION 10.0.0)
set(DYLIB_CURRENT_VERSION 12.0.0)
set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
# Set defaults preventing destination file conflicts
@ -118,6 +117,8 @@ elseif(APPLE)
set(DARWIN TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
set(MACOSX TRUE)
elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*")
set(TVOS TRUE)
endif()
# TODO: iOS?
elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*")
@ -127,7 +128,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*")
endif()
# Don't mistake osx for unix
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT RISCOS)
set(UNIX_SYS ON)
else()
set(UNIX_SYS OFF)
@ -156,11 +157,10 @@ if(UNIX OR MINGW OR MSYS)
endif()
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
# so we'll just use libusb when it's available. Except that libusb
# requires root permissions to open devices, so that's not generally
# useful, and we'll disable this by default on Unix. Windows and macOS
# can use it without root access, though, so enable by default there.
if(WINDOWS OR APPLE OR ANDROID)
# so we'll just use libusb when it's available. libusb does not support iOS,
# so we default to yes on iOS.
# TODO: Windows can support libusb, the hid.c file just depends on Unix APIs
if(WINDOWS OR IOS OR TVOS OR ANDROID)
set(HIDAPI_SKIP_LIBUSB TRUE)
else()
set(HIDAPI_SKIP_LIBUSB FALSE)
@ -169,6 +169,14 @@ if (HIDAPI_SKIP_LIBUSB)
set(OPT_DEF_HIDAPI ON)
endif()
# On the other hand, *BSD specifically uses libusb only, so we make a special
# case just for them.
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
set(HIDAPI_ONLY_LIBUSB TRUE)
else()
set(HIDAPI_ONLY_LIBUSB FALSE)
endif()
# Compiler info
if(CMAKE_COMPILER_IS_GNUCC)
set(USE_GCC TRUE)
@ -299,7 +307,7 @@ endif()
set(SDL_SUBSYSTEMS
Atomic Audio Video Render Events Joystick Haptic Power Threads Timers
File Loadso CPUinfo Filesystem Dlopen Sensor)
File Loadso CPUinfo Filesystem Dlopen Sensor Locale)
foreach(_SUB ${SDL_SUBSYSTEMS})
string(TOUPPER ${_SUB} _OPT)
if (NOT DEFINED SDL_${_OPT}_ENABLED_BY_DEFAULT)
@ -320,6 +328,8 @@ set_option(SSE "Use SSE assembly routines" ${OPT_DEF_ASM})
set_option(SSE2 "Use SSE2 assembly routines" ${OPT_DEF_SSEMATH})
set_option(SSE3 "Use SSE3 assembly routines" ${OPT_DEF_SSEMATH})
set_option(ALTIVEC "Use Altivec assembly routines" ${OPT_DEF_ASM})
set_option(ARMSIMD "use SIMD assembly blitters on ARM" OFF)
set_option(ARMNEON "use NEON assembly blitters on ARM" OFF)
set_option(DISKAUDIO "Support the disk writer audio driver" ON)
set_option(DUMMYAUDIO "Support the dummy audio driver" ON)
set_option(VIDEO_DIRECTFB "Use DirectFB video driver" OFF)
@ -330,7 +340,7 @@ set_option(VIDEO_OPENGLES "Include OpenGL ES support" ON)
set_option(PTHREADS "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
dep_option(PTHREADS_SEM "Use pthread semaphores" ON "PTHREADS" OFF)
set_option(SDL_DLOPEN "Use dlopen for shared object loading" ${SDL_DLOPEN_ENABLED_BY_DEFAULT})
set_option(OSS "Support the OSS audio API" ${UNIX_SYS})
dep_option(OSS "Support the OSS audio API" ON "UNIX_SYS OR RISCOS" OFF)
set_option(ALSA "Support the ALSA audio API" ${UNIX_SYS})
dep_option(ALSA_SHARED "Dynamically load ALSA audio support" ON "ALSA" OFF)
set_option(JACK "Support the JACK audio API" ${UNIX_SYS})
@ -344,6 +354,7 @@ dep_option(ARTS_SHARED "Dynamically load aRts audio support" ON "ARTS" O
set_option(NAS "Support the NAS audio API" ${UNIX_SYS})
set_option(NAS_SHARED "Dynamically load NAS audio API" ${UNIX_SYS})
set_option(SNDIO "Support the sndio audio API" ${UNIX_SYS})
dep_option(SNDIO_SHARED "Dynamically load the sndio audio API" ${UNIX_SYS} ON "SNDIO" OFF)
set_option(FUSIONSOUND "Use FusionSound audio driver" OFF)
dep_option(FUSIONSOUND_SHARED "Dynamically load fusionsound audio support" ON "FUSIONSOUND" OFF)
set_option(LIBSAMPLERATE "Use libsamplerate for audio rate conversion" ${UNIX_SYS})
@ -366,13 +377,17 @@ set_option(VIDEO_COCOA "Use Cocoa video driver" ${APPLE})
set_option(DIRECTX "Use DirectX for Windows audio/video" ${WINDOWS})
set_option(WASAPI "Use the Windows WASAPI audio driver" ${WINDOWS})
set_option(RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS})
set_option(RENDER_METAL "Enable the Metal render driver" ${APPLE})
set_option(VIDEO_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS})
dep_option(VIDEO_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
set_option(VIDEO_METAL "Enable Metal support" ${APPLE})
set_option(VIDEO_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS})
dep_option(KMSDRM_SHARED "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF)
set_option(VIDEO_OFFSCREEN "Use offscreen video driver" OFF)
option_string(BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" "OFF")
option_string(FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" "OFF")
set_option(HIDAPI "Use HIDAPI for low level joystick drivers" ${OPT_DEF_HIDAPI})
set_option(JOYSTICK_VIRTUAL "Enable the virtual-joystick driver" ON)
set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library")
set(SDL_STATIC ${SDL_STATIC_ENABLED_BY_DEFAULT} CACHE BOOL "Build a static version of the library")
@ -389,9 +404,13 @@ file(GLOB SOURCE_FILES
${SDL2_SOURCE_DIR}/src/dynapi/*.c
${SDL2_SOURCE_DIR}/src/events/*.c
${SDL2_SOURCE_DIR}/src/file/*.c
${SDL2_SOURCE_DIR}/src/haptic/*.c
${SDL2_SOURCE_DIR}/src/libm/*.c
${SDL2_SOURCE_DIR}/src/locale/*.c
${SDL2_SOURCE_DIR}/src/power/*.c
${SDL2_SOURCE_DIR}/src/render/*.c
${SDL2_SOURCE_DIR}/src/render/*/*.c
${SDL2_SOURCE_DIR}/src/sensor/*.c
${SDL2_SOURCE_DIR}/src/stdlib/*.c
${SDL2_SOURCE_DIR}/src/thread/*.c
${SDL2_SOURCE_DIR}/src/timer/*.c
@ -659,6 +678,61 @@ if(ASSEMBLY)
endif()
endif()
endif()
if(ARMSIMD)
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
check_c_source_compiles("
.text
.arch armv6
.object_arch armv4
.arm
.altmacro
#ifndef __ARM_EABI__
#error EABI is required (to be sure that calling conventions are compatible)
#endif
pld [r0]
uqadd8 r0, r0, r0
" ARMSIMD_FOUND)
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
if(ARMSIMD_FOUND)
set(HAVE_ARMSIMD TRUE)
set(SDL_ARM_SIMD_BLITTERS 1)
file(GLOB ARMSIMD_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-simd*.S)
set(SOURCE_FILES ${SOURCE_FILES} ${ARMSIMD_SOURCES})
set(WARN_ABOUT_ARM_SIMD_ASM_MIT TRUE)
endif()
endif()
if(ARMNEON)
set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
check_c_source_compiles("
.text
.fpu neon
.arch armv7a
.object_arch armv4
.eabi_attribute 10, 0
.arm
.altmacro
#ifndef __ARM_EABI__
#error EABI is required (to be sure that calling conventions are compatible)
#endif
pld [r0]
vmovn.u16 d0, q0
" ARMNEON_FOUND)
set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
if(ARMNEON_FOUND)
set(HAVE_ARMNEON TRUE)
set(SDL_ARM_NEON_BLITTERS 1)
file(GLOB ARMNEON_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-neon*.S)
set(SOURCE_FILES ${SOURCE_FILES} ${ARMNEON_SOURCES})
set(WARN_ABOUT_ARM_NEON_ASM_MIT TRUE)
endif()
endif()
elseif(MSVC_VERSION GREATER 1500)
# TODO: SDL_cpuinfo.h needs to support the user's configuration wish
# for MSVC - right now it is always activated
@ -691,13 +765,14 @@ if(LIBC)
set(HAVE_SIGNAL_H 1)
foreach(_FN
malloc calloc realloc free qsort abs memset memcpy memmove memcmp
wcslen wcscmp
wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp
strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
_ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
_stricmp _strnicmp sscanf
_stricmp _strnicmp strtok_s sscanf
acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf
copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf
log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf
trunc truncf)
string(TOUPPER ${_FN} _UPPER)
set(HAVE_${_UPPER} 1)
endforeach()
@ -718,7 +793,8 @@ if(LIBC)
check_include_file("${_HEADER}" ${_HAVE_H})
endforeach()
check_include_files("dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;strings.h;string.h;float.h" STDC_HEADERS)
set(STDC_HEADER_NAMES "dlfcn.h;stdint.h;stddef.h;inttypes.h;stdlib.h;stdio.h;strings.h;wchar.h;string.h;float.h")
check_include_files("${STDC_HEADER_NAMES}" STDC_HEADERS)
check_type_size("size_t" SIZEOF_SIZE_T)
check_symbol_exists(M_PI math.h HAVE_M_PI)
# TODO: refine the mprotect check
@ -728,26 +804,36 @@ if(LIBC)
foreach(_FN
strtod malloc calloc realloc free getenv setenv putenv unsetenv
qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
_strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
_strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa
_uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
nanosleep sysconf sysctlbyname getauxval poll _Exit
wcscmp wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr
sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 _Exit
)
string(TOUPPER ${_FN} _UPPER)
set(_HAVEVAR "HAVE_${_UPPER}")
check_function_exists("${_FN}" ${_HAVEVAR})
check_symbol_exists("${_FN}" "${STDC_HEADER_NAMES}" ${_HAVEVAR})
endforeach()
check_symbol_exists(sigaction "signal.h" HAVE_SIGACTION)
check_symbol_exists(setjmp "setjmp.h" HAVE_SETJMP)
check_symbol_exists(nanosleep "time.h" HAVE_NANOSLEEP)
check_symbol_exists(sysconf "unistd.h" HAVE_SYSCONF)
check_symbol_exists(sysctlbyname "sys/types.h;sys/sysctl.h" HAVE_SYSCTLBYNAME)
check_symbol_exists(getauxval "sys/auxv.h" HAVE_GETAUXVAL)
check_symbol_exists(poll "poll.h" HAVE_POLL)
check_library_exists(m pow "" HAVE_LIBM)
if(HAVE_LIBM)
set(CMAKE_REQUIRED_LIBRARIES m)
foreach(_FN
atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin
sinf sqrt sqrtf tan tanf acos asin)
atan atan2 atanf atan2f ceil ceilf copysign copysignf cos cosf
exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f
pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf acos acosf
asin asinf trunc truncf)
string(TOUPPER ${_FN} _UPPER)
set(_HAVEVAR "HAVE_${_UPPER}")
check_function_exists("${_FN}" ${_HAVEVAR})
check_symbol_exists("${_FN}" "math.h" ${_HAVEVAR})
endforeach()
set(CMAKE_REQUIRED_LIBRARIES)
list(APPEND EXTRA_LIBS m)
@ -761,7 +847,7 @@ if(LIBC)
if(NOT APPLE)
check_include_file(alloca.h HAVE_ALLOCA_H)
check_function_exists(alloca HAVE_ALLOCA)
check_symbol_exists(alloca "alloca.h" HAVE_ALLOCA)
else()
set(HAVE_ALLOCA_H 1)
set(HAVE_ALLOCA 1)
@ -793,17 +879,9 @@ if(SDL_HAPTIC)
# Haptic requires some private functions from the joystick subsystem.
message_error("SDL_HAPTIC requires SDL_JOYSTICK, which is not enabled")
endif()
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
endif()
if(SDL_SENSOR)
file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES})
endif()
if(SDL_POWER)
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
endif()
# TODO: in configure.ac, the test for LOADSO and SDL_DLOPEN is a bit weird:
# if LOADSO is not wanted, SDL_LOADSO_DISABLED is set
# If however on Unix or APPLE dlopen() is detected via CheckDLOPEN(),
@ -833,6 +911,14 @@ if(SDL_DLOPEN)
endif()
endif()
if(SDL_JOYSTICK)
if(JOYSTICK_VIRTUAL)
set(SDL_JOYSTICK_VIRTUAL 1)
file(GLOB JOYSTICK_VIRTUAL_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/virtual/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_VIRTUAL_SOURCES})
endif()
endif()
if(SDL_VIDEO)
if(VIDEO_DUMMY)
set(SDL_VIDEO_DRIVER_DUMMY 1)
@ -841,12 +927,19 @@ if(SDL_VIDEO)
set(HAVE_VIDEO_DUMMY TRUE)
set(HAVE_SDL_VIDEO TRUE)
endif()
if(VIDEO_OFFSCREEN)
set(SDL_VIDEO_DRIVER_OFFSCREEN 1)
file(GLOB VIDEO_OFFSCREEN_SOURCES ${SDL2_SOURCE_DIR}/src/video/offscreen/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_OFFSCREEN_SOURCES})
set(HAVE_VIDEO_OFFSCREEN TRUE)
set(HAVE_SDL_VIDEO TRUE)
endif()
endif()
# Platform-specific options and settings
if(ANDROID)
file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES} ${ANDROID_NDK}/sources/android/cpufeatures/cpu-features.c)
# SDL_spinlock.c Needs to be compiled in ARM mode.
# There seems to be no better way currently to set the ARM mode.
@ -897,6 +990,11 @@ if(ANDROID)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_POWER_SOURCES})
set(HAVE_SDL_POWER TRUE)
endif()
if(SDL_LOCALE)
file(GLOB ANDROID_LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/android/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_LOCALE_SOURCES})
set(HAVE_SDL_LOCALE TRUE)
endif()
if(SDL_TIMERS)
set(SDL_TIMER_UNIX 1)
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
@ -916,12 +1014,18 @@ if(ANDROID)
set(HAVE_SDL_VIDEO TRUE)
# Core stuff
find_library(ANDROID_DL_LIBRARY dl)
# find_library(ANDROID_DL_LIBRARY dl)
# FIXME failing dlopen https://github.com/android-ndk/ndk/issues/929
find_library(ANDROID_DL_LIBRARY NAMES libdl.so dl)
find_library(ANDROID_LOG_LIBRARY log)
find_library(ANDROID_LIBRARY_LIBRARY android)
list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_LOG_LIBRARY} ${ANDROID_LIBRARY_LIBRARY})
add_definitions(-DGL_GLEXT_PROTOTYPES)
if (HAVE_HIDAPI)
list(APPEND EXTRA_LIBS hidapi)
endif()
#enable gles
if(VIDEO_OPENGLES)
set(SDL_VIDEO_OPENGL_EGL 1)
@ -981,6 +1085,11 @@ elseif(EMSCRIPTEN)
set(SOURCE_FILES ${SOURCE_FILES} ${EM_POWER_SOURCES})
set(HAVE_SDL_POWER TRUE)
endif()
if(SDL_LOCALE)
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/emscripten/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
set(HAVE_SDL_LOCALE TRUE)
endif()
if(SDL_TIMERS)
set(SDL_TIMER_UNIX 1)
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
@ -1006,7 +1115,7 @@ elseif(EMSCRIPTEN)
endif()
endif()
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
if(SDL_AUDIO)
if(SYSV5 OR SOLARIS OR HPUX)
set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
@ -1072,9 +1181,6 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
ioctl(0, KDGKBENT, &kbe);
}" HAVE_INPUT_KD)
file(GLOB CORE_LINUX_SOURCES ${SDL2_SOURCE_DIR}/src/core/linux/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${CORE_LINUX_SOURCES})
if(HAVE_INPUT_EVENTS)
set(SDL_INPUT_LINUXEV 1)
endif()
@ -1098,6 +1204,8 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
set(HAVE_DBUS_DBUS_H TRUE)
include_directories(${DBUS_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${DBUS_LIBRARIES})
# Fcitx need only dbus.
set(HAVE_FCITX TRUE)
endif()
pkg_search_module(IBUS ibus-1.0 ibus)
@ -1106,6 +1214,11 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
include_directories(${IBUS_INCLUDE_DIRS})
list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES})
endif()
if (HAVE_IBUS_IBUS_H OR HAVE_FCITX)
set(SDL_USE_IME TRUE)
add_definitions(-DSDL_USE_IME) # !!! FIXME: why isn't this a definition and not in SDL_config.h.cmake?
endif()
if(HAVE_LIBUNWIND_H)
# We've already found the header, so REQUIRE the lib to be present
pkg_search_module(UNWIND REQUIRED libunwind)
@ -1114,7 +1227,35 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
endif()
endif()
check_include_file("fcitx/frontend.h" HAVE_FCITX_FRONTEND_H)
if(HAVE_DBUS_DBUS_H)
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_dbus.c")
endif()
if(SDL_USE_IME)
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_ime.c")
endif()
if(HAVE_IBUS_IBUS_H)
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_ibus.c")
endif()
if(HAVE_FCITX)
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_fcitx.c")
endif()
if(HAVE_LIBUDEV_H)
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_udev.c")
endif()
if(HAVE_INPUT_EVENTS)
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev.c")
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_evdev_kbd.c")
endif()
# Always compiled for Linux, unconditionally:
set(SOURCE_FILES ${SOURCE_FILES} "${SDL2_SOURCE_DIR}/src/core/linux/SDL_threadprio.c")
# src/core/unix/*.c is included in a generic if(UNIX) section, elsewhere.
endif()
if(INPUT_TSLIB)
@ -1128,7 +1269,9 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
endif()
if(SDL_JOYSTICK)
CheckUSBHID() # seems to be BSD specific - limit the test to BSD only?
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
CheckUSBHID()
endif()
CheckHIDAPI()
if(LINUX AND NOT ANDROID)
set(SDL_JOYSTICK_LINUX 1)
@ -1167,6 +1310,12 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
endif()
endif()
if(SDL_LOCALE)
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/unix/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
set(HAVE_SDL_LOCALE TRUE)
endif()
if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_UNIX 1)
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/unix/*.c)
@ -1181,8 +1330,8 @@ elseif(UNIX AND NOT APPLE AND NOT ANDROID)
set(HAVE_SDL_TIMERS TRUE)
endif()
if(RPATH)
set(SDL_RLD_FLAGS "")
set(SDL_RLD_FLAGS "")
if(RPATH AND SDL_SHARED)
if(BSDI OR FREEBSD OR LINUX OR NETBSD)
set(CMAKE_REQUIRED_FLAGS "-Wl,--enable-new-dtags")
check_c_compiler_flag("" HAVE_ENABLE_NEW_DTAGS)
@ -1266,10 +1415,9 @@ elseif(WINDOWS)
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
endif()
# headers needed elsewhere ...
# headers needed elsewhere
check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
if(SDL_AUDIO)
set(SDL_AUDIO_DRIVER_WINMM 1)
@ -1321,12 +1469,25 @@ elseif(WINDOWS)
set(HAVE_SDL_THREADS TRUE)
endif()
if(SDL_SENSOR)
set(SDL_SENSOR_WINDOWS 1)
set(HAVE_SDL_SENSORS TRUE)
file(GLOB WINDOWS_SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${WINDOWS_SENSOR_SOURCES})
endif()
if(SDL_POWER)
set(SDL_POWER_WINDOWS 1)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/power/windows/SDL_syspower.c)
set(HAVE_SDL_POWER TRUE)
endif()
if(SDL_LOCALE)
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/windows/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
set(HAVE_SDL_LOCALE TRUE)
endif()
if(SDL_FILESYSTEM)
set(SDL_FILESYSTEM_WINDOWS 1)
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/windows/*.c)
@ -1335,7 +1496,7 @@ elseif(WINDOWS)
endif()
# Libraries for Win32 native and MinGW
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32 vcruntime)
list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
# TODO: in configure.ac the check for timers is set on
# cygwin | mingw32* - does this include mingw32CE?
@ -1374,6 +1535,7 @@ elseif(WINDOWS)
if(SDL_JOYSTICK)
CheckHIDAPI()
# TODO: Remove this hid.c block when SDL_hidapi.c is supported on Windows!
if(HAVE_HIDAPI)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/windows/hid.c)
endif()
@ -1382,11 +1544,6 @@ elseif(WINDOWS)
if(HAVE_DINPUT_H)
set(SDL_JOYSTICK_DINPUT 1)
list(APPEND EXTRA_LIBS dinput8)
if(CMAKE_COMPILER_IS_MINGW)
list(APPEND EXTRA_LIBS dxerr8)
elseif (NOT USE_WINSDK_DIRECTX)
list(APPEND EXTRA_LIBS dxerr)
endif()
endif()
if(HAVE_XINPUT_H)
set(SDL_JOYSTICK_XINPUT 1)
@ -1430,10 +1587,11 @@ elseif(APPLE)
# !!! FIXME: we need Carbon for some very old API calls in
# !!! FIXME: src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out
# !!! FIXME: how to dump those.
if(NOT IOS)
if(DARWIN OR MACOSX)
set(SDL_FRAMEWORK_COCOA 1)
set(SDL_FRAMEWORK_CARBON 1)
endif()
set(SDL_FRAMEWORK_FOUNDATION 1)
# Requires the darwin file implementation
if(SDL_FILE)
@ -1457,56 +1615,69 @@ elseif(APPLE)
set(HAVE_SDL_AUDIO TRUE)
set(SDL_FRAMEWORK_COREAUDIO 1)
set(SDL_FRAMEWORK_AUDIOTOOLBOX 1)
set(SDL_FRAMEWORK_AVFOUNDATION 1)
endif()
if(SDL_JOYSTICK)
CheckHIDAPI()
if(HAVE_HIDAPI)
if(IOS)
if(IOS OR TVOS)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
else()
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/mac/hid.c)
set(SDL_FRAMEWORK_COREBLUETOOTH 1)
endif()
endif()
set(SDL_JOYSTICK_IOKIT 1)
if (IOS)
if(IOS OR TVOS)
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
set(SDL_JOYSTICK_MFI 1)
if(IOS)
set(SDL_FRAMEWORK_COREMOTION 1)
endif()
set(SDL_FRAMEWORK_GAMECONTROLLER 1)
set(HAVE_SDL_SENSORS 1)
else()
file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
set(SDL_JOYSTICK_IOKIT 1)
set(SDL_FRAMEWORK_IOKIT 1)
set(SDL_FRAMEWORK_FF 1)
endif()
set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
set(HAVE_SDL_JOYSTICK TRUE)
set(SDL_FRAMEWORK_IOKIT 1)
set(SDL_FRAMEWORK_FF 1)
endif()
if(SDL_HAPTIC)
set(SDL_HAPTIC_IOKIT 1)
if (IOS)
if (IOS OR TVOS)
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
set(SDL_HAPTIC_DUMMY 1)
else()
file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/darwin/*.c)
set(SDL_HAPTIC_IOKIT 1)
set(SDL_FRAMEWORK_IOKIT 1)
set(SDL_FRAMEWORK_FF 1)
endif()
set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
set(HAVE_SDL_HAPTIC TRUE)
set(SDL_FRAMEWORK_IOKIT 1)
set(SDL_FRAMEWORK_FF 1)
if(NOT SDL_JOYSTICK)
message(FATAL_ERROR "SDL_HAPTIC requires SDL_JOYSTICK to be enabled")
endif()
endif()
if(SDL_POWER)
set(SDL_POWER_MACOSX 1)
if (IOS)
if (IOS OR TVOS)
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/uikit/*.m)
set(SDL_POWER_UIKIT 1)
else()
file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/macosx/*.c)
set(SDL_POWER_MACOSX 1)
set(SDL_FRAMEWORK_IOKIT 1)
endif()
set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
set(HAVE_SDL_POWER TRUE)
set(SDL_FRAMEWORK_IOKIT 1)
endif()
if(SDL_LOCALE)
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/macosx/*.m)
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
set(HAVE_SDL_LOCALE TRUE)
endif()
if(SDL_TIMERS)
@ -1525,6 +1696,89 @@ elseif(APPLE)
set(HAVE_SDL_FILESYSTEM TRUE)
endif()
if(SDL_SENSOR)
if(IOS)
set(SDL_SENSOR_COREMOTION 1)
set(HAVE_SDL_SENSORS TRUE)
file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/coremotion/*.m)
set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES})
endif()
endif()
# iOS hack needed - http://code.google.com/p/ios-cmake/ ?
if(SDL_VIDEO)
if (IOS OR TVOS)
set(SDL_VIDEO_DRIVER_UIKIT 1)
set(SDL_FRAMEWORK_COREGRAPHICS 1)
set(SDL_FRAMEWORK_QUARTZCORE 1)
set(SDL_FRAMEWORK_UIKIT 1)
set(SDL_IPHONE_KEYBOARD 1)
set(SDL_IPHONE_LAUNCHSCREEN 1)
file(GLOB UIKITVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/uikit/*.m)
set(SOURCE_FILES ${SOURCE_FILES} ${UIKITVIDEO_SOURCES})
else()
CheckCOCOA()
if(VIDEO_OPENGL)
set(SDL_VIDEO_OPENGL 1)
set(SDL_VIDEO_OPENGL_CGL 1)
set(SDL_VIDEO_RENDER_OGL 1)
set(HAVE_VIDEO_OPENGL TRUE)
endif()
endif()
if(VIDEO_OPENGLES)
if(IOS OR TVOS)
set(SDL_FRAMEWORK_OPENGLES 1)
set(SDL_VIDEO_OPENGL_ES 1)
set(SDL_VIDEO_RENDER_OGL_ES 1)
else()
set(SDL_VIDEO_OPENGL_EGL 1)
endif()
set(SDL_VIDEO_OPENGL_ES2 1)
set(SDL_VIDEO_RENDER_OGL_ES2 1)
set(HAVE_VIDEO_OPENGLES TRUE)
endif()
if(VIDEO_VULKAN OR VIDEO_METAL OR RENDER_METAL)
set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -ObjC")
check_c_source_compiles("
#include <AvailabilityMacros.h>
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
#if TARGET_OS_SIMULATOR || (!TARGET_CPU_X86_64 && !TARGET_CPU_ARM64)
#error Metal doesn't work on this configuration
#endif
int main()
{
return 0;
}
" HAVE_FRAMEWORK_METAL)
set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
if(HAVE_FRAMEWORK_METAL)
set(SDL_FRAMEWORK_METAL 1)
set(SDL_FRAMEWORK_QUARTZCORE 1)
else()
set(VIDEO_VULKAN 0)
set(VIDEO_METAL 0)
set(RENDER_METAL 0)
endif()
endif()
if(VIDEO_METAL)
set(SDL_VIDEO_METAL 1)
set(HAVE_VIDEO_METAL TRUE)
endif()
if(RENDER_METAL)
file(GLOB RENDER_METAL_SOURCES ${SDL2_SOURCE_DIR}/src/render/metal/*.m)
set(SOURCE_FILES ${SOURCE_FILES} ${RENDER_METAL_SOURCES})
set(SDL_VIDEO_RENDER_METAL 1)
set(HAVE_RENDER_METAL TRUE)
endif()
endif()
# Actually load the frameworks at the end so we don't duplicate include.
if(SDL_FRAMEWORK_COREVIDEO)
find_library(COREVIDEO CoreVideo)
@ -1554,30 +1808,54 @@ elseif(APPLE)
find_library(AUDIOTOOLBOX AudioToolbox)
list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX})
endif()
# iOS hack needed - http://code.google.com/p/ios-cmake/ ?
if(SDL_VIDEO)
if (IOS)
set(SDL_VIDEO_DRIVER_UIKIT 1)
file(GLOB UIKITVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/uikit/*.m)
set(SOURCE_FILES ${SOURCE_FILES} ${UIKITVIDEO_SOURCES})
if(SDL_FRAMEWORK_AVFOUNDATION)
find_library(AVFOUNDATION AVFoundation)
list(APPEND EXTRA_LIBS ${AVFOUNDATION})
endif()
if(SDL_FRAMEWORK_COREBLUETOOTH)
find_library(COREBLUETOOTH CoreBluetooth)
list(APPEND EXTRA_LIBS ${COREBLUETOOTH})
endif()
if(SDL_FRAMEWORK_COREGRAPHICS)
find_library(COREGRAPHICS CoreGraphics)
list(APPEND EXTRA_LIBS ${COREGRAPHICS})
endif()
if(SDL_FRAMEWORK_COREMOTION)
find_library(COREMOTION CoreMotion)
list(APPEND EXTRA_LIBS ${COREMOTION})
endif()
if(SDL_FRAMEWORK_FOUNDATION)
find_library(FOUNDATION Foundation)
list(APPEND EXTRA_LIBS ${FOUNDATION})
endif()
if(SDL_FRAMEWORK_GAMECONTROLLER)
find_library(GAMECONTROLLER GameController)
list(APPEND EXTRA_LIBS ${GAMECONTROLLER})
endif()
if(SDL_FRAMEWORK_METAL)
if(IOS OR TVOS)
find_library(METAL Metal)
list(APPEND EXTRA_LIBS ${METAL})
else()
CheckCOCOA()
if(VIDEO_OPENGL)
set(SDL_VIDEO_OPENGL 1)
set(SDL_VIDEO_OPENGL_CGL 1)
set(SDL_VIDEO_RENDER_OGL 1)
set(HAVE_VIDEO_OPENGL TRUE)
endif()
if(VIDEO_OPENGLES)
set(SDL_VIDEO_OPENGL_EGL 1)
set(SDL_VIDEO_OPENGL_ES2 1)
set(SDL_VIDEO_RENDER_OGL_ES2 1)
set(HAVE_VIDEO_OPENGLES TRUE)
endif()
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,Metal")
endif()
endif()
if(SDL_FRAMEWORK_OPENGLES)
find_library(OPENGLES OpenGLES)
list(APPEND EXTRA_LIBS ${OPENGLES})
endif()
if(SDL_FRAMEWORK_QUARTZCORE)
if(IOS OR TVOS)
find_library(QUARTZCORE QuartzCore)
list(APPEND EXTRA_LIBS ${QUARTZCORE})
else()
list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,QuartzCore")
endif()
endif()
if(SDL_FRAMEWORK_UIKIT)
find_library(UIKIT UIKit)
list(APPEND EXTRA_LIBS ${UIKIT})
endif()
CheckPTHREAD()
@ -1588,18 +1866,6 @@ elseif(HAIKU)
set(SOURCE_FILES ${SOURCE_FILES} ${HAIKUVIDEO_SOURCES})
set(HAVE_SDL_VIDEO TRUE)
set(SDL_FILESYSTEM_HAIKU 1)
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/haiku/*.cc)
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
set(HAVE_SDL_FILESYSTEM TRUE)
if(SDL_TIMERS)
set(SDL_TIMER_HAIKU 1)
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/haiku/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
set(HAVE_SDL_TIMERS TRUE)
endif(SDL_TIMERS)
if(VIDEO_OPENGL)
# TODO: Use FIND_PACKAGE(OpenGL) instead
set(SDL_VIDEO_OPENGL 1)
@ -1610,7 +1876,43 @@ elseif(HAIKU)
endif()
endif()
set(SDL_FILESYSTEM_HAIKU 1)
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/haiku/*.cc)
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
set(HAVE_SDL_FILESYSTEM TRUE)
if(SDL_TIMERS)
set(SDL_TIMER_HAIKU 1)
file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/haiku/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
set(HAVE_SDL_TIMERS TRUE)
endif()
if(SDL_LOCALE)
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/haiku/*.cc)
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
set(HAVE_SDL_LOCALE TRUE)
endif()
CheckPTHREAD()
elseif(RISCOS)
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()
CheckPTHREAD()
if(SDL_AUDIO)
CheckOSS()
endif()
endif()
if(VIDEO_VULKAN)
@ -1654,6 +1956,11 @@ if(NOT HAVE_SDL_FILESYSTEM)
file(GLOB FILESYSTEM_SOURCES ${SDL2_SOURCE_DIR}/src/filesystem/dummy/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
endif()
if(NOT HAVE_SDL_LOCALE)
set(SDL_LOCALE_DISABLED 1)
file(GLOB LOCALE_SOURCES ${SDL2_SOURCE_DIR}/src/locale/dummy/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${LOCALE_SOURCES})
endif()
# We always need to have threads and timers around
if(NOT HAVE_SDL_THREADS)
@ -1712,16 +2019,19 @@ if(NOT WINDOWS OR CYGWIN)
set(ENABLE_STATIC_FALSE "")
endif()
if(SDL_SHARED)
set(PKG_CONFIG_LIBS_PRIV "
Libs.private:")
set(ENABLE_SHARED_TRUE "")
set(ENABLE_SHARED_FALSE "#")
else()
set(PKG_CONFIG_LIBS_PRIV "")
set(ENABLE_SHARED_TRUE "#")
set(ENABLE_SHARED_FALSE "")
endif()
# Clean up the different lists
listtostr(EXTRA_LIBS _EXTRA_LIBS "-l")
set(SDL_STATIC_LIBS ${SDL_LIBS} ${EXTRA_LDFLAGS} ${_EXTRA_LIBS})
set(SDL_STATIC_LIBS ${EXTRA_LDFLAGS} ${_EXTRA_LIBS})
list(REMOVE_DUPLICATES SDL_STATIC_LIBS)
listtostr(SDL_STATIC_LIBS _SDL_STATIC_LIBS)
set(SDL_STATIC_LIBS ${_SDL_STATIC_LIBS})
@ -1784,15 +2094,37 @@ if(UNIX)
message(STATUS "")
endif()
if(WARN_ABOUT_ARM_SIMD_ASM_MIT)
message(STATUS "")
message(STATUS "SDL is being built with ARM SIMD optimizations, which")
message(STATUS "uses code licensed under the MIT license. If this is a")
message(STATUS "problem, please disable that code by rerunning CMake with:")
message(STATUS "")
message(STATUS " -DARMSIMD=OFF")
endif()
if(WARN_ABOUT_ARM_NEON_ASM_MIT)
message(STATUS "")
message(STATUS "SDL is being built with ARM NEON optimizations, which")
message(STATUS "uses code licensed under the MIT license. If this is a")
message(STATUS "problem, please disable that code by rerunning CMake with:")
message(STATUS "")
message(STATUS " -DARMNEON=OFF")
endif()
# Ensure that the extra cflags are used at compile time
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
# Always build SDLmain
add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
set(_INSTALL_LIBS "SDL2main")
if (NOT ANDROID)
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
endif()
if (ANDROID AND HAVE_HIDAPI)
set(_INSTALL_LIBS ${_INSTALL_LIBS} "hidapi")
endif()
if(SDL_SHARED)
@ -1819,10 +2151,16 @@ if(SDL_SHARED)
set_target_properties(SDL2 PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
endif()
set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
if (NOT ANDROID)
set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
target_link_libraries(SDL2 PRIVATE ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
if(ANDROID)
target_include_directories(SDL2 PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures)
else()
set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
endif()
if(IOS OR TVOS)
set_property(TARGET SDL2 APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")
target_compile_definitions(SDL2 PRIVATE IOS_DYLIB=1)
endif()
endif()
@ -1837,7 +2175,9 @@ if(ANDROID)
set_target_properties(hidapi PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
set_target_properties(hidapi PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
endif()
target_link_libraries(hidapi log)
if(HAVE_HIDAPI)
target_link_libraries(hidapi log)
endif()
endif()
if(SDL_STATIC)
@ -1860,9 +2200,14 @@ if(SDL_STATIC)
# libraries - do we need to consider this?
set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
if (NOT ANDROID)
set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
if(ANDROID)
target_include_directories(SDL2-static PRIVATE ${ANDROID_NDK}/sources/android/cpufeatures)
else()
set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
endif()
if(IOS OR TVOS)
set_property(TARGET SDL2-static APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")
endif()
endif()
@ -1885,7 +2230,7 @@ install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets
if (WINDOWS)
set(PKG_PREFIX "cmake")
else ()
set(PKG_PREFIX "lib/cmake/SDL2")
set(PKG_PREFIX "lib${LIB_SUFFIX}/cmake/SDL2")
endif ()
include(CMakePackageConfigHelpers)

+ 1
- 1
modules/SDL2/COPYING.txt View File

@ -1,6 +1,6 @@
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

+ 7
- 2
modules/SDL2/Makefile.in View File

@ -28,7 +28,7 @@ LIBTOOL = @LIBTOOL@
INSTALL = @INSTALL@
AR = @AR@
RANLIB = @RANLIB@
WINDRES = @WINDRES@
RC = @RC@
TARGET = libSDL2.la
OBJECTS = @OBJECTS@
@ -46,7 +46,7 @@ WAYLAND_SCANNER = @WAYLAND_SCANNER@
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
GEN_DIST = SDL2.spec
ifneq ($V,1)
@ -55,6 +55,7 @@ RUN_CMD_CC = @echo " CC " $@;
RUN_CMD_CXX = @echo " CXX " $@;
RUN_CMD_LTLINK = @echo " LTLINK" $@;
RUN_CMD_RANLIB = @echo " RANLIB" $@;
RUN_CMD_RC = @echo " RC " $@;
RUN_CMD_GEN = @echo " GEN " $@;
LIBTOOL += --quiet
endif
@ -81,9 +82,11 @@ HDRS = \
SDL_keyboard.h \
SDL_keycode.h \
SDL_loadso.h \
SDL_locale.h \
SDL_log.h \
SDL_main.h \
SDL_messagebox.h \
SDL_metal.h \
SDL_mouse.h \
SDL_mutex.h \
SDL_name.h \
@ -187,6 +190,7 @@ install-data:
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
$(INSTALL) -m 644 sdl2-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL2
endif
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
@ -207,6 +211,7 @@ uninstall-data:
rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
clean:
rm -rf $(objects)

+ 9
- 4
modules/SDL2/Makefile.os2 View File

@ -1,8 +1,8 @@
# Open Watcom makefile to build SDL2.dll for OS/2:
# Open Watcom makefile to build SDL2.dll for OS/2
# wmake -f Makefile.os2
LIBNAME = SDL2
VERSION = 2.0.10
VERSION = 2.0.13
DESCRIPTION = Simple DirectMedia Layer 2
LIBHOME = .
@ -33,7 +33,7 @@ MSRCS= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.
s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
SRCS+= SDL_rwops.c SDL_power.c
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
@ -60,6 +60,8 @@ SRCS+= SDL_dummysensor.c
SRCS+= SDL_dynapi.c
SRCS+= SDL_locale.c SDL_syslocale.c
OBJS = $(SRCS:.c=.obj)
MOBJS= $(MSRCS:.c=.obj)
@ -68,7 +70,7 @@ MOBJS= $(MSRCS:.c=.obj)
.c: ./src;./src/dynapi;./src/audio;./src/cpuinfo;./src/events;./src/file;./src/haptic;./src/joystick;./src/power;./src/render;./src/render/software;./src/sensor;./src/stdlib;./src/thread;./src/timer;./src/video;./src/video/yuv2rgb;./src/atomic;./src/audio/disk;
.c: ./src/haptic/dummy;./src/joystick/dummy;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
.c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;
.c: ./src/loadso/dummy;./src/filesystem/dummy;./src/timer/dummy;./src/thread/generic;./src/locale/;./src/locale/unix
all: $(DLLFILE) $(LIBFILE) .symbolic
@ -89,6 +91,9 @@ SDL_cpuinfo.obj: SDL_cpuinfo.c
SDL_rwops.obj: SDL_rwops.c
wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
SDL_wave.obj: SDL_wave.c
wcc386 $(CFLAGS) -wcd=124 -fo=$^@ $<
SDL_blendfillrect.obj: SDL_blendfillrect.c
wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<

+ 2
- 1
modules/SDL2/Makefile.psp View File

@ -50,6 +50,7 @@ OBJS= src/SDL.o \
src/stdlib/SDL_qsort.o \
src/stdlib/SDL_stdlib.o \
src/stdlib/SDL_string.o \
src/stdlib/SDL_strtokr.o \
src/thread/SDL_thread.o \
src/thread/generic/SDL_systls.o \
src/thread/psp/SDL_syssem.o \
@ -78,7 +79,7 @@ OBJS= src/SDL.o \
src/video/psp/SDL_pspevents.o \
src/video/psp/SDL_pspvideo.o \
src/video/psp/SDL_pspgl.o \
src/video/psp/SDL_pspmouse.o \
src/video/psp/SDL_pspmouse.o
INCDIR = ./include
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL

+ 0
- 119
modules/SDL2/SDL2.spec View File

@ -1,119 +0,0 @@
Summary: Simple DirectMedia Layer
Name: SDL2
Version: 2.0.10
Release: 2
Source: http://www.libsdl.org/release/%{name}-%{version}.tar.gz
URL: http://www.libsdl.org/
License: zlib
Group: System Environment/Libraries
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
Prefix: %{_prefix}
%ifos linux
Provides: libSDL2-2.0.so.0
%endif
%define __defattr %defattr(-,root,root)
%define __soext so
%description
This is the Simple DirectMedia Layer, a generic API that provides low
level access to audio, keyboard, mouse, and display framebuffer across
multiple platforms.
%package devel
Summary: Libraries, includes and more to develop SDL applications.
Group: Development/Libraries
Requires: %{name} = %{version}
%description devel
This is the Simple DirectMedia Layer, a generic API that provides low
level access to audio, keyboard, mouse, and display framebuffer across
multiple platforms.
This is the libraries, include files and other resources you can use
to develop SDL applications.
%prep
%setup -q
%build
%ifos linux
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --disable-video-directfb
%else
%configure
%endif
make
%install
rm -rf $RPM_BUILD_ROOT
%ifos linux
make install prefix=$RPM_BUILD_ROOT%{prefix} \
bindir=$RPM_BUILD_ROOT%{_bindir} \
libdir=$RPM_BUILD_ROOT%{_libdir} \
includedir=$RPM_BUILD_ROOT%{_includedir} \
datadir=$RPM_BUILD_ROOT%{_datadir} \
mandir=$RPM_BUILD_ROOT%{_mandir}
%else
%makeinstall
%endif
%clean
rm -rf $RPM_BUILD_ROOT
%files
%{__defattr}
%doc README*.txt COPYING.txt CREDITS.txt BUGS.txt
%{_libdir}/lib*.%{__soext}.*
%files devel
%{__defattr}
%doc docs/README*.md
%{_bindir}/*-config
%{_libdir}/lib*.a
%{_libdir}/lib*.la
%{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h
%{_libdir}/cmake/*
%{_libdir}/pkgconfig/SDL2/*
%{_datadir}/aclocal/*
%changelog
* Thu Jun 04 2015 Ryan C. Gordon <icculus@icculus.org>
- Fixed README paths.
* Sun Dec 07 2014 Simone Contini <s.contini@oltrelinux.com>
- Fixed changelog date issue and docs filenames
* Sun Jan 22 2012 Sam Lantinga <slouken@libsdl.org>
- Updated for SDL 2.0
* Tue May 16 2006 Sam Lantinga <slouken@libsdl.org>
- Removed support for Darwin, due to build problems on ps2linux
* Sat Jan 03 2004 Anders Bjorklund <afb@algonet.se>
- Added support for Darwin, updated spec file
* Wed Jan 19 2000 Sam Lantinga <slouken@libsdl.org>
- Re-integrated spec file into SDL distribution
- 'name' and 'version' come from configure
- Some of the documentation is devel specific
- Removed SMP support from %build - it doesn't work with libtool anyway
* Tue Jan 18 2000 Hakan Tandogan <hakan@iconsult.com>
- Hacked Mandrake sdl spec to build 1.1
* Sun Dec 19 1999 John Buswell <johnb@mandrakesoft.com>
- Build Release
* Sat Dec 18 1999 John Buswell <johnb@mandrakesoft.com>
- Add symlink for libSDL-1.0.so.0 required by sdlbomber
- Added docs
* Thu Dec 09 1999 Lenny Cartier <lenny@mandrakesoft.com>
- v 1.0.0
* Mon Nov 1 1999 Chmouel Boudjnah <chmouel@mandrakesoft.com>
- First spec file for Mandrake distribution.
# end of file

+ 7
- 0
modules/SDL2/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj View File

@ -52,6 +52,7 @@
<ClInclude Include="..\..\include\SDL_keyboard.h" />
<ClInclude Include="..\..\include\SDL_keycode.h" />
<ClInclude Include="..\..\include\SDL_loadso.h" />
<ClInclude Include="..\..\include\SDL_locale.h" />
<ClInclude Include="..\..\include\SDL_log.h" />
<ClInclude Include="..\..\include\SDL_main.h" />
<ClInclude Include="..\..\include\SDL_mouse.h" />
@ -114,9 +115,11 @@
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_render_winrt.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
<ClInclude Include="..\..\src\render\opengles2\SDL_gles2funcs.h" />
@ -243,10 +246,13 @@
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
<ClCompile Include="..\..\src\locale\winrt\SDL_syslocale.c" />
<ClCompile Include="..\..\src\power\SDL_power.c" />
<ClCompile Include="..\..\src\power\winrt\SDL_syspower.cpp" />
<ClCompile Include="..\..\src\render\direct3d11\SDL_render_d3d11.c" />
@ -285,6 +291,7 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_syssem.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\stdcpp\SDL_syscond.cpp" />

+ 21
- 0
modules/SDL2/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj.filters View File

@ -84,6 +84,9 @@
<ClInclude Include="..\..\include\SDL_loadso.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL_locale.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL_log.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -252,6 +255,9 @@
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
@ -318,6 +324,9 @@
<ClInclude Include="..\..\src\SDL_internal.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\locale\SDL_syslocale.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\thread\SDL_systhread.h">
<Filter>Source Files</Filter>
</ClInclude>
@ -533,6 +542,9 @@
<ClCompile Include="..\..\src\joystick\SDL_joystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
@ -608,6 +620,12 @@
<ClCompile Include="..\..\src\SDL_log.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\locale\SDL_locale.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\locale\winrt\SDL_syslocale.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c">
<Filter>Source Files</Filter>
</ClCompile>
@ -626,6 +644,9 @@
<ClCompile Include="..\..\src\stdlib\SDL_string.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\thread\generic\SDL_syssem.c">
<Filter>Source Files</Filter>
</ClCompile>

+ 7
- 0
modules/SDL2/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj View File

@ -44,6 +44,7 @@
<ClInclude Include="..\..\include\SDL_keyboard.h" />
<ClInclude Include="..\..\include\SDL_keycode.h" />
<ClInclude Include="..\..\include\SDL_loadso.h" />
<ClInclude Include="..\..\include\SDL_locale.h" />
<ClInclude Include="..\..\include\SDL_log.h" />
<ClInclude Include="..\..\include\SDL_main.h" />
<ClInclude Include="..\..\include\SDL_mouse.h" />
@ -101,6 +102,7 @@
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_render_winrt.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
@ -123,6 +125,7 @@
<ClInclude Include="..\..\src\SDL_fatal.h" />
<ClInclude Include="..\..\src\SDL_hints_c.h" />
<ClInclude Include="..\..\src\SDL_internal.h" />
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
@ -213,6 +216,7 @@
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="..\..\src\power\SDL_power.c" />
@ -243,6 +247,8 @@
<ClCompile Include="..\..\src\SDL_error.c" />
<ClCompile Include="..\..\src\SDL_hints.c" />
<ClCompile Include="..\..\src\SDL_log.c" />
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
<ClCompile Include="..\..\src\locale\winrt\SDL_syslocale.c" />
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
@ -251,6 +257,7 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />

+ 21
- 0
modules/SDL2/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj.filters View File

@ -84,6 +84,9 @@
<ClInclude Include="..\..\include\SDL_loadso.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL_locale.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL_log.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -306,6 +309,9 @@
<ClInclude Include="..\..\src\SDL_internal.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\locale\SDL_syslocale.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\thread\SDL_systhread.h">
<Filter>Source Files</Filter>
</ClInclude>
@ -369,6 +375,9 @@
<ClInclude Include="..\..\src\video\winrt\SDL_winrtvideo_cpp.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
@ -575,6 +584,12 @@
<ClCompile Include="..\..\src\SDL_log.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\locale\SDL_locale.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\locale\winrt\SDL_syslocale.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c">
<Filter>Source Files</Filter>
</ClCompile>
@ -593,6 +608,9 @@
<ClCompile Include="..\..\src\stdlib\SDL_string.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\thread\SDL_thread.c">
<Filter>Source Files</Filter>
</ClCompile>
@ -689,6 +707,9 @@
<ClCompile Include="..\..\src\video\winrt\SDL_winrtvideo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>

+ 19
- 6
modules/SDL2/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj View File

@ -52,6 +52,7 @@
<ClInclude Include="..\..\include\SDL_keyboard.h" />
<ClInclude Include="..\..\include\SDL_keycode.h" />
<ClInclude Include="..\..\include\SDL_loadso.h" />
<ClInclude Include="..\..\include\SDL_locale.h" />
<ClInclude Include="..\..\include\SDL_log.h" />
<ClInclude Include="..\..\include\SDL_main.h" />
<ClInclude Include="..\..\include\SDL_mouse.h" />
@ -114,6 +115,7 @@
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
@ -138,6 +140,7 @@
<ClInclude Include="..\..\src\SDL_fatal.h" />
<ClInclude Include="..\..\src\SDL_hints_c.h" />
<ClInclude Include="..\..\src\SDL_internal.h" />
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
@ -241,6 +244,7 @@
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
@ -275,6 +279,8 @@
<ClCompile Include="..\..\src\SDL_error.c" />
<ClCompile Include="..\..\src\SDL_hints.c" />
<ClCompile Include="..\..\src\SDL_log.c" />
<ClInclude Include="..\..\src\locale\SDL_locale.c" />
<ClInclude Include="..\..\src\locale\winrt\SDL_syslocale.c" />
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
@ -283,6 +289,7 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
@ -492,7 +499,8 @@
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>vccorlibd;msvcrtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -506,7 +514,8 @@
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>vccorlib.lib;msvcrt.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>vccorlib;msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|arm'">
@ -520,7 +529,8 @@
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>vccorlibd;msvcrtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|arm'">
@ -534,7 +544,8 @@
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>vccorlib.lib;msvcrt.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>vccorlib;msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -548,7 +559,8 @@
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>vccorlibd.lib;msvcrtd.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>vccorlibd;msvcrtd;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@ -562,7 +574,8 @@
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<GenerateWindowsMetadata>false</GenerateWindowsMetadata>
<AdditionalDependencies>xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>vccorlib.lib;msvcrt.lib;xinput.lib;mmdevapi.lib;d2d1.lib;d3d11.lib;dxgi.lib;ole32.lib;windowscodecs.lib;dwrite.lib;kernel32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<IgnoreSpecificDefaultLibraries>vccorlib;msvcrt;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

+ 21
- 0
modules/SDL2/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj.filters View File

@ -84,6 +84,9 @@
<ClInclude Include="..\..\include\SDL_loadso.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL_locale.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL_log.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -306,6 +309,9 @@
<ClInclude Include="..\..\src\SDL_internal.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\locale\SDL_syslocale.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\thread\SDL_thread_c.h">
<Filter>Source Files</Filter>
</ClInclude>
@ -372,6 +378,9 @@
<ClInclude Include="..\..\src\core\windows\SDL_xinput.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h">
<Filter>Source Files</Filter>
</ClInclude>
@ -423,6 +432,12 @@
<ClInclude Include="..\..\src\events\SDL_displayevents_c.h">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\locale\winrt\SDL_syslocale.c">
<Filter>Source Files</Filter>
</ClInclude>
<ClInclude Include="..\..\src\locale\SDL_locale.c">
<Filter>Source Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\atomic\SDL_atomic.c">
@ -611,6 +626,9 @@
<ClCompile Include="..\..\src\stdlib\SDL_string.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\thread\SDL_thread.c">
<Filter>Source Files</Filter>
</ClCompile>
@ -710,6 +728,9 @@
<ClCompile Include="..\..\src\core\windows\SDL_xinput.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c">
<Filter>Source Files</Filter>
</ClCompile>

+ 11
- 0
modules/SDL2/VisualC/SDL.sln View File

@ -52,6 +52,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testvulkan", "tests\testvul
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testyuv", "tests\testyuv\testyuv.vcxproj", "{40FB7794-D3C3-4CFE-BCF4-A80C97635682}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "testsensor", "tests\testsensor\testsensor.vcxproj", "{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -260,6 +262,14 @@ Global
{40FB7794-D3C3-4CFE-BCF4-A80C97635682}.Release|Win32.Build.0 = Release|Win32
{40FB7794-D3C3-4CFE-BCF4-A80C97635682}.Release|x64.ActiveCfg = Release|x64
{40FB7794-D3C3-4CFE-BCF4-A80C97635682}.Release|x64.Build.0 = Release|x64
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Debug|Win32.ActiveCfg = Debug|Win32
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Debug|Win32.Build.0 = Debug|Win32
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Debug|x64.ActiveCfg = Debug|x64
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Debug|x64.Build.0 = Debug|x64
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|Win32.ActiveCfg = Release|Win32
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|Win32.Build.0 = Release|Win32
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|x64.ActiveCfg = Release|x64
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -287,5 +297,6 @@ Global
{55812185-D13C-4022-9C81-32E0F4A08306} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{0D604DFD-AAB6-442C-9368-F91A344146AB} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{40FB7794-D3C3-4CFE-BCF4-A80C97635682} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4} = {D69D5741-611F-4E14-8541-1FEE94F50B5A}
EndGlobalSection
EndGlobal

+ 20
- 3
modules/SDL2/VisualC/SDL/SDL.vcxproj View File

@ -130,7 +130,6 @@
<PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
@ -196,7 +195,6 @@
<PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
@ -241,6 +239,7 @@
<ClInclude Include="..\..\include\SDL_keyboard.h" />
<ClInclude Include="..\..\include\SDL_keycode.h" />
<ClInclude Include="..\..\include\SDL_loadso.h" />
<ClInclude Include="..\..\include\SDL_locale.h" />
<ClInclude Include="..\..\include\SDL_log.h" />
<ClInclude Include="..\..\include\SDL_main.h" />
<ClInclude Include="..\..\include\SDL_messagebox.h" />
@ -320,15 +319,20 @@
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
<ClInclude Include="..\..\src\joystick\controller_type.h" />
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_rawinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
<ClInclude Include="..\..\src\libm\math_libm.h" />
<ClInclude Include="..\..\src\libm\math_private.h" />
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
@ -350,6 +354,7 @@
<ClInclude Include="..\..\src\sensor\dummy\SDL_dummysensor.h" />
<ClInclude Include="..\..\src\sensor\SDL_sensor_c.h" />
<ClInclude Include="..\..\src\sensor\SDL_syssensor.h" />
<ClInclude Include="..\..\src\sensor\windows\SDL_windowssensor.h" />
<ClInclude Include="..\..\src\thread\SDL_systhread.h" />
<ClInclude Include="..\..\src\thread\SDL_thread_c.h" />
<ClInclude Include="..\..\src\thread\windows\SDL_systhread_c.h" />
@ -415,21 +420,29 @@
<ClCompile Include="..\..\src\events\SDL_windowevents.c" />
<ClCompile Include="..\..\src\file\SDL_rwops.c" />
<ClCompile Include="..\..\src\filesystem\windows\SDL_sysfilesystem.c" />
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
<ClCompile Include="..\..\src\haptic\SDL_haptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_dinputhaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\hidapi\windows\hid.c" />
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_xinputjoystick.c" />
<ClCompile Include="..\..\src\libm\e_atan2.c" />
<ClCompile Include="..\..\src\libm\e_exp.c" />
@ -452,6 +465,8 @@
<ClCompile Include="..\..\src\libm\s_sin.c" />
<ClCompile Include="..\..\src\libm\s_tan.c" />
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
<ClCompile Include="..\..\src\locale\windows\SDL_syslocale.c" />
<ClCompile Include="..\..\src\power\SDL_power.c" />
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
<ClCompile Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.c" />
@ -480,12 +495,14 @@
<ClCompile Include="..\..\src\SDL_log.c" />
<ClCompile Include="..\..\src\sensor\dummy\SDL_dummysensor.c" />
<ClCompile Include="..\..\src\sensor\SDL_sensor.c" />
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c" />
<ClCompile Include="..\..\src\stdlib\SDL_getenv.c" />
<ClCompile Include="..\..\src\stdlib\SDL_iconv.c" />
<ClCompile Include="..\..\src\stdlib\SDL_malloc.c" />
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />

+ 22
- 1
modules/SDL2/VisualC/SDL/SDL.vcxproj.filters View File

@ -84,6 +84,9 @@
<ClInclude Include="..\..\include\SDL_loadso.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL_locale.h">
<Filter>API Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\include\SDL_log.h">
<Filter>API Headers</Filter>
</ClInclude>
@ -259,15 +262,17 @@
<ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
<ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
<ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
<ClInclude Include="..\..\src\joystick\controller_type.h" />
<ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
<ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
<ClInclude Include="..\..\src\joystick\virtual\SDL_virtualjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_dinputjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_windowsjoystick_c.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_xinputjoystick_c.h" />
<ClInclude Include="..\..\src\libm\math_libm.h" />
<ClInclude Include="..\..\src\libm\math_private.h" />
<ClInclude Include="..\..\src\locale\SDL_syslocale.h" />
<ClInclude Include="..\..\src\render\direct3d\SDL_shaders_d3d.h" />
<ClInclude Include="..\..\src\render\direct3d11\SDL_shaders_d3d11.h" />
<ClInclude Include="..\..\src\render\opengl\SDL_glfuncs.h" />
@ -322,6 +327,10 @@
<ClInclude Include="..\..\src\video\windows\SDL_windowswindow.h" />
<ClInclude Include="..\..\src\video\windows\wmmsg.h" />
<ClInclude Include="..\..\src\video\yuv2rgb\yuv_rgb.h" />
<ClInclude Include="..\..\src\joystick\windows\SDL_rawinputjoystick_c.h" />
<ClInclude Include="..\..\src\hidapi\hidapi\hidapi.h" />
<ClInclude Include="..\..\src\joystick\SDL_gamecontrollerdb.h" />
<ClInclude Include="..\..\src\sensor\windows\SDL_windowssensor.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\src\atomic\SDL_atomic.c" />
@ -360,13 +369,17 @@
<ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
<ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
<ClCompile Include="..\..\src\hidapi\windows\hid.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
<ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
<ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
<ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
<ClCompile Include="..\..\src\joystick\virtual\SDL_virtualjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_dinputjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_mmjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windowsjoystick.c" />
@ -392,6 +405,8 @@
<ClCompile Include="..\..\src\libm\s_sin.c" />
<ClCompile Include="..\..\src\libm\s_tan.c" />
<ClCompile Include="..\..\src\loadso\windows\SDL_sysloadso.c" />
<ClCompile Include="..\..\src\locale\SDL_locale.c" />
<ClCompile Include="..\..\src\locale\windows\SDL_syslocale.c" />
<ClCompile Include="..\..\src\power\SDL_power.c" />
<ClCompile Include="..\..\src\power\windows\SDL_syspower.c" />
<ClCompile Include="..\..\src\render\direct3d\SDL_render_d3d.c" />
@ -426,6 +441,7 @@
<ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
<ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
<ClCompile Include="..\..\src\stdlib\SDL_string.c" />
<ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
<ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
<ClCompile Include="..\..\src\thread\SDL_thread.c" />
<ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
@ -472,6 +488,11 @@
<ClCompile Include="..\..\src\video\windows\SDL_windowsvulkan.c" />
<ClCompile Include="..\..\src\video\windows\SDL_windowswindow.c" />
<ClCompile Include="..\..\src\video\yuv2rgb\yuv_rgb.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_rawinputjoystick.c" />
<ClCompile Include="..\..\src\sensor\windows\SDL_windowssensor.c" />
<ClCompile Include="..\..\src\haptic\dummy\SDL_syshaptic.c" />
<ClCompile Include="..\..\src\joystick\dummy\SDL_sysjoystick.c" />
<ClCompile Include="..\..\src\joystick\windows\SDL_windows_gaming_input.c" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="..\..\src\main\windows\version.rc" />

+ 0
- 2
modules/SDL2/VisualC/SDLmain/SDLmain.vcxproj View File

@ -108,7 +108,6 @@
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
@ -143,7 +142,6 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>

+ 0
- 2
modules/SDL2/VisualC/SDLtest/SDLtest.vcxproj View File

@ -108,7 +108,6 @@
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>
@ -143,7 +142,6 @@
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<BufferSecurityCheck>false</BufferSecurityCheck>
<EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
<OmitDefaultLibName>true</OmitDefaultLibName>

+ 199
- 0
modules/SDL2/VisualC/tests/testsensor/testsensor.vcxproj View File

@ -0,0 +1,199 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{C4E04D18-EF76-4B42-B4C2-16A1BACDC0A4}</ProjectGuid>
<RootNamespace>testsensor</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="$(VCTargetsPath)Microsoft.CPP.UpgradeFromVC70.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Platform)\$(Configuration)\</IntDir>
<OutDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
<IntDir Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(Platform)\$(Configuration)\</IntDir>
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|x64'">AllRules.ruleset</CodeAnalysisRuleSet>
<CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Debug/testsensor.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Midl>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Debug/testsensor.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>OldStyle</DebugInformationFormat>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>Win32</TargetEnvironment>
<TypeLibraryName>.\Release/testsensor.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Midl>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MkTypLibCompatible>true</MkTypLibCompatible>
<SuppressStartupBanner>true</SuppressStartupBanner>
<TargetEnvironment>X64</TargetEnvironment>
<TypeLibraryName>.\Release/testsensor.tlb</TypeLibraryName>
</Midl>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)/../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
</ClCompile>
<ResourceCompile>
<PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<Culture>0x0409</Culture>
</ResourceCompile>
<Link>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ProjectReference Include="..\..\SDL\SDL.vcxproj">
<Project>{81ce8daf-ebb2-4761-8e45-b71abcca8c68}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
<ProjectReference Include="..\..\SDLmain\SDLmain.vcxproj">
<Project>{da956fd3-e142-46f2-9dd5-c78bebb56b7a}</Project>
<Private>false</Private>
<CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
<ReferenceOutputAssembly>true</ReferenceOutputAssembly>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\test\testsensor.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

+ 63
- 0
modules/SDL2/WhatsNew.txt View File

@ -1,6 +1,69 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
2.0.12:
---------------------------------------------------------------------------
General:
* Added SDL_GetTextureScaleMode() and SDL_SetTextureScaleMode() to get and set the scaling mode used for a texture
* Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface.
* Added new blend mode, SDL_BLENDMODE_MUL, which does a modulate and blend operation
* Added the hint SDL_HINT_DISPLAY_USABLE_BOUNDS to override the results of SDL_GetDisplayUsableBounds() for display index 0.
* Added the window underneath the finger to the SDL_TouchFingerEvent
* Added SDL_GameControllerTypeForIndex(), SDL_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro)
* Added the hint SDL_HINT_GAMECONTROLLERTYPE to override the automatic game controller type detection
* Added SDL_JoystickFromPlayerIndex() and SDL_GameControllerFromPlayerIndex() to get the device associated with a player index
* Added SDL_JoystickSetPlayerIndex() and SDL_GameControllerSetPlayerIndex() to set the player index associated with a device
* Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to specify whether Nintendo Switch Pro controllers should use the buttons as labeled or swapped to match positional layout. The default is to use the buttons as labeled.
* Added support for Nintendo GameCube controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE to control whether this is used.
* Improved support for Xbox 360 and Xbox One controllers when using the HIDAPI driver
* Added support for many game controllers, including:
* 8BitDo FC30 Pro
* 8BitDo M30 GamePad
* BDA PS4 Fightpad
* HORI Fighting Commander
* Hyperkin Duke
* Hyperkin X91
* MOGA XP5-A Plus
* NACON GC-400ES
* NVIDIA Controller v01.04
* PDP Versus Fighting Pad
* Razer Raion Fightpad for PS4
* Razer Serval
* Stadia Controller
* SteelSeries Stratus Duo
* Victrix Pro Fight Stick for PS4
* Xbox One Elite Series 2
* Fixed blocking game controller rumble calls when using the HIDAPI driver
* Added SDL_zeroa() macro to zero an array of elements
* Added SDL_HasARMSIMD() which returns true if the CPU has ARM SIMD (ARMv6+) features
Windows:
* Fixed crash when using the release SDL DLL with applications built with gcc
* Fixed performance regression in event handling introduced in 2.0.10
* Added support for SDL_SetThreadPriority() for UWP applications
Linux:
* Added the hint SDL_HINT_VIDEO_X11_WINDOW_VISUALID to specify the visual chosen for new X11 windows
* Added the hint SDL_HINT_VIDEO_X11_FORCE_EGL to specify whether X11 should use GLX or EGL by default
iOS / tvOS / macOS:
* Added SDL_Metal_CreateView() and SDL_Metal_DestroyView() to create CAMetalLayer-backed NSView/UIView and attach it to the specified window.
iOS/ tvOS:
* Added support for Bluetooth Steam Controllers as game controllers
tvOS:
* Fixed support for surround sound on Apple TV
Android:
* Added SDL_GetAndroidSDKVersion() to return the API level of the current device
* Added support for audio capture using OpenSL-ES
* Added support for Bluetooth Steam Controllers as game controllers
* Fixed rare crashes when the app goes into the background or terminates
---------------------------------------------------------------------------
2.0.10:
---------------------------------------------------------------------------

+ 149
- 2
modules/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj View File

@ -343,6 +343,22 @@
55FFA91A2122302B00D7CBED /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; };
566726451DF72CF5001DD3DB /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
566726461DF72CF5001DD3DB /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; };
566E26EE2462770300718109 /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26ED2462770300718109 /* SDL_locale.h */; };
566E26EF2462770300718109 /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26ED2462770300718109 /* SDL_locale.h */; };
566E26F02462770300718109 /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26ED2462770300718109 /* SDL_locale.h */; };
566E26F12462770300718109 /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26ED2462770300718109 /* SDL_locale.h */; };
566E26F22462770300718109 /* SDL_locale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26ED2462770300718109 /* SDL_locale.h */; };
566E26F82462774E00718109 /* SDL_syslocale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26F42462774E00718109 /* SDL_syslocale.h */; };
566E26F92462774E00718109 /* SDL_syslocale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26F42462774E00718109 /* SDL_syslocale.h */; };
566E26FA2462774E00718109 /* SDL_syslocale.h in Headers */ = {isa = PBXBuildFile; fileRef = 566E26F42462774E00718109 /* SDL_syslocale.h */; };
566E26FD2462774E00718109 /* SDL_syslocale.m in Sources */ = {isa = PBXBuildFile; fileRef = 566E26F62462774E00718109 /* SDL_syslocale.m */; };
566E26FE2462774E00718109 /* SDL_syslocale.m in Sources */ = {isa = PBXBuildFile; fileRef = 566E26F62462774E00718109 /* SDL_syslocale.m */; };
566E26FF2462774E00718109 /* SDL_syslocale.m in Sources */ = {isa = PBXBuildFile; fileRef = 566E26F62462774E00718109 /* SDL_syslocale.m */; };
566E27002462774E00718109 /* SDL_syslocale.m in Sources */ = {isa = PBXBuildFile; fileRef = 566E26F62462774E00718109 /* SDL_syslocale.m */; };
566E27032462774E00718109 /* SDL_locale.c in Sources */ = {isa = PBXBuildFile; fileRef = 566E26F72462774E00718109 /* SDL_locale.c */; };
566E27042462774E00718109 /* SDL_locale.c in Sources */ = {isa = PBXBuildFile; fileRef = 566E26F72462774E00718109 /* SDL_locale.c */; };
566E27052462774E00718109 /* SDL_locale.c in Sources */ = {isa = PBXBuildFile; fileRef = 566E26F72462774E00718109 /* SDL_locale.c */; };
566E27062462774E00718109 /* SDL_locale.c in Sources */ = {isa = PBXBuildFile; fileRef = 566E26F72462774E00718109 /* SDL_locale.c */; };
56A6702E18565E450007D20F /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; };
56A6703518565E760007D20F /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */; };
56A6703618565E760007D20F /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703218565E760007D20F /* SDL_dynapi_procs.h */; };
@ -355,14 +371,44 @@
56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E0118A8EE200A56AA6 /* SDL_power.c */; };
56ED04E3118A8EFD00A56AA6 /* SDL_syspower.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */; };
56F9D5601DF73BA400C15B5D /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
63CC93C723849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
63CC93C823849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
63CC93C923849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
63CC93CA23849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
75BB5C66241EA8C300D75403 /* SDL_virtualjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 75BB5C64241EA8C300D75403 /* SDL_virtualjoystick.c */; };
75BB5C67241EA8C300D75403 /* SDL_virtualjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 75BB5C64241EA8C300D75403 /* SDL_virtualjoystick.c */; };
75BB5C68241EA8C300D75403 /* SDL_virtualjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 75BB5C64241EA8C300D75403 /* SDL_virtualjoystick.c */; };
75BB5C69241EA8C300D75403 /* SDL_virtualjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = 75BB5C64241EA8C300D75403 /* SDL_virtualjoystick.c */; };
75BB5C6A241EA8C300D75403 /* SDL_virtualjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 75BB5C65241EA8C300D75403 /* SDL_virtualjoystick_c.h */; };
75BB5C6B241EA8C300D75403 /* SDL_virtualjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 75BB5C65241EA8C300D75403 /* SDL_virtualjoystick_c.h */; };
75BB5C6C241EA8C300D75403 /* SDL_virtualjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 75BB5C65241EA8C300D75403 /* SDL_virtualjoystick_c.h */; };
93CB792313FC5E5200BD3E05 /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; };
93CB792613FC5F5300BD3E05 /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
A704172E20F7E74800A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; };
A704172F20F7E76000A82227 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
A704173120F7F39900A82227 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
A704173220F7F39900A82227 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
A75FDAB723E288E400529352 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
A75FDAB823E2890000529352 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
A75FDBD923EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
A75FDBDA23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
A75FDBDB23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
A75FDBDC23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
A75FDBDD23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
A75FDBDE23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
A75FDBDF23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
A7C19D29212E552C00DF2152 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; };
A7C19D2A212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
A7C19D2B212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
A7F629241FE06523002F9CC9 /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; };
A7FF6B6223AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
A7FF6B6323AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
A7FF6B6423AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
A7FF6B6523AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
A7FF6B6723AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
A7FF6B6823AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
A7FF6B6923AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
A7FF6B6A23AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
AA0AD06516647BD400CE5896 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
AA0F8495178D5F1A00823F9D /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8494178D5F1A00823F9D /* SDL_systls.c */; };
@ -717,6 +763,7 @@
F3E3C75B224138AE007D243C /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E3C657224069CE007D243C /* SDL_uikit_main.c */; };
FA1DC2721C62BE65008F99A0 /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
FA1DC2731C62BE65008F99A0 /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
FA24348D21D4201400B8918A /* SDL_metal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA24348C21D4201400B8918A /* SDL_metal.h */; };
FAB5981D1BB5C31500BE72C5 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
FAB5981E1BB5C31500BE72C5 /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
FAB5981F1BB5C31500BE72C5 /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */; };
@ -951,6 +998,10 @@
55FFA9192122302B00D7CBED /* SDL_syspower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syspower.h; sourceTree = "<group>"; };
566726431DF72CF5001DD3DB /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dataqueue.c; sourceTree = "<group>"; };
566726441DF72CF5001DD3DB /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; };
566E26ED2462770300718109 /* SDL_locale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_locale.h; sourceTree = "<group>"; };
566E26F42462774E00718109 /* SDL_syslocale.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SDL_syslocale.h; path = locale/SDL_syslocale.h; sourceTree = "<group>"; };
566E26F62462774E00718109 /* SDL_syslocale.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_syslocale.m; sourceTree = "<group>"; };
566E26F72462774E00718109 /* SDL_locale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = SDL_locale.c; path = locale/SDL_locale.c; sourceTree = "<group>"; };
56A6702D18565E450007D20F /* SDL_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_internal.h; sourceTree = "<group>"; };
56A6703118565E760007D20F /* SDL_dynapi_overrides.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_overrides.h; sourceTree = "<group>"; };
56A6703218565E760007D20F /* SDL_dynapi_procs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dynapi_procs.h; sourceTree = "<group>"; };
@ -962,11 +1013,19 @@
56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_coreaudio.h; sourceTree = "<group>"; };
56ED04E0118A8EE200A56AA6 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_power.c; sourceTree = "<group>"; };
56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_syspower.m; sourceTree = "<group>"; };
63CC93C623849391002A5C54 /* SDL_strtokr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_strtokr.c; sourceTree = "<group>"; };
75BB5C64241EA8C300D75403 /* SDL_virtualjoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_virtualjoystick.c; sourceTree = "<group>"; };
75BB5C65241EA8C300D75403 /* SDL_virtualjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_virtualjoystick_c.h; sourceTree = "<group>"; };
93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitviewcontroller.h; sourceTree = "<group>"; };
93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitviewcontroller.m; sourceTree = "<group>"; };
A704172D20F7E74800A82227 /* controller_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_type.h; sourceTree = "<group>"; };
A704173020F7F39400A82227 /* SDL_hidapi_steam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steam.c; sourceTree = "<group>"; };
A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_rumble.c; sourceTree = "<group>"; };
A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_rumble.h; sourceTree = "<group>"; };
A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_displayevents_c.h; sourceTree = "<group>"; };
A7C19D28212E552B00DF2152 /* SDL_displayevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_displayevents.c; sourceTree = "<group>"; };
A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_gamecube.c; sourceTree = "<group>"; };
A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xbox360w.c; sourceTree = "<group>"; };
AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gamecontroller.c; sourceTree = "<group>"; };
AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; };
AA0F8494178D5F1A00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = "<group>"; };
@ -1064,6 +1123,8 @@
F3E3C75F224138AE007D243C /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitclipboard.h; sourceTree = "<group>"; };
FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitclipboard.m; sourceTree = "<group>"; };
FA20874D2307894C0029758C /* SDL_shaders_metal_tvos.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_tvos.h; sourceTree = "<group>"; };
FA24348C21D4201400B8918A /* SDL_metal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_metal.h; sourceTree = "<group>"; };
FAB598141BB5C1B100BE72C5 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
FAD4F7011BA3C4E8008346CE /* SDL_sysjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysjoystick_c.h; sourceTree = "<group>"; };
FD0BBFEF0E3933DD00D833B1 /* SDL_uikitview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitview.h; sourceTree = "<group>"; };
@ -1343,6 +1404,25 @@
name = Frameworks;
sourceTree = "<group>";
};
566E26F32462773A00718109 /* locale */ = {
isa = PBXGroup;
children = (
566E26F52462774E00718109 /* macosx */,
566E26F72462774E00718109 /* SDL_locale.c */,
566E26F42462774E00718109 /* SDL_syslocale.h */,
);
name = locale;
sourceTree = "<group>";
};
566E26F52462774E00718109 /* macosx */ = {
isa = PBXGroup;
children = (
566E26F62462774E00718109 /* SDL_syslocale.m */,
);
name = macosx;
path = locale/macosx;
sourceTree = "<group>";
};
56A6702F18565E4F0007D20F /* dynapi */ = {
isa = PBXGroup;
children = (
@ -1389,6 +1469,15 @@
path = uikit;
sourceTree = "<group>";
};
75BB5C63241EA8C300D75403 /* virtual */ = {
isa = PBXGroup;
children = (
75BB5C64241EA8C300D75403 /* SDL_virtualjoystick.c */,
75BB5C65241EA8C300D75403 /* SDL_virtualjoystick_c.h */,
);
path = virtual;
sourceTree = "<group>";
};
AA13B3521FB8B41700D9FEE6 /* yuv2rgb */ = {
isa = PBXGroup;
children = (
@ -1405,6 +1494,7 @@
children = (
AADC5A621FDA10C800960936 /* SDL_render_metal.m */,
AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */,
FA20874D2307894C0029758C /* SDL_shaders_metal_tvos.h */,
);
path = metal;
sourceTree = "<group>";
@ -1458,9 +1548,14 @@
F3BDD78A20F51C8D004ECBF3 /* hidapi */ = {
isa = PBXGroup;
children = (
A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */,
F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */,
A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */,
A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */,
A704173020F7F39400A82227 /* SDL_hidapi_steam.c */,
F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */,
F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */,
A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */,
F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */,
F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */,
F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */,
@ -1487,6 +1582,7 @@
FD3F4A6F0DEA620800C5B771 /* stdlib */ = {
isa = PBXGroup;
children = (
63CC93C623849391002A5C54 /* SDL_strtokr.c */,
FD3F4A700DEA620800C5B771 /* SDL_getenv.c */,
FD3F4A710DEA620800C5B771 /* SDL_iconv.c */,
FD3F4A720DEA620800C5B771 /* SDL_malloc.c */,
@ -1502,6 +1598,7 @@
children = (
F3BDD78A20F51C8D004ECBF3 /* hidapi */,
FD689EFF0E26E5B600F90B21 /* iphoneos */,
75BB5C63241EA8C300D75403 /* virtual */,
A704172D20F7E74800A82227 /* controller_type.h */,
AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */,
FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */,
@ -1576,15 +1673,14 @@
children = (
AA7558651595D55500BBD41B /* begin_code.h */,
AA7558661595D55500BBD41B /* close_code.h */,
AA7558971595D55500BBD41B /* SDL.h */,
AA7558671595D55500BBD41B /* SDL_assert.h */,
AA7558681595D55500BBD41B /* SDL_atomic.h */,
AA7558691595D55500BBD41B /* SDL_audio.h */,
AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */,
AA75586A1595D55500BBD41B /* SDL_blendmode.h */,
AA75586B1595D55500BBD41B /* SDL_clipboard.h */,
AA75586D1595D55500BBD41B /* SDL_config.h */,
AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */,
AA75586D1595D55500BBD41B /* SDL_config.h */,
AA75586E1595D55500BBD41B /* SDL_copying.h */,
AA75586F1595D55500BBD41B /* SDL_cpuinfo.h */,
AA7558701595D55500BBD41B /* SDL_endian.h */,
@ -1599,9 +1695,11 @@
AA7558781595D55500BBD41B /* SDL_keyboard.h */,
AA7558791595D55500BBD41B /* SDL_keycode.h */,
AA75587A1595D55500BBD41B /* SDL_loadso.h */,
566E26ED2462770300718109 /* SDL_locale.h */,
AA75587B1595D55500BBD41B /* SDL_log.h */,
AA75587C1595D55500BBD41B /* SDL_main.h */,
AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */,
FA24348C21D4201400B8918A /* SDL_metal.h */,
AA75587D1595D55500BBD41B /* SDL_mouse.h */,
AA75587E1595D55500BBD41B /* SDL_mutex.h */,
AA75587F1595D55500BBD41B /* SDL_name.h */,
@ -1630,6 +1728,7 @@
AA7558951595D55500BBD41B /* SDL_version.h */,
AA7558961595D55500BBD41B /* SDL_video.h */,
4D7516FE1EE1C5B400820EEA /* SDL_vulkan.h */,
AA7558971595D55500BBD41B /* SDL.h */,
);
name = "Public Headers";
path = ../../include;
@ -1649,6 +1748,7 @@
F35CEA6E20F51B7F003ECE98 /* hidapi */,
FD5F9D080E0E08B3008E885B /* joystick */,
FD8BD8150E27E25900B52CD5 /* loadso */,
566E26F32462773A00718109 /* locale */,
F3E3C65322406963007D243C /* main */,
56ED04DE118A8E9A00A56AA6 /* power */,
041B2CE312FA0F680087D585 /* render */,
@ -1909,9 +2009,11 @@
52ED1DA2222889500061FCE0 /* SDL_audio.h in Headers */,
52ED1DA3222889500061FCE0 /* SDL_syspower.h in Headers */,
52ED1DA4222889500061FCE0 /* SDL_blendmode.h in Headers */,
566E26F92462774E00718109 /* SDL_syslocale.h in Headers */,
52ED1DA5222889500061FCE0 /* SDL_sensor_c.h in Headers */,
52ED1DA6222889500061FCE0 /* SDL_clipboard.h in Headers */,
52ED1DA7222889500061FCE0 /* SDL_config_iphoneos.h in Headers */,
566E26EF2462770300718109 /* SDL_locale.h in Headers */,
52ED1DA8222889500061FCE0 /* SDL_config.h in Headers */,
52ED1DA9222889500061FCE0 /* SDL_copying.h in Headers */,
52ED1DAA222889500061FCE0 /* SDL_egl_c.h in Headers */,
@ -1945,6 +2047,7 @@
52ED1DC6222889500061FCE0 /* SDL_pixels.h in Headers */,
52ED1DC7222889500061FCE0 /* SDL_platform.h in Headers */,
52ED1DC8222889500061FCE0 /* SDL_power.h in Headers */,
75BB5C6B241EA8C300D75403 /* SDL_virtualjoystick_c.h in Headers */,
52ED1DC9222889500061FCE0 /* SDL_quit.h in Headers */,
52ED1DCA222889500061FCE0 /* SDL_rect.h in Headers */,
52ED1DCB222889500061FCE0 /* SDL_render.h in Headers */,
@ -1960,6 +2063,7 @@
52ED1DD5222889500061FCE0 /* SDL_syswm.h in Headers */,
52ED1DD6222889500061FCE0 /* SDL_thread.h in Headers */,
52ED1DD7222889500061FCE0 /* SDL_timer.h in Headers */,
A75FDBDE23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
52ED1DD8222889500061FCE0 /* SDL_touch.h in Headers */,
52ED1DD9222889500061FCE0 /* SDL_types.h in Headers */,
52ED1DDA222889500061FCE0 /* SDL_version.h in Headers */,
@ -1982,6 +2086,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
566E26F12462770300718109 /* SDL_locale.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2045,9 +2150,11 @@
F3E3C6902241389A007D243C /* SDL_audio.h in Headers */,
F3E3C6912241389A007D243C /* SDL_syspower.h in Headers */,
F3E3C6922241389A007D243C /* SDL_blendmode.h in Headers */,
566E26FA2462774E00718109 /* SDL_syslocale.h in Headers */,
F3E3C6932241389A007D243C /* SDL_sensor_c.h in Headers */,
F3E3C6942241389A007D243C /* SDL_clipboard.h in Headers */,
F3E3C6952241389A007D243C /* SDL_config_iphoneos.h in Headers */,
566E26F02462770300718109 /* SDL_locale.h in Headers */,
F3E3C6962241389A007D243C /* SDL_config.h in Headers */,
F3E3C6972241389A007D243C /* SDL_copying.h in Headers */,
F3E3C6982241389A007D243C /* SDL_egl_c.h in Headers */,
@ -2081,6 +2188,7 @@
F3E3C6B42241389A007D243C /* SDL_pixels.h in Headers */,
F3E3C6B52241389A007D243C /* SDL_platform.h in Headers */,
F3E3C6B62241389A007D243C /* SDL_power.h in Headers */,
75BB5C6C241EA8C300D75403 /* SDL_virtualjoystick_c.h in Headers */,
F3E3C6B72241389A007D243C /* SDL_quit.h in Headers */,
F3E3C6B82241389A007D243C /* SDL_rect.h in Headers */,
F3E3C6B92241389A007D243C /* SDL_render.h in Headers */,
@ -2096,6 +2204,7 @@
F3E3C6C32241389A007D243C /* SDL_syswm.h in Headers */,
F3E3C6C42241389A007D243C /* SDL_thread.h in Headers */,
F3E3C6C52241389A007D243C /* SDL_timer.h in Headers */,
A75FDBDF23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
F3E3C6C62241389A007D243C /* SDL_touch.h in Headers */,
F3E3C6C72241389A007D243C /* SDL_types.h in Headers */,
F3E3C6C82241389A007D243C /* SDL_version.h in Headers */,
@ -2118,6 +2227,7 @@
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
566E26F22462770300718109 /* SDL_locale.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2157,6 +2267,7 @@
04BA9D6511EF474A00B60E01 /* SDL_touch_c.h in Headers */,
041B2CF212FA0F680087D585 /* SDL_sysrender.h in Headers */,
04409BA812FA989600FB9AA8 /* SDL_yuv_sw_c.h in Headers */,
75BB5C6A241EA8C300D75403 /* SDL_virtualjoystick_c.h in Headers */,
AA13B3591FB8B46400D9FEE6 /* yuv_rgb.h in Headers */,
04F7807712FB751400FC43C0 /* SDL_blendfillrect.h in Headers */,
04F7807912FB751400FC43C0 /* SDL_blendline.h in Headers */,
@ -2183,6 +2294,7 @@
AA75589D1595D55500BBD41B /* SDL_blendmode.h in Headers */,
F30D9C9E212CD0990047DF2E /* SDL_sensor_c.h in Headers */,
AA75589E1595D55500BBD41B /* SDL_clipboard.h in Headers */,
FA24348D21D4201400B8918A /* SDL_metal.h in Headers */,
AA75589F1595D55500BBD41B /* SDL_config_iphoneos.h in Headers */,
AA7558A01595D55500BBD41B /* SDL_config.h in Headers */,
AA7558A11595D55500BBD41B /* SDL_copying.h in Headers */,
@ -2195,6 +2307,7 @@
AA7558A61595D55500BBD41B /* SDL_gesture.h in Headers */,
AA7558A71595D55500BBD41B /* SDL_haptic.h in Headers */,
AA7558A81595D55500BBD41B /* SDL_hints.h in Headers */,
566E26F82462774E00718109 /* SDL_syslocale.h in Headers */,
566726461DF72CF5001DD3DB /* SDL_dataqueue.h in Headers */,
F30D9C9F212CD0990047DF2E /* SDL_syssensor.h in Headers */,
AA7558AA1595D55500BBD41B /* SDL_joystick.h in Headers */,
@ -2225,6 +2338,7 @@
AA7558BE1595D55500BBD41B /* SDL_scancode.h in Headers */,
AA7558BF1595D55500BBD41B /* SDL_shape.h in Headers */,
AA7558C01595D55500BBD41B /* SDL_stdinc.h in Headers */,
566E26EE2462770300718109 /* SDL_locale.h in Headers */,
FAD4F7021BA3C4E8008346CE /* SDL_sysjoystick_c.h in Headers */,
AA7558C11595D55500BBD41B /* SDL_surface.h in Headers */,
AA7558C21595D55500BBD41B /* SDL_system.h in Headers */,
@ -2232,6 +2346,7 @@
AA7558C31595D55500BBD41B /* SDL_syswm.h in Headers */,
AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */,
AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */,
A75FDBDD23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
AA7558C61595D55500BBD41B /* SDL_touch.h in Headers */,
AA7558C71595D55500BBD41B /* SDL_types.h in Headers */,
AA7558C81595D55500BBD41B /* SDL_version.h in Headers */,
@ -2467,11 +2582,13 @@
52ED1DF7222889500061FCE0 /* SDL_dynapi.c in Sources */,
52ED1DF8222889500061FCE0 /* SDL_mouse.c in Sources */,
52ED1DF9222889500061FCE0 /* SDL_quit.c in Sources */,
75BB5C67241EA8C300D75403 /* SDL_virtualjoystick.c in Sources */,
52ED1DFA222889500061FCE0 /* SDL_windowevents.c in Sources */,
52ED1DFB222889500061FCE0 /* SDL_uikitmetalview.m in Sources */,
52ED1DFC222889500061FCE0 /* SDL_rwops.c in Sources */,
52ED1DFD222889500061FCE0 /* hid.m in Sources */,
52ED1DFE222889500061FCE0 /* SDL_vulkan_utils.c in Sources */,
566E27042462774E00718109 /* SDL_locale.c in Sources */,
52ED1DFF222889500061FCE0 /* SDL_error.c in Sources */,
52ED1E00222889500061FCE0 /* SDL.c in Sources */,
52ED1E01222889500061FCE0 /* SDL_syscond.c in Sources */,
@ -2483,12 +2600,15 @@
52ED1E07222889500061FCE0 /* SDL_getenv.c in Sources */,
52ED1E08222889500061FCE0 /* SDL_iconv.c in Sources */,
52ED1E09222889500061FCE0 /* SDL_malloc.c in Sources */,
566E26FE2462774E00718109 /* SDL_syslocale.m in Sources */,
A7FF6B6323AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
52ED1E0A222889500061FCE0 /* SDL_hidapi_xbox360.c in Sources */,
52ED1E0B222889500061FCE0 /* SDL_qsort.c in Sources */,
52ED1E0C222889500061FCE0 /* SDL_hidapi_ps4.c in Sources */,
52ED1E0D222889500061FCE0 /* SDL_stdlib.c in Sources */,
52ED1E0E222889500061FCE0 /* SDL_blit.c in Sources */,
52ED1E0F222889500061FCE0 /* SDL_blit_0.c in Sources */,
A75FDAB723E288E400529352 /* SDL_hidapi_steam.c in Sources */,
52ED1E10222889500061FCE0 /* SDL_yuv.c in Sources */,
52ED1E11222889500061FCE0 /* SDL_blit_1.c in Sources */,
52ED1E12222889500061FCE0 /* SDL_dataqueue.c in Sources */,
@ -2504,6 +2624,7 @@
52ED1E1C222889500061FCE0 /* SDL_stretch.c in Sources */,
52ED1E1D222889500061FCE0 /* SDL_egl.c in Sources */,
52ED1E1E222889500061FCE0 /* SDL_surface.c in Sources */,
A75FDBDA23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
52ED1E1F222889500061FCE0 /* SDL_video.c in Sources */,
52ED1E20222889500061FCE0 /* SDL_nullevents.c in Sources */,
52ED1E21222889500061FCE0 /* SDL_nullvideo.c in Sources */,
@ -2547,6 +2668,7 @@
52ED1E47222889500061FCE0 /* SDL_render_gles.c in Sources */,
52ED1E48222889500061FCE0 /* SDL_hints.c in Sources */,
52ED1E49222889500061FCE0 /* SDL_shape.c in Sources */,
A7FF6B6823AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
52ED1E4A222889500061FCE0 /* SDL_render_gles2.c in Sources */,
52ED1E4B222889500061FCE0 /* SDL_dummysensor.c in Sources */,
52ED1E4C222889500061FCE0 /* SDL_shaders_gles2.c in Sources */,
@ -2562,6 +2684,7 @@
52ED1E56222889500061FCE0 /* SDL_gamecontroller.c in Sources */,
52ED1E57222889500061FCE0 /* SDL_systls.c in Sources */,
52ED1E58222889500061FCE0 /* SDL_sysfilesystem.m in Sources */,
63CC93C823849391002A5C54 /* SDL_strtokr.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2595,11 +2718,13 @@
F3E3C6E52241389A007D243C /* SDL_dynapi.c in Sources */,
F3E3C6E62241389A007D243C /* SDL_mouse.c in Sources */,
F3E3C6E72241389A007D243C /* SDL_quit.c in Sources */,
75BB5C69241EA8C300D75403 /* SDL_virtualjoystick.c in Sources */,
F3E3C6E82241389A007D243C /* SDL_windowevents.c in Sources */,
F3E3C6E92241389A007D243C /* SDL_uikitmetalview.m in Sources */,
F3E3C6EA2241389A007D243C /* SDL_rwops.c in Sources */,
F3E3C6EB2241389A007D243C /* hid.m in Sources */,
F3E3C6EC2241389A007D243C /* SDL_vulkan_utils.c in Sources */,
566E27062462774E00718109 /* SDL_locale.c in Sources */,
F3E3C6ED2241389A007D243C /* SDL_error.c in Sources */,
F3E3C6EE2241389A007D243C /* SDL.c in Sources */,
F3E3C6EF2241389A007D243C /* SDL_syscond.c in Sources */,
@ -2611,12 +2736,15 @@
F3E3C6F52241389A007D243C /* SDL_getenv.c in Sources */,
F3E3C6F62241389A007D243C /* SDL_iconv.c in Sources */,
F3E3C6F72241389A007D243C /* SDL_malloc.c in Sources */,
566E27002462774E00718109 /* SDL_syslocale.m in Sources */,
A7FF6B6523AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
F3E3C6F82241389A007D243C /* SDL_hidapi_xbox360.c in Sources */,
F3E3C6F92241389A007D243C /* SDL_qsort.c in Sources */,
F3E3C6FA2241389A007D243C /* SDL_hidapi_ps4.c in Sources */,
F3E3C6FB2241389A007D243C /* SDL_stdlib.c in Sources */,
F3E3C6FC2241389A007D243C /* SDL_blit.c in Sources */,
F3E3C6FD2241389A007D243C /* SDL_blit_0.c in Sources */,
A75FDAB823E2890000529352 /* SDL_hidapi_steam.c in Sources */,
F3E3C6FE2241389A007D243C /* SDL_yuv.c in Sources */,
F3E3C6FF2241389A007D243C /* SDL_blit_1.c in Sources */,
F3E3C7002241389A007D243C /* SDL_dataqueue.c in Sources */,
@ -2632,6 +2760,7 @@
F3E3C70A2241389A007D243C /* SDL_stretch.c in Sources */,
F3E3C70B2241389A007D243C /* SDL_egl.c in Sources */,
F3E3C70C2241389A007D243C /* SDL_surface.c in Sources */,
A75FDBDC23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
F3E3C70D2241389A007D243C /* SDL_video.c in Sources */,
F3E3C70E2241389A007D243C /* SDL_nullevents.c in Sources */,
F3E3C70F2241389A007D243C /* SDL_nullvideo.c in Sources */,
@ -2675,6 +2804,7 @@
F3E3C7362241389A007D243C /* SDL_render_gles.c in Sources */,
F3E3C7372241389A007D243C /* SDL_hints.c in Sources */,
F3E3C7382241389A007D243C /* SDL_shape.c in Sources */,
A7FF6B6A23AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
F3E3C7392241389A007D243C /* SDL_render_gles2.c in Sources */,
F3E3C73A2241389A007D243C /* SDL_dummysensor.c in Sources */,
F3E3C73B2241389A007D243C /* SDL_shaders_gles2.c in Sources */,
@ -2690,6 +2820,7 @@
F3E3C7452241389A007D243C /* SDL_gamecontroller.c in Sources */,
F3E3C7462241389A007D243C /* SDL_systls.c in Sources */,
F3E3C7472241389A007D243C /* SDL_sysfilesystem.m in Sources */,
63CC93CA23849391002A5C54 /* SDL_strtokr.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2736,6 +2867,7 @@
FAB5984B1BB5C31600BE72C5 /* SDL_sysfilesystem.m in Sources */,
AADC5A5D1FDA104400960936 /* yuv_rgb.c in Sources */,
FAB5984C1BB5C31600BE72C5 /* SDL_syshaptic.c in Sources */,
A75FDBDB23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
AADC5A5F1FDA105600960936 /* SDL_vulkan_utils.c in Sources */,
AADC5A5E1FDA105300960936 /* SDL_yuv.c in Sources */,
FAB5984D1BB5C31600BE72C5 /* SDL_haptic.c in Sources */,
@ -2744,6 +2876,7 @@
FAB598521BB5C31600BE72C5 /* SDL_joystick.c in Sources */,
FAB598551BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */,
AADC5A651FDA10CB00960936 /* SDL_render_metal.m in Sources */,
A7FF6B6923AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
FAB598561BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */,
FAB598571BB5C31600BE72C5 /* SDL_power.c in Sources */,
F30D9CA1212CD0990047DF2E /* SDL_sensor.c in Sources */,
@ -2763,16 +2896,20 @@
FAB5986D1BB5C31600BE72C5 /* SDL_render.c in Sources */,
FAB598711BB5C31600BE72C5 /* SDL_yuv_sw.c in Sources */,
FAB598721BB5C31600BE72C5 /* SDL_getenv.c in Sources */,
75BB5C68241EA8C300D75403 /* SDL_virtualjoystick.c in Sources */,
FAB598731BB5C31600BE72C5 /* SDL_iconv.c in Sources */,
FAB598741BB5C31600BE72C5 /* SDL_malloc.c in Sources */,
FAB598751BB5C31600BE72C5 /* SDL_qsort.c in Sources */,
566E27052462774E00718109 /* SDL_locale.c in Sources */,
F36839CE214790950000F255 /* SDL_dummysensor.c in Sources */,
566E26FF2462774E00718109 /* SDL_syslocale.m in Sources */,
A7C19D2B212E552C00DF2152 /* SDL_displayevents.c in Sources */,
FAB598761BB5C31600BE72C5 /* SDL_stdlib.c in Sources */,
FAB598771BB5C31600BE72C5 /* SDL_string.c in Sources */,
FAB598781BB5C31600BE72C5 /* SDL_syscond.c in Sources */,
F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */,
AADC5A601FDA10A400960936 /* SDL_uikitvulkan.m in Sources */,
A7FF6B6423AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
FAB598791BB5C31600BE72C5 /* SDL_sysmutex.c in Sources */,
FAB5987B1BB5C31600BE72C5 /* SDL_syssem.c in Sources */,
FAB5987C1BB5C31600BE72C5 /* SDL_systhread.c in Sources */,
@ -2791,6 +2928,7 @@
FAB598951BB5C31600BE72C5 /* SDL_uikitview.m in Sources */,
FAB598971BB5C31600BE72C5 /* SDL_uikitviewcontroller.m in Sources */,
FAB598991BB5C31600BE72C5 /* SDL_uikitwindow.m in Sources */,
A704173220F7F39900A82227 /* SDL_hidapi_steam.c in Sources */,
FAB5989A1BB5C31600BE72C5 /* SDL_nullevents.c in Sources */,
FAB5989D1BB5C31600BE72C5 /* SDL_nullframebuffer.c in Sources */,
FAB5989E1BB5C31600BE72C5 /* SDL_nullvideo.c in Sources */,
@ -2816,6 +2954,7 @@
FAB598BD1BB5C31600BE72C5 /* SDL_hints.c in Sources */,
FAB598BE1BB5C31600BE72C5 /* SDL_log.c in Sources */,
FAB598BF1BB5C31600BE72C5 /* SDL.c in Sources */,
63CC93C923849391002A5C54 /* SDL_strtokr.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@ -2841,11 +2980,13 @@
56A6703718565E760007D20F /* SDL_dynapi.c in Sources */,
FD6526730DE8FCDD002AD96B /* SDL_mouse.c in Sources */,
FD6526740DE8FCDD002AD96B /* SDL_quit.c in Sources */,
75BB5C66241EA8C300D75403 /* SDL_virtualjoystick.c in Sources */,
FD6526750DE8FCDD002AD96B /* SDL_windowevents.c in Sources */,
4D7516FB1EE1C28A00820EEA /* SDL_uikitmetalview.m in Sources */,
FD6526760DE8FCDD002AD96B /* SDL_rwops.c in Sources */,
F30D9CC6212CE92C0047DF2E /* hid.m in Sources */,
4D7517201EE1D98200820EEA /* SDL_vulkan_utils.c in Sources */,
566E27032462774E00718109 /* SDL_locale.c in Sources */,
FD6526780DE8FCDD002AD96B /* SDL_error.c in Sources */,
FD65267A0DE8FCDD002AD96B /* SDL.c in Sources */,
FD65267B0DE8FCDD002AD96B /* SDL_syscond.c in Sources */,
@ -2857,6 +2998,8 @@
FD3F4A760DEA620800C5B771 /* SDL_getenv.c in Sources */,
FD3F4A770DEA620800C5B771 /* SDL_iconv.c in Sources */,
FD3F4A780DEA620800C5B771 /* SDL_malloc.c in Sources */,
566E26FD2462774E00718109 /* SDL_syslocale.m in Sources */,
A7FF6B6223AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
F3BDD79220F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */,
FD3F4A790DEA620800C5B771 /* SDL_qsort.c in Sources */,
F3BDD79820F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */,
@ -2868,6 +3011,7 @@
566726451DF72CF5001DD3DB /* SDL_dataqueue.c in Sources */,
FDA684510DF2374E00F98A1A /* SDL_blit_A.c in Sources */,
FDA684520DF2374E00F98A1A /* SDL_blit_auto.c in Sources */,
A704173120F7F39900A82227 /* SDL_hidapi_steam.c in Sources */,
FDA684540DF2374E00F98A1A /* SDL_blit_copy.c in Sources */,
FDA684560DF2374E00F98A1A /* SDL_blit_N.c in Sources */,
FDA684570DF2374E00F98A1A /* SDL_blit_slow.c in Sources */,
@ -2878,6 +3022,7 @@
FDA684640DF2374E00F98A1A /* SDL_stretch.c in Sources */,
AA13B34D1FB8B27800D9FEE6 /* SDL_egl.c in Sources */,
FDA684660DF2374E00F98A1A /* SDL_surface.c in Sources */,
A75FDBD923EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
FDA684680DF2374E00F98A1A /* SDL_video.c in Sources */,
FDA685FB0DF244C800F98A1A /* SDL_nullevents.c in Sources */,
FDA685FF0DF244C800F98A1A /* SDL_nullvideo.c in Sources */,
@ -2921,6 +3066,7 @@
0442EC5312FE1C28004C9285 /* SDL_render_gles.c in Sources */,
0442EC5512FE1C3F004C9285 /* SDL_hints.c in Sources */,
AA13B34A1FB8B27800D9FEE6 /* SDL_shape.c in Sources */,
A7FF6B6723AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */,
F36839CD214790950000F255 /* SDL_dummysensor.c in Sources */,
0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */,
@ -2936,6 +3082,7 @@
AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */,
AA0F8495178D5F1A00823F9D /* SDL_systls.c in Sources */,
56C181E217C44D7A00406AE3 /* SDL_sysfilesystem.m in Sources */,
63CC93C723849391002A5C54 /* SDL_strtokr.c in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

+ 4
- 0
modules/SDL2/Xcode-iOS/Test/Info.plist View File

@ -18,9 +18,13 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
</dict>
</plist>

+ 60
- 56
modules/SDL2/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj View File

@ -36,6 +36,34 @@
56ED0508118A8FE400A56AA6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
56ED0509118A8FE400A56AA6 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
56ED0511118A904200A56AA6 /* testpower.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED0510118A904200A56AA6 /* testpower.c */; };
75E09192241EACB9004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E09193241EACBE004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E09194241EACC3004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E09196241EACC9004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09195241EACC9004729E1 /* CoreBluetooth.framework */; };
75E09197241EACD3004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E09198241EACD9004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E09199241EACDF004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E0919A241EACE5004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E0919B241EACEA004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E0919C241EACF0004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09195241EACC9004729E1 /* CoreBluetooth.framework */; };
75E0919D241EACF7004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E0919E241EAD14004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E0919F241EAD19004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A0241EAD21004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A1241EAD26004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A2241EAD2B004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A3241EAD31004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A4241EAD35004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A5241EAD3B004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A6241EAD3F004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A7241EAD45004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A8241EAD4A004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091A9241EAD4F004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091AA241EAD55004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091AB241EAD5B004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091AC241EAD61004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091AD241EAD65004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
75E091AE241EAD6B004729E1 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 75E09187241EACB9004729E1 /* CoreBluetooth.framework */; };
AA13B3171FB8AEBC00D9FEE6 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
AA13B3181FB8AEBC00D9FEE6 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
AA13B3191FB8AEBC00D9FEE6 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
@ -475,6 +503,8 @@
1D6058910D05DD3D006BFB54 /* testwm2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testwm2.app; sourceTree = BUILT_PRODUCTS_DIR; };
56ED050D118A8FE400A56AA6 /* testpower.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testpower.app; sourceTree = BUILT_PRODUCTS_DIR; };
56ED0510118A904200A56AA6 /* testpower.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testpower.c; sourceTree = "<group>"; };
75E09187241EACB9004729E1 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; };
75E09195241EACC9004729E1 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS13.2.sdk/System/Library/Frameworks/CoreBluetooth.framework; sourceTree = DEVELOPER_DIR; };
AA13B3261FB8AEBC00D9FEE6 /* testyuv.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testyuv.app; sourceTree = BUILT_PRODUCTS_DIR; };
AA13B32E1FB8AF0C00D9FEE6 /* testyuv.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = testyuv.bmp; sourceTree = "<group>"; };
AA13B35B1FB8B4D600D9FEE6 /* testyuv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testyuv.c; sourceTree = "<group>"; };
@ -559,6 +589,7 @@
046CEF7B13254F23007AD51D /* libSDL2.a in Frameworks */,
046CEF7C13254F23007AD51D /* AudioToolbox.framework in Frameworks */,
FABA34B51D8B5B8400915323 /* AVFoundation.framework in Frameworks */,
75E0919D241EACF7004729E1 /* CoreBluetooth.framework in Frameworks */,
046CEF8213254F23007AD51D /* CoreAudio.framework in Frameworks */,
046CEF7F13254F23007AD51D /* CoreGraphics.framework in Frameworks */,
FA8B4BD1196766C900F8EB7C /* CoreMotion.framework in Frameworks */,
@ -579,6 +610,7 @@
047A63E213285C3200CD7973 /* libSDL2.a in Frameworks */,
047A63E313285C3200CD7973 /* AudioToolbox.framework in Frameworks */,
FABA34B01D8B5B6400915323 /* AVFoundation.framework in Frameworks */,
75E09192241EACB9004729E1 /* CoreBluetooth.framework in Frameworks */,
047A63E913285C3200CD7973 /* CoreAudio.framework in Frameworks */,
047A63E613285C3200CD7973 /* CoreGraphics.framework in Frameworks */,
FA8B4BAD1967076F00F8EB7C /* CoreMotion.framework in Frameworks */,
@ -599,6 +631,7 @@
FDBDE5810E313465006BAC0B /* libSDL2.a in Frameworks */,
FDA8A89F0E2D111A00EA573E /* AudioToolbox.framework in Frameworks */,
FABA34C41D8B5BCB00915323 /* AVFoundation.framework in Frameworks */,
75E091AC241EAD61004729E1 /* CoreBluetooth.framework in Frameworks */,
FDA8A8A50E2D111A00EA573E /* CoreAudio.framework in Frameworks */,
FDA8A8A20E2D111A00EA573E /* CoreGraphics.framework in Frameworks */,
FA8B4BE0196766F400F8EB7C /* CoreMotion.framework in Frameworks */,
@ -618,6 +651,7 @@
56ED0502118A8FE400A56AA6 /* libSDL2.a in Frameworks */,
56ED0503118A8FE400A56AA6 /* AudioToolbox.framework in Frameworks */,
FABA34BC1D8B5BA600915323 /* AVFoundation.framework in Frameworks */,
75E091A4241EAD35004729E1 /* CoreBluetooth.framework in Frameworks */,
56ED0509118A8FE400A56AA6 /* CoreAudio.framework in Frameworks */,
56ED0506118A8FE400A56AA6 /* CoreGraphics.framework in Frameworks */,
FA8B4BD8196766DD00F8EB7C /* CoreMotion.framework in Frameworks */,
@ -638,6 +672,7 @@
AA13B3191FB8AEBC00D9FEE6 /* libSDL2.a in Frameworks */,
AA13B31C1FB8AEBC00D9FEE6 /* AudioToolbox.framework in Frameworks */,
AA13B3171FB8AEBC00D9FEE6 /* AVFoundation.framework in Frameworks */,
75E091AD241EAD65004729E1 /* CoreBluetooth.framework in Frameworks */,
AA13B3221FB8AEBC00D9FEE6 /* CoreAudio.framework in Frameworks */,
AA13B31F1FB8AEBC00D9FEE6 /* CoreGraphics.framework in Frameworks */,
AA13B31B1FB8AEBC00D9FEE6 /* CoreMotion.framework in Frameworks */,
@ -658,6 +693,7 @@
AAE7DEE114CBB1E100DF1A0E /* libSDL2.a in Frameworks */,
AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */,
FABA34BE1D8B5BB000915323 /* AVFoundation.framework in Frameworks */,
75E091A6241EAD3F004729E1 /* CoreBluetooth.framework in Frameworks */,
AAE7DEE814CBB1E100DF1A0E /* CoreAudio.framework in Frameworks */,
AAE7DEE514CBB1E100DF1A0E /* CoreGraphics.framework in Frameworks */,
FA8B4BDA196766E200F8EB7C /* CoreMotion.framework in Frameworks */,
@ -678,6 +714,7 @@
AAE7DFA614CBB54E00DF1A0E /* libSDL2.a in Frameworks */,
AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */,
FABA34BD1D8B5BAB00915323 /* AVFoundation.framework in Frameworks */,
75E091A5241EAD3B004729E1 /* CoreBluetooth.framework in Frameworks */,
AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */,
AAE7DFAA14CBB54E00DF1A0E /* CoreGraphics.framework in Frameworks */,
FA8B4BD9196766E000F8EB7C /* CoreMotion.framework in Frameworks */,
@ -702,6 +739,7 @@
FA3D99481BC4E6AD002C96C8 /* GameController.framework in Frameworks */,
FA3D994B1BC4E6AD002C96C8 /* QuartzCore.framework in Frameworks */,
FA3D994C1BC4E6AD002C96C8 /* OpenGLES.framework in Frameworks */,
75E0919C241EACF0004729E1 /* CoreBluetooth.framework in Frameworks */,
FA3D994E1BC4E6AD002C96C8 /* UIKit.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
@ -713,6 +751,7 @@
FABA34841D8B575200915323 /* libSDL2.a in Frameworks */,
FABA34871D8B575200915323 /* AudioToolbox.framework in Frameworks */,
FABA34831D8B575200915323 /* AVFoundation.framework in Frameworks */,
75E09193241EACBE004729E1 /* CoreBluetooth.framework in Frameworks */,
FABA348D1D8B575200915323 /* CoreAudio.framework in Frameworks */,
FABA348A1D8B575200915323 /* CoreGraphics.framework in Frameworks */,
FABA34861D8B575200915323 /* CoreMotion.framework in Frameworks */,
@ -729,6 +768,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
75E09196241EACC9004729E1 /* CoreBluetooth.framework in Frameworks */,
F3F758D922AC596E001D97F2 /* libSDL2.a in Frameworks */,
FABA34A01D8B582100915323 /* AudioToolbox.framework in Frameworks */,
FABA349C1D8B582100915323 /* AVFoundation.framework in Frameworks */,
@ -749,6 +789,7 @@
FAE0E9861BAF9B230098DFA4 /* libSDL2.a in Frameworks */,
FAE0E9891BAF9B230098DFA4 /* AudioToolbox.framework in Frameworks */,
FABA34AE1D8B58B200915323 /* AVFoundation.framework in Frameworks */,
75E0919B241EACEA004729E1 /* CoreBluetooth.framework in Frameworks */,
FAE0E98F1BAF9B230098DFA4 /* CoreAudio.framework in Frameworks */,
FAE0E98C1BAF9B230098DFA4 /* CoreGraphics.framework in Frameworks */,
FAE0E9881BAF9B230098DFA4 /* CoreMotion.framework in Frameworks */,
@ -768,6 +809,7 @@
FDBDE5850E313495006BAC0B /* libSDL2.a in Frameworks */,
FDA8AAB10E2D330F00EA573E /* AudioToolbox.framework in Frameworks */,
FABA34771D8B4EAD00915323 /* AVFoundation.framework in Frameworks */,
75E09194241EACC3004729E1 /* CoreBluetooth.framework in Frameworks */,
FDA8AAB70E2D330F00EA573E /* CoreAudio.framework in Frameworks */,
FDA8AAB40E2D330F00EA573E /* CoreGraphics.framework in Frameworks */,
FA8B4BC9196766BC00F8EB7C /* CoreMotion.framework in Frameworks */,
@ -787,6 +829,7 @@
FDBDE58C0E3134F3006BAC0B /* libSDL2.a in Frameworks */,
FDAAC3C30E2D47E6001DB1D8 /* AudioToolbox.framework in Frameworks */,
FABA34B11D8B5B6C00915323 /* AVFoundation.framework in Frameworks */,
75E09197241EACD3004729E1 /* CoreBluetooth.framework in Frameworks */,
FDAAC3C90E2D47E6001DB1D8 /* CoreAudio.framework in Frameworks */,
FDAAC3C60E2D47E6001DB1D8 /* CoreGraphics.framework in Frameworks */,
FA8B4BCD196766BF00F8EB7C /* CoreMotion.framework in Frameworks */,
@ -806,6 +849,7 @@
FDBDE59B0E31356A006BAC0B /* libSDL2.a in Frameworks */,
FDAAC5910E2D5429001DB1D8 /* AudioToolbox.framework in Frameworks */,
FABA34B31D8B5B7800915323 /* AVFoundation.framework in Frameworks */,
75E09199241EACDF004729E1 /* CoreBluetooth.framework in Frameworks */,
FDAAC5970E2D5429001DB1D8 /* CoreAudio.framework in Frameworks */,
FDAAC5940E2D5429001DB1D8 /* CoreGraphics.framework in Frameworks */,
FA8B4BCF196766C400F8EB7C /* CoreMotion.framework in Frameworks */,
@ -825,6 +869,7 @@
FDBDE59F0E31358D006BAC0B /* libSDL2.a in Frameworks */,
FDAAC5BF0E2D55B5001DB1D8 /* AudioToolbox.framework in Frameworks */,
FABA34B41D8B5B7C00915323 /* AVFoundation.framework in Frameworks */,
75E0919A241EACE5004729E1 /* CoreBluetooth.framework in Frameworks */,
FDAAC5C50E2D55B5001DB1D8 /* CoreAudio.framework in Frameworks */,
FDAAC5C20E2D55B5001DB1D8 /* CoreGraphics.framework in Frameworks */,
FA8B4BD0196766C600F8EB7C /* CoreMotion.framework in Frameworks */,
@ -845,6 +890,7 @@
FDBDE57C0E313445006BAC0B /* libSDL2.a in Frameworks */,
FDAAC61C0E2D5914001DB1D8 /* AudioToolbox.framework in Frameworks */,
FABA34B61D8B5B8900915323 /* AVFoundation.framework in Frameworks */,
75E0919E241EAD14004729E1 /* CoreBluetooth.framework in Frameworks */,
FDAAC6220E2D5914001DB1D8 /* CoreAudio.framework in Frameworks */,
FDAAC61F0E2D5914001DB1D8 /* CoreGraphics.framework in Frameworks */,
FA8B4BD2196766CB00F8EB7C /* CoreMotion.framework in Frameworks */,
@ -865,6 +911,7 @@
FDC42FF40F0D866D009C87E1 /* libSDL2.a in Frameworks */,
FDC42FF60F0D866D009C87E1 /* AudioToolbox.framework in Frameworks */,
FABA34B21D8B5B7300915323 /* AVFoundation.framework in Frameworks */,
75E09198241EACD9004729E1 /* CoreBluetooth.framework in Frameworks */,
FDC42FFC0F0D866D009C87E1 /* CoreAudio.framework in Frameworks */,
FDC42FF90F0D866D009C87E1 /* CoreGraphics.framework in Frameworks */,
FA8B4BCE196766C100F8EB7C /* CoreMotion.framework in Frameworks */,
@ -884,6 +931,7 @@
FDBDE5A90E3135C0006BAC0B /* libSDL2.a in Frameworks */,
FDD2C1000E2E4F4B00B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34C11D8B5BBE00915323 /* AVFoundation.framework in Frameworks */,
75E091A9241EAD4F004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C1060E2E4F4B00B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C1030E2E4F4B00B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BDD196766EB00F8EB7C /* CoreMotion.framework in Frameworks */,
@ -903,6 +951,7 @@
F3F758E122AC5BE9001D97F2 /* Metal.framework in Frameworks */,
FDBDE5AE0E3135E6006BAC0B /* libSDL2.a in Frameworks */,
FDD2C1770E2E52C000B7A85F /* AudioToolbox.framework in Frameworks */,
75E0919F241EAD19004729E1 /* CoreBluetooth.framework in Frameworks */,
FABA34B71D8B5B8D00915323 /* AVFoundation.framework in Frameworks */,
FDD2C17D0E2E52C000B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C17A0E2E52C000B7A85F /* CoreGraphics.framework in Frameworks */,
@ -922,6 +971,7 @@
FDBDE5B60E3135FE006BAC0B /* libSDL2.a in Frameworks */,
FDD2C19B0E2E534F00B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34B81D8B5B9200915323 /* AVFoundation.framework in Frameworks */,
75E091A0241EAD21004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C1A10E2E534F00B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C19E0E2E534F00B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BD4196766D100F8EB7C /* CoreMotion.framework in Frameworks */,
@ -941,6 +991,7 @@
FDBDE5BC0E31364D006BAC0B /* libSDL2.a in Frameworks */,
FDD2C4540E2E773800B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34B91D8B5B9600915323 /* AVFoundation.framework in Frameworks */,
75E091A1241EAD26004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C45A0E2E773800B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C4570E2E773800B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BD5196766D400F8EB7C /* CoreMotion.framework in Frameworks */,
@ -960,6 +1011,7 @@
FDBDE5C20E313663006BAC0B /* libSDL2.a in Frameworks */,
FDD2C4720E2E77D700B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34BA1D8B5B9B00915323 /* AVFoundation.framework in Frameworks */,
75E091A2241EAD2B004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C4780E2E77D700B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C4750E2E77D700B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BD6196766D700F8EB7C /* CoreMotion.framework in Frameworks */,
@ -979,6 +1031,7 @@
FDBDE5C60E3136F1006BAC0B /* libSDL2.a in Frameworks */,
FDD2C5010E2E7F4800B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34BB1D8B5BA100915323 /* AVFoundation.framework in Frameworks */,
75E091A3241EAD31004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C5040E2E7F4800B7A85F /* CoreGraphics.framework in Frameworks */,
FDD2C5070E2E7F4800B7A85F /* CoreAudio.framework in Frameworks */,
FA8B4BD7196766DA00F8EB7C /* CoreMotion.framework in Frameworks */,
@ -998,6 +1051,7 @@
FDBDE5C80E313702006BAC0B /* libSDL2.a in Frameworks */,
FDD2C51F0E2E807600B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34BF1D8B5BB500915323 /* AVFoundation.framework in Frameworks */,
75E091A7241EAD45004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C5250E2E807600B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C5220E2E807600B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BDB196766E500F8EB7C /* CoreMotion.framework in Frameworks */,
@ -1018,6 +1072,7 @@
FDBDE5CA0E313712006BAC0B /* libSDL2.a in Frameworks */,
FDD2C5440E2E80E400B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34C01D8B5BBA00915323 /* AVFoundation.framework in Frameworks */,
75E091A8241EAD4A004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C54A0E2E80E400B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C5470E2E80E400B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BDC196766E800F8EB7C /* CoreMotion.framework in Frameworks */,
@ -1037,6 +1092,7 @@
FDBDE5CC0E31372B006BAC0B /* libSDL2.a in Frameworks */,
FDD2C57D0E2E8C7400B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34C21D8B5BC200915323 /* AVFoundation.framework in Frameworks */,
75E091AA241EAD55004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C5830E2E8C7400B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C5800E2E8C7400B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BDE196766EE00F8EB7C /* CoreMotion.framework in Frameworks */,
@ -1056,6 +1112,7 @@
FDBDE5CE0E31373E006BAC0B /* libSDL2.a in Frameworks */,
FDD2C5BB0E2E8CFC00B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34C31D8B5BC600915323 /* AVFoundation.framework in Frameworks */,
75E091AB241EAD5B004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C5C10E2E8CFC00B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C5BE0E2E8CFC00B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BDF196766F100F8EB7C /* CoreMotion.framework in Frameworks */,
@ -1075,6 +1132,7 @@
FDBDE5D40E313789006BAC0B /* libSDL2.a in Frameworks */,
FDD2C6EA0E2E959E00B7A85F /* AudioToolbox.framework in Frameworks */,
FABA34C51D8B5BD000915323 /* AVFoundation.framework in Frameworks */,
75E091AE241EAD6B004729E1 /* CoreBluetooth.framework in Frameworks */,
FDD2C6F00E2E959E00B7A85F /* CoreAudio.framework in Frameworks */,
FDD2C6ED0E2E959E00B7A85F /* CoreGraphics.framework in Frameworks */,
FA8B4BE1196766F600F8EB7C /* CoreMotion.framework in Frameworks */,
@ -1209,6 +1267,8 @@
FDA8A7C30E2D10FA00EA573E /* Frameworks */ = {
isa = PBXGroup;
children = (
75E09187241EACB9004729E1 /* CoreBluetooth.framework */,
75E09195241EACC9004729E1 /* CoreBluetooth.framework */,
F3F758D722AC58A1001D97F2 /* Metal.framework */,
FA684F7A1BAF1A4400DCFD1A /* GameController.framework */,
FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */,
@ -2315,7 +2375,6 @@
046CEF8413254F23007AD51D /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testgesture;
};
@ -2324,7 +2383,6 @@
046CEF8513254F23007AD51D /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testgesture;
};
@ -2333,7 +2391,6 @@
047A63EB13285C3200CD7973 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = checkkeys;
};
@ -2342,7 +2399,6 @@
047A63EC13285C3200CD7973 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = checkkeys;
};
@ -2351,7 +2407,6 @@
1D6058940D05DD3E006BFB54 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testwm2;
};
@ -2360,7 +2415,6 @@
1D6058950D05DD3E006BFB54 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testwm2;
};
@ -2369,7 +2423,6 @@
56ED050B118A8FE400A56AA6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testpower;
};
@ -2378,7 +2431,6 @@
56ED050C118A8FE400A56AA6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testpower;
};
@ -2387,7 +2439,6 @@
AA13B3241FB8AEBC00D9FEE6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@ -2396,7 +2447,6 @@
AA13B3251FB8AEBC00D9FEE6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@ -2405,7 +2455,6 @@
AAE7DEEA14CBB1E100DF1A0E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testscale;
};
@ -2414,7 +2463,6 @@
AAE7DEEB14CBB1E100DF1A0E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testscale;
};
@ -2423,7 +2471,6 @@
AAE7DFAF14CBB54E00DF1A0E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testrendertarget;
};
@ -2432,7 +2479,6 @@
AAE7DFB014CBB54E00DF1A0E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testrendertarget;
};
@ -2489,7 +2535,6 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
DEVELOPMENT_TEAM = "";
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -2534,7 +2579,6 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = "";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
@ -2559,7 +2603,6 @@
FABA348F1D8B575200915323 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@ -2568,7 +2611,6 @@
FABA34901D8B575200915323 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@ -2577,7 +2619,6 @@
FABA34A81D8B582100915323 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
@ -2589,7 +2630,6 @@
FABA34A91D8B582100915323 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
SDKROOT = appletvos;
@ -2601,7 +2641,6 @@
FAE0E9911BAF9B230098DFA4 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@ -2610,7 +2649,6 @@
FAE0E9921BAF9B230098DFA4 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = "$(TARGET_NAME)";
};
@ -2619,7 +2657,6 @@
FDA8AAB90E2D330F00EA573E /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = loopwav;
};
@ -2628,7 +2665,6 @@
FDA8AABA0E2D330F00EA573E /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = loopwav;
};
@ -2637,7 +2673,6 @@
FDAAC3CB0E2D47E6001DB1D8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testaudioinfo;
};
@ -2646,7 +2681,6 @@
FDAAC3CC0E2D47E6001DB1D8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testaudioinfo;
};
@ -2655,7 +2689,6 @@
FDAAC5990E2D5429001DB1D8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testerror;
};
@ -2664,7 +2697,6 @@
FDAAC59A0E2D5429001DB1D8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testerror;
};
@ -2673,7 +2705,6 @@
FDAAC5C70E2D55B5001DB1D8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testfile;
};
@ -2682,7 +2713,6 @@
FDAAC5C80E2D55B5001DB1D8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testfile;
};
@ -2691,7 +2721,6 @@
FDAAC6240E2D5914001DB1D8 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testgles;
};
@ -2700,7 +2729,6 @@
FDAAC6250E2D5914001DB1D8 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testgles;
};
@ -2709,7 +2737,6 @@
FDC42FFE0F0D866D009C87E1 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = torturethread;
};
@ -2718,7 +2745,6 @@
FDC42FFF0F0D866D009C87E1 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = torturethread;
};
@ -2727,7 +2753,6 @@
FDD2C1080E2E4F4B00B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testthread;
};
@ -2736,7 +2761,6 @@
FDD2C1090E2E4F4B00B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testthread;
};
@ -2745,7 +2769,6 @@
FDD2C17F0E2E52C000B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testiconv;
};
@ -2754,7 +2777,6 @@
FDD2C1800E2E52C000B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testiconv;
};
@ -2763,7 +2785,6 @@
FDD2C1A30E2E534F00B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testjoystick;
};
@ -2772,7 +2793,6 @@
FDD2C1A40E2E534F00B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testjoystick;
};
@ -2781,7 +2801,6 @@
FDD2C45C0E2E773800B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testkeys;
};
@ -2790,7 +2809,6 @@
FDD2C45D0E2E773800B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testkeys;
};
@ -2799,7 +2817,6 @@
FDD2C47A0E2E77D700B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testlock;
};
@ -2808,7 +2825,6 @@
FDD2C47B0E2E77D700B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testlock;
};
@ -2817,7 +2833,6 @@
FDD2C5090E2E7F4800B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testplatform;
};
@ -2826,7 +2841,6 @@
FDD2C50A0E2E7F4800B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testplatform;
};
@ -2835,7 +2849,6 @@
FDD2C5270E2E807600B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testsem;
};
@ -2844,7 +2857,6 @@
FDD2C5280E2E807600B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testsem;
};
@ -2853,7 +2865,6 @@
FDD2C54C0E2E80E400B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testsprite2;
};
@ -2862,7 +2873,6 @@
FDD2C54D0E2E80E400B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testsprite2;
};
@ -2871,7 +2881,6 @@
FDD2C5850E2E8C7400B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testtimer;
};
@ -2880,7 +2889,6 @@
FDD2C5860E2E8C7400B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testtimer;
};
@ -2889,7 +2897,6 @@
FDD2C5C30E2E8CFC00B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testver;
};
@ -2898,7 +2905,6 @@
FDD2C5C40E2E8CFC00B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = testver;
};
@ -2907,7 +2913,6 @@
FDD2C6F20E2E959E00B7A85F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = torturethread;
};
@ -2916,7 +2921,6 @@
FDD2C6F30E2E959E00B7A85F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
DEVELOPMENT_TEAM = "";
INFOPLIST_FILE = Info.plist;
PRODUCT_NAME = torturethread;
};

+ 2
- 2
modules/SDL2/Xcode/SDL/Info-Framework.plist View File

@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>2.0.10</string>
<string>2.0.13</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
<string>2.0.10</string>
<string>2.0.13</string>
</dict>
</plist>

+ 9555
- 2201
modules/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj
File diff suppressed because it is too large
View File


+ 22
- 0
modules/SDL2/Xcode/SDL/hidapi/Info.plist View File

@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>

+ 1
- 1
modules/SDL2/Xcode/SDL/pkg-support/resources/License.txt View File

@ -1,6 +1,6 @@
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

+ 9313
- 0
modules/SDL2/aclocal.m4
File diff suppressed because it is too large
View File


+ 90
- 0
modules/SDL2/android-project-ant/AndroidManifest.xml View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Replace com.test.game with the identifier of your game below, e.g.
com.gamemaker.game
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.libsdl.app"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<!-- OpenGL ES 2.0 -->
<uses-feature android:glEsVersion="0x00020000" />
<!-- Touchscreen support -->
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false" />
<!-- Game controller support -->
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />
<uses-feature
android:name="android.hardware.gamepad"
android:required="false" />
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />
<!-- External mouse input events -->
<uses-feature
android:name="android.hardware.type.pc"
android:required="false" />
<!-- Audio recording support -->
<!-- if you want to capture audio, uncomment this. -->
<!-- <uses-feature
android:name="android.hardware.microphone"
android:required="false" /> -->
<!-- Allow writing to external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Allow access to Bluetooth devices -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Allow access to the vibrator -->
<uses-permission android:name="android.permission.VIBRATE" />
<!-- if you want to capture audio, uncomment this. -->
<!-- <uses-permission android:name="android.permission.RECORD_AUDIO" /> -->
<!-- Create a Java class extending SDLActivity and place it in a
directory under app/src/main/java matching the package, e.g. app/src/main/java/com/gamemaker/game/MyGame.java
then replace "SDLActivity" with the name of your class (e.g. "MyGame")
in the XML below.
An example Java class can be found in README-android.md
-->
<application android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:hardwareAccelerated="true" >
<!-- Example of setting SDL hints from AndroidManifest.xml:
<meta-data android:name="SDL_ENV.SDL_ACCELEROMETER_AS_JOYSTICK" android:value="0"/>
-->
<activity android:name="SDLActivity"
android:label="@string/app_name"
android:alwaysRetainTaskState="true"
android:launchMode="singleInstance"
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Drop file event -->
<!--
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
-->
</activity>
</application>
</manifest>

+ 17
- 0
modules/SDL2/android-project-ant/ant.properties View File

@ -0,0 +1,17 @@
# This file is used to override default values used by the Ant build system.
#
# This file must be checked into Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
# You can also use it define how the release builds are signed by declaring
# the following properties:
# 'key.store' for the location of your keystore and
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.

+ 17
- 0
modules/SDL2/android-project-ant/build.properties View File

@ -0,0 +1,17 @@
# This file is used to override default values used by the Ant build system.
#
# This file must be checked in Version Control Systems, as it is
# integral to the build system of your project.
# This file is only used by the Ant script.
# You can use this to override default values such as
# 'source.dir' for the location of your java source folder and
# 'out.dir' for the location of your output folder.
# You can also use it define how the release builds are signed by declaring
# the following properties:
# 'key.store' for the location of your keystore and
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.

+ 93
- 0
modules/SDL2/android-project-ant/build.xml View File

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- This should be changed to the name of your project -->
<project name="SDLActivity" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />
<!-- if sdk.dir was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
unless="sdk.dir"
/>
<!--
Import per project custom build rules if present at the root of the project.
This is the place to put custom intermediary targets such as:
-pre-build
-pre-compile
-post-compile (This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir})
-post-package
-post-build
-pre-clean
-->
<import file="custom_rules.xml" optional="true" />
<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>

+ 11
- 0
modules/SDL2/android-project-ant/default.properties View File

@ -0,0 +1,11 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system use,
# "build.properties", and override values to adapt the script to your
# project structure.
# Project target.
target=android-16

+ 1
- 0
modules/SDL2/android-project-ant/jni/Android.mk View File

@ -0,0 +1 @@
include $(call all-subdir-makefiles)

+ 10
- 0
modules/SDL2/android-project-ant/jni/Application.mk View File

@ -0,0 +1,10 @@
# Uncomment this if you're using STL in your project
# See CPLUSPLUS-SUPPORT.html in the NDK documentation for more information
# APP_STL := stlport_static
APP_ABI := armeabi armeabi-v7a x86
# Min SDK level
APP_PLATFORM=android-10

+ 18
- 0
modules/SDL2/android-project-ant/jni/src/Android.mk View File

@ -0,0 +1,18 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := main
SDL_PATH := ../SDL
LOCAL_C_INCLUDES := $(LOCAL_PATH)/$(SDL_PATH)/include
# Add your application source files here...
LOCAL_SRC_FILES := YourSourceHere.c
LOCAL_SHARED_LIBRARIES := SDL2
LOCAL_LDLIBS := -lGLESv1_CM -lGLESv2 -llog
include $(BUILD_SHARED_LIBRARY)

+ 12
- 0
modules/SDL2/android-project-ant/jni/src/Android_static.mk View File

@ -0,0 +1,12 @@
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := main
LOCAL_SRC_FILES := YourSourceHere.c
LOCAL_STATIC_LIBRARIES := SDL2_static
include $(BUILD_SHARED_LIBRARY)
$(call import-module,SDL)LOCAL_PATH := $(call my-dir)

+ 20
- 0
modules/SDL2/android-project-ant/proguard-project.txt View File

@ -0,0 +1,20 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

+ 14
- 0
modules/SDL2/android-project-ant/project.properties View File

@ -0,0 +1,14 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-16

BIN
modules/SDL2/android-project-ant/res/drawable-hdpi/ic_launcher.png View File

Before After
Width: 72  |  Height: 72  |  Size: 2.6 KiB

BIN
modules/SDL2/android-project-ant/res/drawable-mdpi/ic_launcher.png View File

Before After
Width: 48  |  Height: 48  |  Size: 1.7 KiB

BIN
modules/SDL2/android-project-ant/res/drawable-xhdpi/ic_launcher.png View File

Before After
Width: 96  |  Height: 96  |  Size: 3.8 KiB

BIN
modules/SDL2/android-project-ant/res/drawable-xxhdpi/ic_launcher.png View File

Before After
Width: 144  |  Height: 144  |  Size: 6.7 KiB

+ 13
- 0
modules/SDL2/android-project-ant/res/layout/main.xml View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="Hello World, SDLActivity"
/>
</LinearLayout>

+ 4
- 0
modules/SDL2/android-project-ant/res/values/strings.xml View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">SDL App</string>
</resources>

+ 22
- 0
modules/SDL2/android-project-ant/src/org/libsdl/app/HIDDevice.java View File

@ -0,0 +1,22 @@
package org.libsdl.app;
import android.hardware.usb.UsbDevice;
interface HIDDevice
{
public int getId();
public int getVendorId();
public int getProductId();
public String getSerialNumber();
public int getVersion();
public String getManufacturerName();
public String getProductName();
public UsbDevice getDevice();
public boolean open();
public int sendFeatureReport(byte[] report);
public int sendOutputReport(byte[] report);
public boolean getFeatureReport(byte[] report);
public void setFrozen(boolean frozen);
public void close();
public void shutdown();
}

+ 650
- 0
modules/SDL2/android-project-ant/src/org/libsdl/app/HIDDeviceBLESteamController.java View File

@ -0,0 +1,650 @@
package org.libsdl.app;
import android.content.Context;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothGatt;
import android.bluetooth.BluetoothGattCallback;
import android.bluetooth.BluetoothGattCharacteristic;
import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothGattService;
import android.hardware.usb.UsbDevice;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.os.*;
//import com.android.internal.util.HexDump;
import java.lang.Runnable;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.UUID;
class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDevice {
private static final String TAG = "hidapi";
private HIDDeviceManager mManager;
private BluetoothDevice mDevice;
private int mDeviceId;
private BluetoothGatt mGatt;
private boolean mIsRegistered = false;
private boolean mIsConnected = false;
private boolean mIsChromebook = false;
private boolean mIsReconnecting = false;
private boolean mFrozen = false;
private LinkedList<GattOperation> mOperations;
GattOperation mCurrentOperation = null;
private Handler mHandler;
private static final int TRANSPORT_AUTO = 0;
private static final int TRANSPORT_BREDR = 1;
private static final int TRANSPORT_LE = 2;
private static final int CHROMEBOOK_CONNECTION_CHECK_INTERVAL = 10000;
static public final UUID steamControllerService = UUID.fromString("100F6C32-1735-4313-B402-38567131E5F3");
static public final UUID inputCharacteristic = UUID.fromString("100F6C33-1735-4313-B402-38567131E5F3");
static public final UUID reportCharacteristic = UUID.fromString("100F6C34-1735-4313-B402-38567131E5F3");
static private final byte[] enterValveMode = new byte[] { (byte)0xC0, (byte)0x87, 0x03, 0x08, 0x07, 0x00 };
static class GattOperation {
private enum Operation {
CHR_READ,
CHR_WRITE,
ENABLE_NOTIFICATION
}
Operation mOp;
UUID mUuid;
byte[] mValue;
BluetoothGatt mGatt;
boolean mResult = true;
private GattOperation(BluetoothGatt gatt, GattOperation.Operation operation, UUID uuid) {
mGatt = gatt;
mOp = operation;
mUuid = uuid;
}
private GattOperation(BluetoothGatt gatt, GattOperation.Operation operation, UUID uuid, byte[] value) {
mGatt = gatt;
mOp = operation;
mUuid = uuid;
mValue = value;
}
public void run() {
// This is executed in main thread
BluetoothGattCharacteristic chr;
switch (mOp) {
case CHR_READ:
chr = getCharacteristic(mUuid);
//Log.v(TAG, "Reading characteristic " + chr.getUuid());
if (!mGatt.readCharacteristic(chr)) {
Log.e(TAG, "Unable to read characteristic " + mUuid.toString());
mResult = false;
break;
}
mResult = true;
break;
case CHR_WRITE:
chr = getCharacteristic(mUuid);
//Log.v(TAG, "Writing characteristic " + chr.getUuid() + " value=" + HexDump.toHexString(value));
chr.setValue(mValue);
if (!mGatt.writeCharacteristic(chr)) {
Log.e(TAG, "Unable to write characteristic " + mUuid.toString());
mResult = false;
break;
}
mResult = true;
break;
case ENABLE_NOTIFICATION:
chr = getCharacteristic(mUuid);
//Log.v(TAG, "Writing descriptor of " + chr.getUuid());
if (chr != null) {
BluetoothGattDescriptor cccd = chr.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
if (cccd != null) {
int properties = chr.getProperties();
byte[] value;
if ((properties & BluetoothGattCharacteristic.PROPERTY_NOTIFY) == BluetoothGattCharacteristic.PROPERTY_NOTIFY) {
value = BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE;
} else if ((properties & BluetoothGattCharacteristic.PROPERTY_INDICATE) == BluetoothGattCharacteristic.PROPERTY_INDICATE) {
value = BluetoothGattDescriptor.ENABLE_INDICATION_VALUE;
} else {
Log.e(TAG, "Unable to start notifications on input characteristic");
mResult = false;
return;
}
mGatt.setCharacteristicNotification(chr, true);
cccd.setValue(value);
if (!mGatt.writeDescriptor(cccd)) {
Log.e(TAG, "Unable to write descriptor " + mUuid.toString());
mResult = false;
return;
}
mResult = true;
}
}
}
}
public boolean finish() {
return mResult;
}
private BluetoothGattCharacteristic getCharacteristic(UUID uuid) {
BluetoothGattService valveService = mGatt.getService(steamControllerService);
if (valveService == null)
return null;
return valveService.getCharacteristic(uuid);
}
static public GattOperation readCharacteristic(BluetoothGatt gatt, UUID uuid) {
return new GattOperation(gatt, Operation.CHR_READ, uuid);
}
static public GattOperation writeCharacteristic(BluetoothGatt gatt, UUID uuid, byte[] value) {
return new GattOperation(gatt, Operation.CHR_WRITE, uuid, value);
}
static public GattOperation enableNotification(BluetoothGatt gatt, UUID uuid) {
return new GattOperation(gatt, Operation.ENABLE_NOTIFICATION, uuid);
}
}
public HIDDeviceBLESteamController(HIDDeviceManager manager, BluetoothDevice device) {
mManager = manager;
mDevice = device;
mDeviceId = mManager.getDeviceIDForIdentifier(getIdentifier());
mIsRegistered = false;
mIsChromebook = mManager.getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
mOperations = new LinkedList<GattOperation>();
mHandler = new Handler(Looper.getMainLooper());
mGatt = connectGatt();
// final HIDDeviceBLESteamController finalThis = this;
// mHandler.postDelayed(new Runnable() {
// @Override
// public void run() {
// finalThis.checkConnectionForChromebookIssue();
// }
// }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
}
public String getIdentifier() {
return String.format("SteamController.%s", mDevice.getAddress());
}
public BluetoothGatt getGatt() {
return mGatt;
}
// Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead
// of TRANSPORT_LE. Let's force ourselves to connect low energy.
private BluetoothGatt connectGatt(boolean managed) {
if (Build.VERSION.SDK_INT >= 23) {
try {
return mDevice.connectGatt(mManager.getContext(), managed, this, TRANSPORT_LE);
} catch (Exception e) {
return mDevice.connectGatt(mManager.getContext(), managed, this);
}
} else {
return mDevice.connectGatt(mManager.getContext(), managed, this);
}
}
private BluetoothGatt connectGatt() {
return connectGatt(false);
}
protected int getConnectionState() {
Context context = mManager.getContext();
if (context == null) {
// We are lacking any context to get our Bluetooth information. We'll just assume disconnected.
return BluetoothProfile.STATE_DISCONNECTED;
}
BluetoothManager btManager = (BluetoothManager)context.getSystemService(Context.BLUETOOTH_SERVICE);
if (btManager == null) {
// This device doesn't support Bluetooth. We should never be here, because how did
// we instantiate a device to start with?
return BluetoothProfile.STATE_DISCONNECTED;
}
return btManager.getConnectionState(mDevice, BluetoothProfile.GATT);
}
public void reconnect() {
if (getConnectionState() != BluetoothProfile.STATE_CONNECTED) {
mGatt.disconnect();
mGatt = connectGatt();
}
}
protected void checkConnectionForChromebookIssue() {
if (!mIsChromebook) {
// We only do this on Chromebooks, because otherwise it's really annoying to just attempt
// over and over.
return;
}
int connectionState = getConnectionState();
switch (connectionState) {
case BluetoothProfile.STATE_CONNECTED:
if (!mIsConnected) {
// We are in the Bad Chromebook Place. We can force a disconnect
// to try to recover.
Log.v(TAG, "Chromebook: We are in a very bad state; the controller shows as connected in the underlying Bluetooth layer, but we never received a callback. Forcing a reconnect.");
mIsReconnecting = true;
mGatt.disconnect();
mGatt = connectGatt(false);
break;
}
else if (!isRegistered()) {
if (mGatt.getServices().size() > 0) {
Log.v(TAG, "Chromebook: We are connected to a controller, but never got our registration. Trying to recover.");
probeService(this);
}
else {
Log.v(TAG, "Chromebook: We are connected to a controller, but never discovered services. Trying to recover.");
mIsReconnecting = true;
mGatt.disconnect();
mGatt = connectGatt(false);
break;
}
}
else {
Log.v(TAG, "Chromebook: We are connected, and registered. Everything's good!");
return;
}
break;
case BluetoothProfile.STATE_DISCONNECTED:
Log.v(TAG, "Chromebook: We have either been disconnected, or the Chromebook BtGatt.ContextMap bug has bitten us. Attempting a disconnect/reconnect, but we may not be able to recover.");
mIsReconnecting = true;
mGatt.disconnect();
mGatt = connectGatt(false);
break;
case BluetoothProfile.STATE_CONNECTING:
Log.v(TAG, "Chromebook: We're still trying to connect. Waiting a bit longer.");
break;
}
final HIDDeviceBLESteamController finalThis = this;
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
finalThis.checkConnectionForChromebookIssue();
}
}, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
}
private boolean isRegistered() {
return mIsRegistered;
}
private void setRegistered() {
mIsRegistered = true;
}
private boolean probeService(HIDDeviceBLESteamController controller) {
if (isRegistered()) {
return true;
}
if (!mIsConnected) {
return false;
}
Log.v(TAG, "probeService controller=" + controller);
for (BluetoothGattService service : mGatt.getServices()) {
if (service.getUuid().equals(steamControllerService)) {
Log.v(TAG, "Found Valve steam controller service " + service.getUuid());
for (BluetoothGattCharacteristic chr : service.getCharacteristics()) {
if (chr.getUuid().equals(inputCharacteristic)) {
Log.v(TAG, "Found input characteristic");
// Start notifications
BluetoothGattDescriptor cccd = chr.getDescriptor(UUID.fromString("00002902-0000-1000-8000-00805f9b34fb"));
if (cccd != null) {
enableNotification(chr.getUuid());
}
}
}
return true;
}
}
if ((mGatt.getServices().size() == 0) && mIsChromebook && !mIsReconnecting) {
Log.e(TAG, "Chromebook: Discovered services were empty; this almost certainly means the BtGatt.ContextMap bug has bitten us.");
mIsConnected = false;
mIsReconnecting = true;
mGatt.disconnect();
mGatt = connectGatt(false);
}
return false;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
private void finishCurrentGattOperation() {
GattOperation op = null;
synchronized (mOperations) {
if (mCurrentOperation != null) {
op = mCurrentOperation;
mCurrentOperation = null;
}
}
if (op != null) {
boolean result = op.finish(); // TODO: Maybe in main thread as well?
// Our operation failed, let's add it back to the beginning of our queue.
if (!result) {
mOperations.addFirst(op);
}
}
executeNextGattOperation();
}
private void executeNextGattOperation() {
synchronized (mOperations) {
if (mCurrentOperation != null)
return;
if (mOperations.isEmpty())
return;
mCurrentOperation = mOperations.removeFirst();
}
// Run in main thread
mHandler.post(new Runnable() {
@Override
public void run() {
synchronized (mOperations) {
if (mCurrentOperation == null) {
Log.e(TAG, "Current operation null in executor?");
return;
}
mCurrentOperation.run();
// now wait for the GATT callback and when it comes, finish this operation
}
}
});
}
private void queueGattOperation(GattOperation op) {
synchronized (mOperations) {
mOperations.add(op);
}
executeNextGattOperation();
}
private void enableNotification(UUID chrUuid) {
GattOperation op = HIDDeviceBLESteamController.GattOperation.enableNotification(mGatt, chrUuid);
queueGattOperation(op);
}
public void writeCharacteristic(UUID uuid, byte[] value) {
GattOperation op = HIDDeviceBLESteamController.GattOperation.writeCharacteristic(mGatt, uuid, value);
queueGattOperation(op);
}
public void readCharacteristic(UUID uuid) {
GattOperation op = HIDDeviceBLESteamController.GattOperation.readCharacteristic(mGatt, uuid);
queueGattOperation(op);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
////////////// BluetoothGattCallback overridden methods
//////////////////////////////////////////////////////////////////////////////////////////////////////
public void onConnectionStateChange(BluetoothGatt g, int status, int newState) {
//Log.v(TAG, "onConnectionStateChange status=" + status + " newState=" + newState);
mIsReconnecting = false;
if (newState == 2) {
mIsConnected = true;
// Run directly, without GattOperation
if (!isRegistered()) {
mHandler.post(new Runnable() {
@Override
public void run() {
mGatt.discoverServices();
}
});
}
}
else if (newState == 0) {
mIsConnected = false;
}
// Disconnection is handled in SteamLink using the ACTION_ACL_DISCONNECTED Intent.
}
public void onServicesDiscovered(BluetoothGatt gatt, int status) {
//Log.v(TAG, "onServicesDiscovered status=" + status);
if (status == 0) {
if (gatt.getServices().size() == 0) {
Log.v(TAG, "onServicesDiscovered returned zero services; something has gone horribly wrong down in Android's Bluetooth stack.");
mIsReconnecting = true;
mIsConnected = false;
gatt.disconnect();
mGatt = connectGatt(false);
}
else {
probeService(this);
}
}
}
public void onCharacteristicRead(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
//Log.v(TAG, "onCharacteristicRead status=" + status + " uuid=" + characteristic.getUuid());
if (characteristic.getUuid().equals(reportCharacteristic) && !mFrozen) {
mManager.HIDDeviceFeatureReport(getId(), characteristic.getValue());
}
finishCurrentGattOperation();
}
public void onCharacteristicWrite(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic, int status) {
//Log.v(TAG, "onCharacteristicWrite status=" + status + " uuid=" + characteristic.getUuid());
if (characteristic.getUuid().equals(reportCharacteristic)) {
// Only register controller with the native side once it has been fully configured
if (!isRegistered()) {
Log.v(TAG, "Registering Steam Controller with ID: " + getId());
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0, 0, 0, 0);
setRegistered();
}
}
finishCurrentGattOperation();
}
public void onCharacteristicChanged(BluetoothGatt gatt, BluetoothGattCharacteristic characteristic) {
// Enable this for verbose logging of controller input reports
//Log.v(TAG, "onCharacteristicChanged uuid=" + characteristic.getUuid() + " data=" + HexDump.dumpHexString(characteristic.getValue()));
if (characteristic.getUuid().equals(inputCharacteristic) && !mFrozen) {
mManager.HIDDeviceInputReport(getId(), characteristic.getValue());
}
}
public void onDescriptorRead(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
//Log.v(TAG, "onDescriptorRead status=" + status);
}
public void onDescriptorWrite(BluetoothGatt gatt, BluetoothGattDescriptor descriptor, int status) {
BluetoothGattCharacteristic chr = descriptor.getCharacteristic();
//Log.v(TAG, "onDescriptorWrite status=" + status + " uuid=" + chr.getUuid() + " descriptor=" + descriptor.getUuid());
if (chr.getUuid().equals(inputCharacteristic)) {
boolean hasWrittenInputDescriptor = true;
BluetoothGattCharacteristic reportChr = chr.getService().getCharacteristic(reportCharacteristic);
if (reportChr != null) {
Log.v(TAG, "Writing report characteristic to enter valve mode");
reportChr.setValue(enterValveMode);
gatt.writeCharacteristic(reportChr);
}
}
finishCurrentGattOperation();
}
public void onReliableWriteCompleted(BluetoothGatt gatt, int status) {
//Log.v(TAG, "onReliableWriteCompleted status=" + status);
}
public void onReadRemoteRssi(BluetoothGatt gatt, int rssi, int status) {
//Log.v(TAG, "onReadRemoteRssi status=" + status);
}
public void onMtuChanged(BluetoothGatt gatt, int mtu, int status) {
//Log.v(TAG, "onMtuChanged status=" + status);
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////// Public API
//////////////////////////////////////////////////////////////////////////////////////////////////////
@Override
public int getId() {
return mDeviceId;
}
@Override
public int getVendorId() {
// Valve Corporation
final int VALVE_USB_VID = 0x28DE;
return VALVE_USB_VID;
}
@Override
public int getProductId() {
// We don't have an easy way to query from the Bluetooth device, but we know what it is
final int D0G_BLE2_PID = 0x1106;
return D0G_BLE2_PID;
}
@Override
public String getSerialNumber() {
// This will be read later via feature report by Steam
return "12345";
}
@Override
public int getVersion() {
return 0;
}
@Override
public String getManufacturerName() {
return "Valve Corporation";
}
@Override
public String getProductName() {
return "Steam Controller";
}
@Override
public UsbDevice getDevice() {
return null;
}
@Override
public boolean open() {
return true;
}
@Override
public int sendFeatureReport(byte[] report) {
if (!isRegistered()) {
Log.e(TAG, "Attempted sendFeatureReport before Steam Controller is registered!");
if (mIsConnected) {
probeService(this);
}
return -1;
}
// We need to skip the first byte, as that doesn't go over the air
byte[] actual_report = Arrays.copyOfRange(report, 1, report.length - 1);
//Log.v(TAG, "sendFeatureReport " + HexDump.dumpHexString(actual_report));
writeCharacteristic(reportCharacteristic, actual_report);
return report.length;
}
@Override
public int sendOutputReport(byte[] report) {
if (!isRegistered()) {
Log.e(TAG, "Attempted sendOutputReport before Steam Controller is registered!");
if (mIsConnected) {
probeService(this);
}
return -1;
}
//Log.v(TAG, "sendFeatureReport " + HexDump.dumpHexString(report));
writeCharacteristic(reportCharacteristic, report);
return report.length;
}
@Override
public boolean getFeatureReport(byte[] report) {
if (!isRegistered()) {
Log.e(TAG, "Attempted getFeatureReport before Steam Controller is registered!");
if (mIsConnected) {
probeService(this);
}
return false;
}
//Log.v(TAG, "getFeatureReport");
readCharacteristic(reportCharacteristic);
return true;
}
@Override
public void close() {
}
@Override
public void setFrozen(boolean frozen) {
mFrozen = frozen;
}
@Override
public void shutdown() {
close();
BluetoothGatt g = mGatt;
if (g != null) {
g.disconnect();
g.close();
mGatt = null;
}
mManager = null;
mIsRegistered = false;
mIsConnected = false;
mOperations.clear();
}
}

+ 669
- 0
modules/SDL2/android-project-ant/src/org/libsdl/app/HIDDeviceManager.java View File

@ -0,0 +1,669 @@
package org.libsdl.app;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.PendingIntent;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile;
import android.util.Log;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.hardware.usb.*;
import android.os.Handler;
import android.os.Looper;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
public class HIDDeviceManager {
private static final String TAG = "hidapi";
private static final String ACTION_USB_PERMISSION = "org.libsdl.app.USB_PERMISSION";
private static HIDDeviceManager sManager;
private static int sManagerRefCount = 0;
public static HIDDeviceManager acquire(Context context) {
if (sManagerRefCount == 0) {
sManager = new HIDDeviceManager(context);
}
++sManagerRefCount;
return sManager;
}
public static void release(HIDDeviceManager manager) {
if (manager == sManager) {
--sManagerRefCount;
if (sManagerRefCount == 0) {
sManager.close();
sManager = null;
}
}
}
private Context mContext;
private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>();
private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
private int mNextDeviceId = 0;
private SharedPreferences mSharedPreferences = null;
private boolean mIsChromebook = false;
private UsbManager mUsbManager;
private Handler mHandler;
private BluetoothManager mBluetoothManager;
private List<BluetoothDevice> mLastBluetoothDevices;
private final BroadcastReceiver mUsbBroadcast = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
if (action.equals(UsbManager.ACTION_USB_DEVICE_ATTACHED)) {
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
handleUsbDeviceAttached(usbDevice);
} else if (action.equals(UsbManager.ACTION_USB_DEVICE_DETACHED)) {
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
handleUsbDeviceDetached(usbDevice);
} else if (action.equals(HIDDeviceManager.ACTION_USB_PERMISSION)) {
UsbDevice usbDevice = intent.getParcelableExtra(UsbManager.EXTRA_DEVICE);
handleUsbDevicePermission(usbDevice, intent.getBooleanExtra(UsbManager.EXTRA_PERMISSION_GRANTED, false));
}
}
};
private final BroadcastReceiver mBluetoothBroadcast = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
// Bluetooth device was connected. If it was a Steam Controller, handle it
if (action.equals(BluetoothDevice.ACTION_ACL_CONNECTED)) {
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
Log.d(TAG, "Bluetooth device connected: " + device);
if (isSteamController(device)) {
connectBluetoothDevice(device);
}
}
// Bluetooth device was disconnected, remove from controller manager (if any)
if (action.equals(BluetoothDevice.ACTION_ACL_DISCONNECTED)) {
BluetoothDevice device = intent.getParcelableExtra(BluetoothDevice.EXTRA_DEVICE);
Log.d(TAG, "Bluetooth device disconnected: " + device);
disconnectBluetoothDevice(device);
}
}
};
private HIDDeviceManager(final Context context) {
mContext = context;
// Make sure we have the HIDAPI library loaded with the native functions
try {
SDL.loadLibrary("hidapi");
} catch (Throwable e) {
Log.w(TAG, "Couldn't load hidapi: " + e.toString());
AlertDialog.Builder builder = new AlertDialog.Builder(context);
builder.setCancelable(false);
builder.setTitle("SDL HIDAPI Error");
builder.setMessage("Please report the following error to the SDL maintainers: " + e.getMessage());
builder.setNegativeButton("Quit", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
try {
// If our context is an activity, exit rather than crashing when we can't
// call our native functions.
Activity activity = (Activity)context;
activity.finish();
}
catch (ClassCastException cce) {
// Context wasn't an activity, there's nothing we can do. Give up and return.
}
}
});
builder.show();
return;
}
HIDDeviceRegisterCallback();
mSharedPreferences = mContext.getSharedPreferences("hidapi", Context.MODE_PRIVATE);
mIsChromebook = mContext.getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
// if (shouldClear) {
// SharedPreferences.Editor spedit = mSharedPreferences.edit();
// spedit.clear();
// spedit.commit();
// }
// else
{
mNextDeviceId = mSharedPreferences.getInt("next_device_id", 0);
}
initializeUSB();
initializeBluetooth();
}
public Context getContext() {
return mContext;
}
public int getDeviceIDForIdentifier(String identifier) {
SharedPreferences.Editor spedit = mSharedPreferences.edit();
int result = mSharedPreferences.getInt(identifier, 0);
if (result == 0) {
result = mNextDeviceId++;
spedit.putInt("next_device_id", mNextDeviceId);
}
spedit.putInt(identifier, result);
spedit.commit();
return result;
}
private void initializeUSB() {
mUsbManager = (UsbManager)mContext.getSystemService(Context.USB_SERVICE);
/*
// Logging
for (UsbDevice device : mUsbManager.getDeviceList().values()) {
Log.i(TAG,"Path: " + device.getDeviceName());
Log.i(TAG,"Manufacturer: " + device.getManufacturerName());
Log.i(TAG,"Product: " + device.getProductName());
Log.i(TAG,"ID: " + device.getDeviceId());
Log.i(TAG,"Class: " + device.getDeviceClass());
Log.i(TAG,"Protocol: " + device.getDeviceProtocol());
Log.i(TAG,"Vendor ID " + device.getVendorId());
Log.i(TAG,"Product ID: " + device.getProductId());
Log.i(TAG,"Interface count: " + device.getInterfaceCount());
Log.i(TAG,"---------------------------------------");
// Get interface details
for (int index = 0; index < device.getInterfaceCount(); index++) {
UsbInterface mUsbInterface = device.getInterface(index);
Log.i(TAG," ***** *****");
Log.i(TAG," Interface index: " + index);
Log.i(TAG," Interface ID: " + mUsbInterface.getId());
Log.i(TAG," Interface class: " + mUsbInterface.getInterfaceClass());
Log.i(TAG," Interface subclass: " + mUsbInterface.getInterfaceSubclass());
Log.i(TAG," Interface protocol: " + mUsbInterface.getInterfaceProtocol());
Log.i(TAG," Endpoint count: " + mUsbInterface.getEndpointCount());
// Get endpoint details
for (int epi = 0; epi < mUsbInterface.getEndpointCount(); epi++)
{
UsbEndpoint mEndpoint = mUsbInterface.getEndpoint(epi);
Log.i(TAG," ++++ ++++ ++++");
Log.i(TAG," Endpoint index: " + epi);
Log.i(TAG," Attributes: " + mEndpoint.getAttributes());
Log.i(TAG," Direction: " + mEndpoint.getDirection());
Log.i(TAG," Number: " + mEndpoint.getEndpointNumber());
Log.i(TAG," Interval: " + mEndpoint.getInterval());
Log.i(TAG," Packet size: " + mEndpoint.getMaxPacketSize());
Log.i(TAG," Type: " + mEndpoint.getType());
}
}
}
Log.i(TAG," No more devices connected.");
*/
// Register for USB broadcasts and permission completions
IntentFilter filter = new IntentFilter();
filter.addAction(UsbManager.ACTION_USB_DEVICE_ATTACHED);
filter.addAction(UsbManager.ACTION_USB_DEVICE_DETACHED);
filter.addAction(HIDDeviceManager.ACTION_USB_PERMISSION);
mContext.registerReceiver(mUsbBroadcast, filter);
for (UsbDevice usbDevice : mUsbManager.getDeviceList().values()) {
handleUsbDeviceAttached(usbDevice);
}
}
UsbManager getUSBManager() {
return mUsbManager;
}
private void shutdownUSB() {
try {
mContext.unregisterReceiver(mUsbBroadcast);
} catch (Exception e) {
// We may not have registered, that's okay
}
}
private boolean isHIDDeviceInterface(UsbDevice usbDevice, UsbInterface usbInterface) {
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
return true;
}
if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
return true;
}
return false;
}
private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) {
final int XB360_IFACE_SUBCLASS = 93;
final int XB360_IFACE_PROTOCOL = 1; // Wired
final int XB360W_IFACE_PROTOCOL = 129; // Wireless
final int[] SUPPORTED_VENDORS = {
0x0079, // GPD Win 2
0x044f, // Thrustmaster
0x045e, // Microsoft
0x046d, // Logitech
0x056e, // Elecom
0x06a3, // Saitek
0x0738, // Mad Catz
0x07ff, // Mad Catz
0x0e6f, // PDP
0x0f0d, // Hori
0x1038, // SteelSeries
0x11c9, // Nacon
0x12ab, // Unknown
0x1430, // RedOctane
0x146b, // BigBen
0x1532, // Razer Sabertooth
0x15e4, // Numark
0x162e, // Joytech
0x1689, // Razer Onza
0x1bad, // Harmonix
0x24c6, // PowerA
};
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS &&
(usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL ||
usbInterface.getInterfaceProtocol() == XB360W_IFACE_PROTOCOL)) {
int vendor_id = usbDevice.getVendorId();
for (int supportedVid : SUPPORTED_VENDORS) {
if (vendor_id == supportedVid) {
return true;
}
}
}
return false;
}
private boolean isXboxOneController(UsbDevice usbDevice, UsbInterface usbInterface) {
final int XB1_IFACE_SUBCLASS = 71;
final int XB1_IFACE_PROTOCOL = 208;
final int[] SUPPORTED_VENDORS = {
0x045e, // Microsoft
0x0738, // Mad Catz
0x0e6f, // PDP
0x0f0d, // Hori
0x1532, // Razer Wildcat
0x24c6, // PowerA
0x2e24, // Hyperkin
};
if (usbInterface.getId() == 0 &&
usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS &&
usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) {
int vendor_id = usbDevice.getVendorId();
for (int supportedVid : SUPPORTED_VENDORS) {
if (vendor_id == supportedVid) {
return true;
}
}
}
return false;
}
private void handleUsbDeviceAttached(UsbDevice usbDevice) {
connectHIDDeviceUSB(usbDevice);
}
private void handleUsbDeviceDetached(UsbDevice usbDevice) {
List<Integer> devices = new ArrayList<Integer>();
for (HIDDevice device : mDevicesById.values()) {
if (usbDevice.equals(device.getDevice())) {
devices.add(device.getId());
}
}
for (int id : devices) {
HIDDevice device = mDevicesById.get(id);
mDevicesById.remove(id);
device.shutdown();
HIDDeviceDisconnected(id);
}
}
private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
for (HIDDevice device : mDevicesById.values()) {
if (usbDevice.equals(device.getDevice())) {
boolean opened = false;
if (permission_granted) {
opened = device.open();
}
HIDDeviceOpenResult(device.getId(), opened);
}
}
}
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
synchronized (this) {
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
UsbInterface usbInterface = usbDevice.getInterface(interface_index);
if (isHIDDeviceInterface(usbDevice, usbInterface)) {
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
int id = device.getId();
mDevicesById.put(id, device);
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), usbInterface.getId(), usbInterface.getInterfaceClass(), usbInterface.getInterfaceSubclass(), usbInterface.getInterfaceProtocol());
}
}
}
}
private void initializeBluetooth() {
Log.d(TAG, "Initializing Bluetooth");
if (mContext.getPackageManager().checkPermission(android.Manifest.permission.BLUETOOTH, mContext.getPackageName()) != PackageManager.PERMISSION_GRANTED) {
Log.d(TAG, "Couldn't initialize Bluetooth, missing android.permission.BLUETOOTH");
return;
}
// Find bonded bluetooth controllers and create SteamControllers for them
mBluetoothManager = (BluetoothManager)mContext.getSystemService(Context.BLUETOOTH_SERVICE);
if (mBluetoothManager == null) {
// This device doesn't support Bluetooth.
return;
}
BluetoothAdapter btAdapter = mBluetoothManager.getAdapter();
if (btAdapter == null) {
// This device has Bluetooth support in the codebase, but has no available adapters.
return;
}
// Get our bonded devices.
for (BluetoothDevice device : btAdapter.getBondedDevices()) {
Log.d(TAG, "Bluetooth device available: " + device);
if (isSteamController(device)) {
connectBluetoothDevice(device);
}
}
// NOTE: These don't work on Chromebooks, to my undying dismay.
IntentFilter filter = new IntentFilter();
filter.addAction(BluetoothDevice.ACTION_ACL_CONNECTED);
filter.addAction(BluetoothDevice.ACTION_ACL_DISCONNECTED);
mContext.registerReceiver(mBluetoothBroadcast, filter);
if (mIsChromebook) {
mHandler = new Handler(Looper.getMainLooper());
mLastBluetoothDevices = new ArrayList<BluetoothDevice>();
// final HIDDeviceManager finalThis = this;
// mHandler.postDelayed(new Runnable() {
// @Override
// public void run() {
// finalThis.chromebookConnectionHandler();
// }
// }, 5000);
}
}
private void shutdownBluetooth() {
try {
mContext.unregisterReceiver(mBluetoothBroadcast);
} catch (Exception e) {
// We may not have registered, that's okay
}
}
// Chromebooks do not pass along ACTION_ACL_CONNECTED / ACTION_ACL_DISCONNECTED properly.
// This function provides a sort of dummy version of that, watching for changes in the
// connected devices and attempting to add controllers as things change.
public void chromebookConnectionHandler() {
if (!mIsChromebook) {
return;
}
ArrayList<BluetoothDevice> disconnected = new ArrayList<BluetoothDevice>();
ArrayList<BluetoothDevice> connected = new ArrayList<BluetoothDevice>();
List<BluetoothDevice> currentConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT);
for (BluetoothDevice bluetoothDevice : currentConnected) {
if (!mLastBluetoothDevices.contains(bluetoothDevice)) {
connected.add(bluetoothDevice);
}
}
for (BluetoothDevice bluetoothDevice : mLastBluetoothDevices) {
if (!currentConnected.contains(bluetoothDevice)) {
disconnected.add(bluetoothDevice);
}
}
mLastBluetoothDevices = currentConnected;
for (BluetoothDevice bluetoothDevice : disconnected) {
disconnectBluetoothDevice(bluetoothDevice);
}
for (BluetoothDevice bluetoothDevice : connected) {
connectBluetoothDevice(bluetoothDevice);
}
final HIDDeviceManager finalThis = this;
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
finalThis.chromebookConnectionHandler();
}
}, 10000);
}
public boolean connectBluetoothDevice(BluetoothDevice bluetoothDevice) {
Log.v(TAG, "connectBluetoothDevice device=" + bluetoothDevice);
synchronized (this) {
if (mBluetoothDevices.containsKey(bluetoothDevice)) {
Log.v(TAG, "Steam controller with address " + bluetoothDevice + " already exists, attempting reconnect");
HIDDeviceBLESteamController device = mBluetoothDevices.get(bluetoothDevice);
device.reconnect();
return false;
}
HIDDeviceBLESteamController device = new HIDDeviceBLESteamController(this, bluetoothDevice);
int id = device.getId();
mBluetoothDevices.put(bluetoothDevice, device);
mDevicesById.put(id, device);
// The Steam Controller will mark itself connected once initialization is complete
}
return true;
}
public void disconnectBluetoothDevice(BluetoothDevice bluetoothDevice) {
synchronized (this) {
HIDDeviceBLESteamController device = mBluetoothDevices.get(bluetoothDevice);
if (device == null)
return;
int id = device.getId();
mBluetoothDevices.remove(bluetoothDevice);
mDevicesById.remove(id);
device.shutdown();
HIDDeviceDisconnected(id);
}
}
public boolean isSteamController(BluetoothDevice bluetoothDevice) {
// Sanity check. If you pass in a null device, by definition it is never a Steam Controller.
if (bluetoothDevice == null) {
return false;
}
// If the device has no local name, we really don't want to try an equality check against it.
if (bluetoothDevice.getName() == null) {
return false;
}
return bluetoothDevice.getName().equals("SteamController") && ((bluetoothDevice.getType() & BluetoothDevice.DEVICE_TYPE_LE) != 0);
}
private void close() {
shutdownUSB();
shutdownBluetooth();
synchronized (this) {
for (HIDDevice device : mDevicesById.values()) {
device.shutdown();
}
mDevicesById.clear();
mBluetoothDevices.clear();
HIDDeviceReleaseCallback();
}
}
public void setFrozen(boolean frozen) {
synchronized (this) {
for (HIDDevice device : mDevicesById.values()) {
device.setFrozen(frozen);
}
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////////////////
private HIDDevice getDevice(int id) {
synchronized (this) {
HIDDevice result = mDevicesById.get(id);
if (result == null) {
Log.v(TAG, "No device for id: " + id);
Log.v(TAG, "Available devices: " + mDevicesById.keySet());
}
return result;
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
////////// JNI interface functions
//////////////////////////////////////////////////////////////////////////////////////////////////////
public boolean openDevice(int deviceID) {
Log.v(TAG, "openDevice deviceID=" + deviceID);
HIDDevice device = getDevice(deviceID);
if (device == null) {
HIDDeviceDisconnected(deviceID);
return false;
}
// Look to see if this is a USB device and we have permission to access it
UsbDevice usbDevice = device.getDevice();
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
HIDDeviceOpenPending(deviceID);
try {
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
} catch (Exception e) {
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
HIDDeviceOpenResult(deviceID, false);
}
return false;
}
try {
return device.open();
} catch (Exception e) {
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
}
return false;
}
public int sendOutputReport(int deviceID, byte[] report) {
try {
//Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
HIDDeviceDisconnected(deviceID);
return -1;
}
return device.sendOutputReport(report);
} catch (Exception e) {
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
}
return -1;
}
public int sendFeatureReport(int deviceID, byte[] report) {
try {
//Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
HIDDeviceDisconnected(deviceID);
return -1;
}
return device.sendFeatureReport(report);
} catch (Exception e) {
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
}
return -1;
}
public boolean getFeatureReport(int deviceID, byte[] report) {
try {
//Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
HIDDeviceDisconnected(deviceID);
return false;
}
return device.getFeatureReport(report);
} catch (Exception e) {
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
}
return false;
}
public void closeDevice(int deviceID) {
try {
Log.v(TAG, "closeDevice deviceID=" + deviceID);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
HIDDeviceDisconnected(deviceID);
return;
}
device.close();
} catch (Exception e) {
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
}
}
//////////////////////////////////////////////////////////////////////////////////////////////////////
/////////////// Native methods
//////////////////////////////////////////////////////////////////////////////////////////////////////
private native void HIDDeviceRegisterCallback();
private native void HIDDeviceReleaseCallback();
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number, int interface_class, int interface_subclass, int interface_protocol);
native void HIDDeviceOpenPending(int deviceID);
native void HIDDeviceOpenResult(int deviceID, boolean opened);
native void HIDDeviceDisconnected(int deviceID);
native void HIDDeviceInputReport(int deviceID, byte[] report);
native void HIDDeviceFeatureReport(int deviceID, byte[] report);
}

+ 309
- 0
modules/SDL2/android-project-ant/src/org/libsdl/app/HIDDeviceUSB.java View File

@ -0,0 +1,309 @@
package org.libsdl.app;
import android.hardware.usb.*;
import android.os.Build;
import android.util.Log;
import java.util.Arrays;
class HIDDeviceUSB implements HIDDevice {
private static final String TAG = "hidapi";
protected HIDDeviceManager mManager;
protected UsbDevice mDevice;
protected int mInterfaceIndex;
protected int mInterface;
protected int mDeviceId;
protected UsbDeviceConnection mConnection;
protected UsbEndpoint mInputEndpoint;
protected UsbEndpoint mOutputEndpoint;
protected InputThread mInputThread;
protected boolean mRunning;
protected boolean mFrozen;
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_index) {
mManager = manager;
mDevice = usbDevice;
mInterfaceIndex = interface_index;
mInterface = mDevice.getInterface(mInterfaceIndex).getId();
mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
mRunning = false;
}
public String getIdentifier() {
return String.format("%s/%x/%x/%d", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId(), mInterfaceIndex);
}
@Override
public int getId() {
return mDeviceId;
}
@Override
public int getVendorId() {
return mDevice.getVendorId();
}
@Override
public int getProductId() {
return mDevice.getProductId();
}
@Override
public String getSerialNumber() {
String result = null;
if (Build.VERSION.SDK_INT >= 21) {
try {
result = mDevice.getSerialNumber();
}
catch (SecurityException exception) {
//Log.w(TAG, "App permissions mean we cannot get serial number for device " + getDeviceName() + " message: " + exception.getMessage());
}
}
if (result == null) {
result = "";
}
return result;
}
@Override
public int getVersion() {
return 0;
}
@Override
public String getManufacturerName() {
String result = null;
if (Build.VERSION.SDK_INT >= 21) {
result = mDevice.getManufacturerName();
}
if (result == null) {
result = String.format("%x", getVendorId());
}
return result;
}
@Override
public String getProductName() {
String result = null;
if (Build.VERSION.SDK_INT >= 21) {
result = mDevice.getProductName();
}
if (result == null) {
result = String.format("%x", getProductId());
}
return result;
}
@Override
public UsbDevice getDevice() {
return mDevice;
}
public String getDeviceName() {
return getManufacturerName() + " " + getProductName() + "(0x" + String.format("%x", getVendorId()) + "/0x" + String.format("%x", getProductId()) + ")";
}
@Override
public boolean open() {
mConnection = mManager.getUSBManager().openDevice(mDevice);
if (mConnection == null) {
Log.w(TAG, "Unable to open USB device " + getDeviceName());
return false;
}
// Force claim our interface
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
if (!mConnection.claimInterface(iface, true)) {
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
close();
return false;
}
// Find the endpoints
for (int j = 0; j < iface.getEndpointCount(); j++) {
UsbEndpoint endpt = iface.getEndpoint(j);
switch (endpt.getDirection()) {
case UsbConstants.USB_DIR_IN:
if (mInputEndpoint == null) {
mInputEndpoint = endpt;
}
break;
case UsbConstants.USB_DIR_OUT:
if (mOutputEndpoint == null) {
mOutputEndpoint = endpt;
}
break;
}
}
// Make sure the required endpoints were present
if (mInputEndpoint == null || mOutputEndpoint == null) {
Log.w(TAG, "Missing required endpoint on USB device " + getDeviceName());
close();
return false;
}
// Start listening for input
mRunning = true;
mInputThread = new InputThread();
mInputThread.start();
return true;
}
@Override
public int sendFeatureReport(byte[] report) {
int res = -1;
int offset = 0;
int length = report.length;
boolean skipped_report_id = false;
byte report_number = report[0];
if (report_number == 0x0) {
++offset;
--length;
skipped_report_id = true;
}
res = mConnection.controlTransfer(
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
0x09/*HID set_report*/,
(3/*HID feature*/ << 8) | report_number,
mInterface,
report, offset, length,
1000/*timeout millis*/);
if (res < 0) {
Log.w(TAG, "sendFeatureReport() returned " + res + " on device " + getDeviceName());
return -1;
}
if (skipped_report_id) {
++length;
}
return length;
}
@Override
public int sendOutputReport(byte[] report) {
int r = mConnection.bulkTransfer(mOutputEndpoint, report, report.length, 1000);
if (r != report.length) {
Log.w(TAG, "sendOutputReport() returned " + r + " on device " + getDeviceName());
}
return r;
}
@Override
public boolean getFeatureReport(byte[] report) {
int res = -1;
int offset = 0;
int length = report.length;
boolean skipped_report_id = false;
byte report_number = report[0];
if (report_number == 0x0) {
/* Offset the return buffer by 1, so that the report ID
will remain in byte 0. */
++offset;
--length;
skipped_report_id = true;
}
res = mConnection.controlTransfer(
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
0x01/*HID get_report*/,
(3/*HID feature*/ << 8) | report_number,
mInterface,
report, offset, length,
1000/*timeout millis*/);
if (res < 0) {
Log.w(TAG, "getFeatureReport() returned " + res + " on device " + getDeviceName());
return false;
}
if (skipped_report_id) {
++res;
++length;
}
byte[] data;
if (res == length) {
data = report;
} else {
data = Arrays.copyOfRange(report, 0, res);
}
mManager.HIDDeviceFeatureReport(mDeviceId, data);
return true;
}
@Override
public void close() {
mRunning = false;
if (mInputThread != null) {
while (mInputThread.isAlive()) {
mInputThread.interrupt();
try {
mInputThread.join();
} catch (InterruptedException e) {
// Keep trying until we're done
}
}
mInputThread = null;
}
if (mConnection != null) {
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
mConnection.releaseInterface(iface);
mConnection.close();
mConnection = null;
}
}
@Override
public void shutdown() {
close();
mManager = null;
}
@Override
public void setFrozen(boolean frozen) {
mFrozen = frozen;
}
protected class InputThread extends Thread {
@Override
public void run() {
int packetSize = mInputEndpoint.getMaxPacketSize();
byte[] packet = new byte[packetSize];
while (mRunning) {
int r;
try
{
r = mConnection.bulkTransfer(mInputEndpoint, packet, packetSize, 1000);
}
catch (Exception e)
{
Log.v(TAG, "Exception in UsbDeviceConnection bulktransfer: " + e);
break;
}
if (r < 0) {
// Could be a timeout or an I/O error
}
if (r > 0) {
byte[] data;
if (r == packetSize) {
data = packet;
} else {
data = Arrays.copyOfRange(packet, 0, r);
}
if (!mFrozen) {
mManager.HIDDeviceInputReport(mDeviceId, data);
}
}
}
}
}
}

+ 84
- 0
modules/SDL2/android-project-ant/src/org/libsdl/app/SDL.java View File

@ -0,0 +1,84 @@
package org.libsdl.app;
import android.content.Context;
import java.lang.reflect.*;
/**
SDL library initialization
*/
public class SDL {
// This function should be called first and sets up the native code
// so it can call into the Java classes
public static void setupJNI() {
SDLActivity.nativeSetupJNI();
SDLAudioManager.nativeSetupJNI();
SDLControllerManager.nativeSetupJNI();
}
// This function should be called each time the activity is started
public static void initialize() {
setContext(null);
SDLActivity.initialize();
SDLAudioManager.initialize();
SDLControllerManager.initialize();
}
// This function stores the current activity (SDL or not)
public static void setContext(Context context) {
mContext = context;
}
public static Context getContext() {
return mContext;
}
public static void loadLibrary(String libraryName) throws UnsatisfiedLinkError, SecurityException, NullPointerException {
if (libraryName == null) {
throw new NullPointerException("No library name provided.");
}
try {
// Let's see if we have ReLinker available in the project. This is necessary for
// some projects that have huge numbers of local libraries bundled, and thus may
// trip a bug in Android's native library loader which ReLinker works around. (If
// loadLibrary works properly, ReLinker will simply use the normal Android method
// internally.)
//
// To use ReLinker, just add it as a dependency. For more information, see
// https://github.com/KeepSafe/ReLinker for ReLinker's repository.
//
Class relinkClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker");
Class relinkListenerClass = mContext.getClassLoader().loadClass("com.getkeepsafe.relinker.ReLinker$LoadListener");
Class contextClass = mContext.getClassLoader().loadClass("android.content.Context");
Class stringClass = mContext.getClassLoader().loadClass("java.lang.String");
// Get a 'force' instance of the ReLinker, so we can ensure libraries are reinstalled if
// they've changed during updates.
Method forceMethod = relinkClass.getDeclaredMethod("force");
Object relinkInstance = forceMethod.invoke(null);
Class relinkInstanceClass = relinkInstance.getClass();
// Actually load the library!
Method loadMethod = relinkInstanceClass.getDeclaredMethod("loadLibrary", contextClass, stringClass, stringClass, relinkListenerClass);
loadMethod.invoke(relinkInstance, mContext, libraryName, null, null);
}
catch (final Throwable e) {
// Fall back
try {
System.loadLibrary(libraryName);
}
catch (final UnsatisfiedLinkError ule) {
throw ule;
}
catch (final SecurityException se) {
throw se;
}
}
}
protected static Context mContext;
}

+ 2356
- 0
modules/SDL2/android-project-ant/src/org/libsdl/app/SDLActivity.java
File diff suppressed because it is too large
View File


+ 387
- 0
modules/SDL2/android-project-ant/src/org/libsdl/app/SDLAudioManager.java View File

@ -0,0 +1,387 @@
package org.libsdl.app;
import android.media.*;
import android.os.Build;
import android.util.Log;
public class SDLAudioManager
{
protected static final String TAG = "SDLAudio";
protected static AudioTrack mAudioTrack;
protected static AudioRecord mAudioRecord;
public static void initialize() {
mAudioTrack = null;
mAudioRecord = null;
}
// Audio
protected static String getAudioFormatString(int audioFormat) {
switch (audioFormat) {
case AudioFormat.ENCODING_PCM_8BIT:
return "8-bit";
case AudioFormat.ENCODING_PCM_16BIT:
return "16-bit";
case AudioFormat.ENCODING_PCM_FLOAT:
return "float";
default:
return Integer.toString(audioFormat);
}
}
protected static int[] open(boolean isCapture, int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
int channelConfig;
int sampleSize;
int frameSize;
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", requested " + desiredFrames + " frames of " + desiredChannels + " channel " + getAudioFormatString(audioFormat) + " audio at " + sampleRate + " Hz");
/* On older devices let's use known good settings */
if (Build.VERSION.SDK_INT < 21) {
if (desiredChannels > 2) {
desiredChannels = 2;
}
if (sampleRate < 8000) {
sampleRate = 8000;
} else if (sampleRate > 48000) {
sampleRate = 48000;
}
}
if (audioFormat == AudioFormat.ENCODING_PCM_FLOAT) {
int minSDKVersion = (isCapture ? 23 : 21);
if (Build.VERSION.SDK_INT < minSDKVersion) {
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
}
}
switch (audioFormat)
{
case AudioFormat.ENCODING_PCM_8BIT:
sampleSize = 1;
break;
case AudioFormat.ENCODING_PCM_16BIT:
sampleSize = 2;
break;
case AudioFormat.ENCODING_PCM_FLOAT:
sampleSize = 4;
break;
default:
Log.v(TAG, "Requested format " + audioFormat + ", getting ENCODING_PCM_16BIT");
audioFormat = AudioFormat.ENCODING_PCM_16BIT;
sampleSize = 2;
break;
}
if (isCapture) {
switch (desiredChannels) {
case 1:
channelConfig = AudioFormat.CHANNEL_IN_MONO;
break;
case 2:
channelConfig = AudioFormat.CHANNEL_IN_STEREO;
break;
default:
Log.v(TAG, "Requested " + desiredChannels + " channels, getting stereo");
desiredChannels = 2;
channelConfig = AudioFormat.CHANNEL_IN_STEREO;
break;
}
} else {
switch (desiredChannels) {
case 1:
channelConfig = AudioFormat.CHANNEL_OUT_MONO;
break;
case 2:
channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
break;
case 3:
channelConfig = AudioFormat.CHANNEL_OUT_STEREO | AudioFormat.CHANNEL_OUT_FRONT_CENTER;
break;
case 4:
channelConfig = AudioFormat.CHANNEL_OUT_QUAD;
break;
case 5:
channelConfig = AudioFormat.CHANNEL_OUT_QUAD | AudioFormat.CHANNEL_OUT_FRONT_CENTER;
break;
case 6:
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
break;
case 7:
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1 | AudioFormat.CHANNEL_OUT_BACK_CENTER;
break;
case 8:
if (Build.VERSION.SDK_INT >= 23) {
channelConfig = AudioFormat.CHANNEL_OUT_7POINT1_SURROUND;
} else {
Log.v(TAG, "Requested " + desiredChannels + " channels, getting 5.1 surround");
desiredChannels = 6;
channelConfig = AudioFormat.CHANNEL_OUT_5POINT1;
}
break;
default:
Log.v(TAG, "Requested " + desiredChannels + " channels, getting stereo");
desiredChannels = 2;
channelConfig = AudioFormat.CHANNEL_OUT_STEREO;
break;
}
/*
Log.v(TAG, "Speaker configuration (and order of channels):");
if ((channelConfig & 0x00000004) != 0) {
Log.v(TAG, " CHANNEL_OUT_FRONT_LEFT");
}
if ((channelConfig & 0x00000008) != 0) {
Log.v(TAG, " CHANNEL_OUT_FRONT_RIGHT");
}
if ((channelConfig & 0x00000010) != 0) {
Log.v(TAG, " CHANNEL_OUT_FRONT_CENTER");
}
if ((channelConfig & 0x00000020) != 0) {
Log.v(TAG, " CHANNEL_OUT_LOW_FREQUENCY");
}
if ((channelConfig & 0x00000040) != 0) {
Log.v(TAG, " CHANNEL_OUT_BACK_LEFT");
}
if ((channelConfig & 0x00000080) != 0) {
Log.v(TAG, " CHANNEL_OUT_BACK_RIGHT");
}
if ((channelConfig & 0x00000100) != 0) {
Log.v(TAG, " CHANNEL_OUT_FRONT_LEFT_OF_CENTER");
}
if ((channelConfig & 0x00000200) != 0) {
Log.v(TAG, " CHANNEL_OUT_FRONT_RIGHT_OF_CENTER");
}
if ((channelConfig & 0x00000400) != 0) {
Log.v(TAG, " CHANNEL_OUT_BACK_CENTER");
}
if ((channelConfig & 0x00000800) != 0) {
Log.v(TAG, " CHANNEL_OUT_SIDE_LEFT");
}
if ((channelConfig & 0x00001000) != 0) {
Log.v(TAG, " CHANNEL_OUT_SIDE_RIGHT");
}
*/
}
frameSize = (sampleSize * desiredChannels);
// Let the user pick a larger buffer if they really want -- but ye
// gods they probably shouldn't, the minimums are horrifyingly high
// latency already
int minBufferSize;
if (isCapture) {
minBufferSize = AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat);
} else {
minBufferSize = AudioTrack.getMinBufferSize(sampleRate, channelConfig, audioFormat);
}
desiredFrames = Math.max(desiredFrames, (minBufferSize + frameSize - 1) / frameSize);
int[] results = new int[4];
if (isCapture) {
if (mAudioRecord == null) {
mAudioRecord = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, sampleRate,
channelConfig, audioFormat, desiredFrames * frameSize);
// see notes about AudioTrack state in audioOpen(), above. Probably also applies here.
if (mAudioRecord.getState() != AudioRecord.STATE_INITIALIZED) {
Log.e(TAG, "Failed during initialization of AudioRecord");
mAudioRecord.release();
mAudioRecord = null;
return null;
}
mAudioRecord.startRecording();
}
results[0] = mAudioRecord.getSampleRate();
results[1] = mAudioRecord.getAudioFormat();
results[2] = mAudioRecord.getChannelCount();
results[3] = desiredFrames;
} else {
if (mAudioTrack == null) {
mAudioTrack = new AudioTrack(AudioManager.STREAM_MUSIC, sampleRate, channelConfig, audioFormat, desiredFrames * frameSize, AudioTrack.MODE_STREAM);
// Instantiating AudioTrack can "succeed" without an exception and the track may still be invalid
// Ref: https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/media/java/android/media/AudioTrack.java
// Ref: http://developer.android.com/reference/android/media/AudioTrack.html#getState()
if (mAudioTrack.getState() != AudioTrack.STATE_INITIALIZED) {
/* Try again, with safer values */
Log.e(TAG, "Failed during initialization of Audio Track");
mAudioTrack.release();
mAudioTrack = null;
return null;
}
mAudioTrack.play();
}
results[0] = mAudioTrack.getSampleRate();
results[1] = mAudioTrack.getAudioFormat();
results[2] = mAudioTrack.getChannelCount();
results[3] = desiredFrames;
}
Log.v(TAG, "Opening " + (isCapture ? "capture" : "playback") + ", got " + results[3] + " frames of " + results[2] + " channel " + getAudioFormatString(results[1]) + " audio at " + results[0] + " Hz");
return results;
}
/**
* This method is called by SDL using JNI.
*/
public static int[] audioOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
return open(false, sampleRate, audioFormat, desiredChannels, desiredFrames);
}
/**
* This method is called by SDL using JNI.
*/
public static void audioWriteFloatBuffer(float[] buffer) {
if (mAudioTrack == null) {
Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
return;
}
for (int i = 0; i < buffer.length;) {
int result = mAudioTrack.write(buffer, i, buffer.length - i, AudioTrack.WRITE_BLOCKING);
if (result > 0) {
i += result;
} else if (result == 0) {
try {
Thread.sleep(1);
} catch(InterruptedException e) {
// Nom nom
}
} else {
Log.w(TAG, "SDL audio: error return from write(float)");
return;
}
}
}
/**
* This method is called by SDL using JNI.
*/
public static void audioWriteShortBuffer(short[] buffer) {
if (mAudioTrack == null) {
Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
return;
}
for (int i = 0; i < buffer.length;) {
int result = mAudioTrack.write(buffer, i, buffer.length - i);
if (result > 0) {
i += result;
} else if (result == 0) {
try {
Thread.sleep(1);
} catch(InterruptedException e) {
// Nom nom
}
} else {
Log.w(TAG, "SDL audio: error return from write(short)");
return;
}
}
}
/**
* This method is called by SDL using JNI.
*/
public static void audioWriteByteBuffer(byte[] buffer) {
if (mAudioTrack == null) {
Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
return;
}
for (int i = 0; i < buffer.length; ) {
int result = mAudioTrack.write(buffer, i, buffer.length - i);
if (result > 0) {
i += result;
} else if (result == 0) {
try {
Thread.sleep(1);
} catch(InterruptedException e) {
// Nom nom
}
} else {
Log.w(TAG, "SDL audio: error return from write(byte)");
return;
}
}
}
/**
* This method is called by SDL using JNI.
*/
public static int[] captureOpen(int sampleRate, int audioFormat, int desiredChannels, int desiredFrames) {
return open(true, sampleRate, audioFormat, desiredChannels, desiredFrames);
}
/** This method is called by SDL using JNI. */
public static int captureReadFloatBuffer(float[] buffer, boolean blocking) {
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
}
/** This method is called by SDL using JNI. */
public static int captureReadShortBuffer(short[] buffer, boolean blocking) {
if (Build.VERSION.SDK_INT < 23) {
return mAudioRecord.read(buffer, 0, buffer.length);
} else {
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
}
}
/** This method is called by SDL using JNI. */
public static int captureReadByteBuffer(byte[] buffer, boolean blocking) {
if (Build.VERSION.SDK_INT < 23) {
return mAudioRecord.read(buffer, 0, buffer.length);
} else {
return mAudioRecord.read(buffer, 0, buffer.length, blocking ? AudioRecord.READ_BLOCKING : AudioRecord.READ_NON_BLOCKING);
}
}
/** This method is called by SDL using JNI. */
public static void audioClose() {
if (mAudioTrack != null) {
mAudioTrack.stop();
mAudioTrack.release();
mAudioTrack = null;
}
}
/** This method is called by SDL using JNI. */
public static void captureClose() {
if (mAudioRecord != null) {
mAudioRecord.stop();
mAudioRecord.release();
mAudioRecord = null;
}
}
/** This method is called by SDL using JNI. */
public static void audioSetThreadPriority(boolean iscapture, int device_id) {
try {
/* Set thread name */
if (iscapture) {
Thread.currentThread().setName("SDLAudioC" + device_id);
} else {
Thread.currentThread().setName("SDLAudioP" + device_id);
}
/* Set thread priority */
android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_AUDIO);
} catch (Exception e) {
Log.v(TAG, "modify thread properties failed " + e.toString());
}
}
public static native int nativeSetupJNI();
}

+ 788
- 0
modules/SDL2/android-project-ant/src/org/libsdl/app/SDLControllerManager.java View File

@ -0,0 +1,788 @@
package org.libsdl.app;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import android.content.Context;
import android.os.*;
import android.view.*;
import android.util.Log;
public class SDLControllerManager
{
public static native int nativeSetupJNI();
public static native int nativeAddJoystick(int device_id, String name, String desc,
int vendor_id, int product_id,
boolean is_accelerometer, int button_mask,
int naxes, int nhats, int nballs);
public static native int nativeRemoveJoystick(int device_id);
public static native int nativeAddHaptic(int device_id, String name);
public static native int nativeRemoveHaptic(int device_id);
public static native int onNativePadDown(int device_id, int keycode);
public static native int onNativePadUp(int device_id, int keycode);
public static native void onNativeJoy(int device_id, int axis,
float value);
public static native void onNativeHat(int device_id, int hat_id,
int x, int y);
protected static SDLJoystickHandler mJoystickHandler;
protected static SDLHapticHandler mHapticHandler;
private static final String TAG = "SDLControllerManager";
public static void initialize() {
if (mJoystickHandler == null) {
if (Build.VERSION.SDK_INT >= 19) {
mJoystickHandler = new SDLJoystickHandler_API19();
} else {
mJoystickHandler = new SDLJoystickHandler_API16();
}
}
if (mHapticHandler == null) {
if (Build.VERSION.SDK_INT >= 26) {
mHapticHandler = new SDLHapticHandler_API26();
} else {
mHapticHandler = new SDLHapticHandler();
}
}
}
// Joystick glue code, just a series of stubs that redirect to the SDLJoystickHandler instance
public static boolean handleJoystickMotionEvent(MotionEvent event) {
return mJoystickHandler.handleMotionEvent(event);
}
/**
* This method is called by SDL using JNI.
*/
public static void pollInputDevices() {
mJoystickHandler.pollInputDevices();
}
/**
* This method is called by SDL using JNI.
*/
public static void pollHapticDevices() {
mHapticHandler.pollHapticDevices();
}
/**
* This method is called by SDL using JNI.
*/
public static void hapticRun(int device_id, float intensity, int length) {
mHapticHandler.run(device_id, intensity, length);
}
/**
* This method is called by SDL using JNI.
*/
public static void hapticStop(int device_id)
{
mHapticHandler.stop(device_id);
}
// Check if a given device is considered a possible SDL joystick
public static boolean isDeviceSDLJoystick(int deviceId) {
InputDevice device = InputDevice.getDevice(deviceId);
// We cannot use InputDevice.isVirtual before API 16, so let's accept
// only nonnegative device ids (VIRTUAL_KEYBOARD equals -1)
if ((device == null) || (deviceId < 0)) {
return false;
}
int sources = device.getSources();
/* This is called for every button press, so let's not spam the logs */
/**
if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
Log.v(TAG, "Input device " + device.getName() + " has class joystick.");
}
if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) {
Log.v(TAG, "Input device " + device.getName() + " is a dpad.");
}
if ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD) {
Log.v(TAG, "Input device " + device.getName() + " is a gamepad.");
}
**/
return ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ||
((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
);
}
}
class SDLJoystickHandler {
/**
* Handles given MotionEvent.
* @param event the event to be handled.
* @return if given event was processed.
*/
public boolean handleMotionEvent(MotionEvent event) {
return false;
}
/**
* Handles adding and removing of input devices.
*/
public void pollInputDevices() {
}
}
/* Actual joystick functionality available for API >= 12 devices */
class SDLJoystickHandler_API16 extends SDLJoystickHandler {
static class SDLJoystick {
public int device_id;
public String name;
public String desc;
public ArrayList<InputDevice.MotionRange> axes;
public ArrayList<InputDevice.MotionRange> hats;
}
static class RangeComparator implements Comparator<InputDevice.MotionRange> {
@Override
public int compare(InputDevice.MotionRange arg0, InputDevice.MotionRange arg1) {
// Some controllers, like the Moga Pro 2, return AXIS_GAS (22) for right trigger and AXIS_BRAKE (23) for left trigger - swap them so they're sorted in the right order for SDL
int arg0Axis = arg0.getAxis();
int arg1Axis = arg1.getAxis();
if (arg0Axis == MotionEvent.AXIS_GAS) {
arg0Axis = MotionEvent.AXIS_BRAKE;
} else if (arg0Axis == MotionEvent.AXIS_BRAKE) {
arg0Axis = MotionEvent.AXIS_GAS;
}
if (arg1Axis == MotionEvent.AXIS_GAS) {
arg1Axis = MotionEvent.AXIS_BRAKE;
} else if (arg1Axis == MotionEvent.AXIS_BRAKE) {
arg1Axis = MotionEvent.AXIS_GAS;
}
return arg0Axis - arg1Axis;
}
}
private ArrayList<SDLJoystick> mJoysticks;
public SDLJoystickHandler_API16() {
mJoysticks = new ArrayList<SDLJoystick>();
}
@Override
public void pollInputDevices() {
int[] deviceIds = InputDevice.getDeviceIds();
for(int i=0; i < deviceIds.length; ++i) {
SDLJoystick joystick = getJoystick(deviceIds[i]);
if (joystick == null) {
joystick = new SDLJoystick();
InputDevice joystickDevice = InputDevice.getDevice(deviceIds[i]);
if (SDLControllerManager.isDeviceSDLJoystick(deviceIds[i])) {
joystick.device_id = deviceIds[i];
joystick.name = joystickDevice.getName();
joystick.desc = getJoystickDescriptor(joystickDevice);
joystick.axes = new ArrayList<InputDevice.MotionRange>();
joystick.hats = new ArrayList<InputDevice.MotionRange>();
List<InputDevice.MotionRange> ranges = joystickDevice.getMotionRanges();
Collections.sort(ranges, new RangeComparator());
for (InputDevice.MotionRange range : ranges ) {
if ((range.getSource() & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
if (range.getAxis() == MotionEvent.AXIS_HAT_X ||
range.getAxis() == MotionEvent.AXIS_HAT_Y) {
joystick.hats.add(range);
}
else {
joystick.axes.add(range);
}
}
}
mJoysticks.add(joystick);
SDLControllerManager.nativeAddJoystick(joystick.device_id, joystick.name, joystick.desc, getVendorId(joystickDevice), getProductId(joystickDevice), false, getButtonMask(joystickDevice), joystick.axes.size(), joystick.hats.size()/2, 0);
}
}
}
/* Check removed devices */
ArrayList<Integer> removedDevices = new ArrayList<Integer>();
for(int i=0; i < mJoysticks.size(); i++) {
int device_id = mJoysticks.get(i).device_id;
int j;
for (j=0; j < deviceIds.length; j++) {
if (device_id == deviceIds[j]) break;
}
if (j == deviceIds.length) {
removedDevices.add(Integer.valueOf(device_id));
}
}
for(int i=0; i < removedDevices.size(); i++) {
int device_id = removedDevices.get(i).intValue();
SDLControllerManager.nativeRemoveJoystick(device_id);
for (int j=0; j < mJoysticks.size(); j++) {
if (mJoysticks.get(j).device_id == device_id) {
mJoysticks.remove(j);
break;
}
}
}
}
protected SDLJoystick getJoystick(int device_id) {
for(int i=0; i < mJoysticks.size(); i++) {
if (mJoysticks.get(i).device_id == device_id) {
return mJoysticks.get(i);
}
}
return null;
}
@Override
public boolean handleMotionEvent(MotionEvent event) {
if ((event.getSource() & InputDevice.SOURCE_JOYSTICK) != 0) {
int actionPointerIndex = event.getActionIndex();
int action = event.getActionMasked();
switch(action) {
case MotionEvent.ACTION_MOVE:
SDLJoystick joystick = getJoystick(event.getDeviceId());
if ( joystick != null ) {
for (int i = 0; i < joystick.axes.size(); i++) {
InputDevice.MotionRange range = joystick.axes.get(i);
/* Normalize the value to -1...1 */
float value = ( event.getAxisValue( range.getAxis(), actionPointerIndex) - range.getMin() ) / range.getRange() * 2.0f - 1.0f;
SDLControllerManager.onNativeJoy(joystick.device_id, i, value );
}
for (int i = 0; i < joystick.hats.size(); i+=2) {
int hatX = Math.round(event.getAxisValue( joystick.hats.get(i).getAxis(), actionPointerIndex ) );
int hatY = Math.round(event.getAxisValue( joystick.hats.get(i+1).getAxis(), actionPointerIndex ) );
SDLControllerManager.onNativeHat(joystick.device_id, i/2, hatX, hatY );
}
}
break;
default:
break;
}
}
return true;
}
public String getJoystickDescriptor(InputDevice joystickDevice) {
String desc = joystickDevice.getDescriptor();
if (desc != null && !desc.isEmpty()) {
return desc;
}
return joystickDevice.getName();
}
public int getProductId(InputDevice joystickDevice) {
return 0;
}
public int getVendorId(InputDevice joystickDevice) {
return 0;
}
public int getButtonMask(InputDevice joystickDevice) {
return -1;
}
}
class SDLJoystickHandler_API19 extends SDLJoystickHandler_API16 {
@Override
public int getProductId(InputDevice joystickDevice) {
return joystickDevice.getProductId();
}
@Override
public int getVendorId(InputDevice joystickDevice) {
return joystickDevice.getVendorId();
}
@Override
public int getButtonMask(InputDevice joystickDevice) {
int button_mask = 0;
int[] keys = new int[] {
KeyEvent.KEYCODE_BUTTON_A,
KeyEvent.KEYCODE_BUTTON_B,
KeyEvent.KEYCODE_BUTTON_X,
KeyEvent.KEYCODE_BUTTON_Y,
KeyEvent.KEYCODE_BACK,
KeyEvent.KEYCODE_BUTTON_MODE,
KeyEvent.KEYCODE_BUTTON_START,
KeyEvent.KEYCODE_BUTTON_THUMBL,
KeyEvent.KEYCODE_BUTTON_THUMBR,
KeyEvent.KEYCODE_BUTTON_L1,
KeyEvent.KEYCODE_BUTTON_R1,
KeyEvent.KEYCODE_DPAD_UP,
KeyEvent.KEYCODE_DPAD_DOWN,
KeyEvent.KEYCODE_DPAD_LEFT,
KeyEvent.KEYCODE_DPAD_RIGHT,
KeyEvent.KEYCODE_BUTTON_SELECT,
KeyEvent.KEYCODE_DPAD_CENTER,
// These don't map into any SDL controller buttons directly
KeyEvent.KEYCODE_BUTTON_L2,
KeyEvent.KEYCODE_BUTTON_R2,
KeyEvent.KEYCODE_BUTTON_C,
KeyEvent.KEYCODE_BUTTON_Z,
KeyEvent.KEYCODE_BUTTON_1,
KeyEvent.KEYCODE_BUTTON_2,
KeyEvent.KEYCODE_BUTTON_3,
KeyEvent.KEYCODE_BUTTON_4,
KeyEvent.KEYCODE_BUTTON_5,
KeyEvent.KEYCODE_BUTTON_6,
KeyEvent.KEYCODE_BUTTON_7,
KeyEvent.KEYCODE_BUTTON_8,
KeyEvent.KEYCODE_BUTTON_9,
KeyEvent.KEYCODE_BUTTON_10,
KeyEvent.KEYCODE_BUTTON_11,
KeyEvent.KEYCODE_BUTTON_12,
KeyEvent.KEYCODE_BUTTON_13,
KeyEvent.KEYCODE_BUTTON_14,
KeyEvent.KEYCODE_BUTTON_15,
KeyEvent.KEYCODE_BUTTON_16,
};
int[] masks = new int[] {
(1 << 0), // A -> A
(1 << 1), // B -> B
(1 << 2), // X -> X
(1 << 3), // Y -> Y
(1 << 4), // BACK -> BACK
(1 << 5), // MODE -> GUIDE
(1 << 6), // START -> START
(1 << 7), // THUMBL -> LEFTSTICK
(1 << 8), // THUMBR -> RIGHTSTICK
(1 << 9), // L1 -> LEFTSHOULDER
(1 << 10), // R1 -> RIGHTSHOULDER
(1 << 11), // DPAD_UP -> DPAD_UP
(1 << 12), // DPAD_DOWN -> DPAD_DOWN
(1 << 13), // DPAD_LEFT -> DPAD_LEFT
(1 << 14), // DPAD_RIGHT -> DPAD_RIGHT
(1 << 4), // SELECT -> BACK
(1 << 0), // DPAD_CENTER -> A
(1 << 15), // L2 -> ??
(1 << 16), // R2 -> ??
(1 << 17), // C -> ??
(1 << 18), // Z -> ??
(1 << 20), // 1 -> ??
(1 << 21), // 2 -> ??
(1 << 22), // 3 -> ??
(1 << 23), // 4 -> ??
(1 << 24), // 5 -> ??
(1 << 25), // 6 -> ??
(1 << 26), // 7 -> ??
(1 << 27), // 8 -> ??
(1 << 28), // 9 -> ??
(1 << 29), // 10 -> ??
(1 << 30), // 11 -> ??
(1 << 31), // 12 -> ??
// We're out of room...
0xFFFFFFFF, // 13 -> ??
0xFFFFFFFF, // 14 -> ??
0xFFFFFFFF, // 15 -> ??
0xFFFFFFFF, // 16 -> ??
};
boolean[] has_keys = joystickDevice.hasKeys(keys);
for (int i = 0; i < keys.length; ++i) {
if (has_keys[i]) {
button_mask |= masks[i];
}
}
return button_mask;
}
}
class SDLHapticHandler_API26 extends SDLHapticHandler {
@Override
public void run(int device_id, float intensity, int length) {
SDLHaptic haptic = getHaptic(device_id);
if (haptic != null) {
Log.d("SDL", "Rtest: Vibe with intensity " + intensity + " for " + length);
if (intensity == 0.0f) {
stop(device_id);
return;
}
int vibeValue = Math.round(intensity * 255);
if (vibeValue > 255) {
vibeValue = 255;
}
if (vibeValue < 1) {
stop(device_id);
return;
}
try {
haptic.vib.vibrate(VibrationEffect.createOneShot(length, vibeValue));
}
catch (Exception e) {
// Fall back to the generic method, which uses DEFAULT_AMPLITUDE, but works even if
// something went horribly wrong with the Android 8.0 APIs.
haptic.vib.vibrate(length);
}
}
}
}
class SDLHapticHandler {
class SDLHaptic {
public int device_id;
public String name;
public Vibrator vib;
}
private ArrayList<SDLHaptic> mHaptics;
public SDLHapticHandler() {
mHaptics = new ArrayList<SDLHaptic>();
}
public void run(int device_id, float intensity, int length) {
SDLHaptic haptic = getHaptic(device_id);
if (haptic != null) {
haptic.vib.vibrate(length);
}
}
public void stop(int device_id) {
SDLHaptic haptic = getHaptic(device_id);
if (haptic != null) {
haptic.vib.cancel();
}
}
public void pollHapticDevices() {
final int deviceId_VIBRATOR_SERVICE = 999999;
boolean hasVibratorService = false;
int[] deviceIds = InputDevice.getDeviceIds();
// It helps processing the device ids in reverse order
// For example, in the case of the XBox 360 wireless dongle,
// so the first controller seen by SDL matches what the receiver
// considers to be the first controller
for (int i = deviceIds.length - 1; i > -1; i--) {
SDLHaptic haptic = getHaptic(deviceIds[i]);
if (haptic == null) {
InputDevice device = InputDevice.getDevice(deviceIds[i]);
Vibrator vib = device.getVibrator();
if (vib.hasVibrator()) {
haptic = new SDLHaptic();
haptic.device_id = deviceIds[i];
haptic.name = device.getName();
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
}
}
}
/* Check VIBRATOR_SERVICE */
Vibrator vib = (Vibrator) SDL.getContext().getSystemService(Context.VIBRATOR_SERVICE);
if (vib != null) {
hasVibratorService = vib.hasVibrator();
if (hasVibratorService) {
SDLHaptic haptic = getHaptic(deviceId_VIBRATOR_SERVICE);
if (haptic == null) {
haptic = new SDLHaptic();
haptic.device_id = deviceId_VIBRATOR_SERVICE;
haptic.name = "VIBRATOR_SERVICE";
haptic.vib = vib;
mHaptics.add(haptic);
SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
}
}
}
/* Check removed devices */
ArrayList<Integer> removedDevices = new ArrayList<Integer>();
for(int i=0; i < mHaptics.size(); i++) {
int device_id = mHaptics.get(i).device_id;
int j;
for (j=0; j < deviceIds.length; j++) {
if (device_id == deviceIds[j]) break;
}
if (device_id == deviceId_VIBRATOR_SERVICE && hasVibratorService) {
// don't remove the vibrator if it is still present
} else if (j == deviceIds.length) {
removedDevices.add(device_id);
}
}
for(int i=0; i < removedDevices.size(); i++) {
int device_id = removedDevices.get(i);
SDLControllerManager.nativeRemoveHaptic(device_id);
for (int j=0; j < mHaptics.size(); j++) {
if (mHaptics.get(j).device_id == device_id) {
mHaptics.remove(j);
break;
}
}
}
}
protected SDLHaptic getHaptic(int device_id) {
for(int i=0; i < mHaptics.size(); i++) {
if (mHaptics.get(i).device_id == device_id) {
return mHaptics.get(i);
}
}
return null;
}
}
class SDLGenericMotionListener_API12 implements View.OnGenericMotionListener {
// Generic Motion (mouse hover, joystick...) events go here
@Override
public boolean onGenericMotion(View v, MotionEvent event) {
float x, y;
int action;
switch ( event.getSource() ) {
case InputDevice.SOURCE_JOYSTICK:
case InputDevice.SOURCE_GAMEPAD:
case InputDevice.SOURCE_DPAD:
return SDLControllerManager.handleJoystickMotionEvent(event);
case InputDevice.SOURCE_MOUSE:
action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_SCROLL:
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
SDLActivity.onNativeMouse(0, action, x, y, false);
return true;
case MotionEvent.ACTION_HOVER_MOVE:
x = event.getX(0);
y = event.getY(0);
SDLActivity.onNativeMouse(0, action, x, y, false);
return true;
default:
break;
}
break;
default:
break;
}
// Event was not managed
return false;
}
public boolean supportsRelativeMouse() {
return false;
}
public boolean inRelativeMode() {
return false;
}
public boolean setRelativeMouseEnabled(boolean enabled) {
return false;
}
public void reclaimRelativeMouseModeIfNeeded()
{
}
public float getEventX(MotionEvent event) {
return event.getX(0);
}
public float getEventY(MotionEvent event) {
return event.getY(0);
}
}
class SDLGenericMotionListener_API24 extends SDLGenericMotionListener_API12 {
// Generic Motion (mouse hover, joystick...) events go here
private boolean mRelativeModeEnabled;
@Override
public boolean onGenericMotion(View v, MotionEvent event) {
// Handle relative mouse mode
if (mRelativeModeEnabled) {
if (event.getSource() == InputDevice.SOURCE_MOUSE) {
int action = event.getActionMasked();
if (action == MotionEvent.ACTION_HOVER_MOVE) {
float x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
float y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
SDLActivity.onNativeMouse(0, action, x, y, true);
return true;
}
}
}
// Event was not managed, call SDLGenericMotionListener_API12 method
return super.onGenericMotion(v, event);
}
@Override
public boolean supportsRelativeMouse() {
return true;
}
@Override
public boolean inRelativeMode() {
return mRelativeModeEnabled;
}
@Override
public boolean setRelativeMouseEnabled(boolean enabled) {
mRelativeModeEnabled = enabled;
return true;
}
@Override
public float getEventX(MotionEvent event) {
if (mRelativeModeEnabled) {
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
}
else {
return event.getX(0);
}
}
@Override
public float getEventY(MotionEvent event) {
if (mRelativeModeEnabled) {
return event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
}
else {
return event.getY(0);
}
}
}
class SDLGenericMotionListener_API26 extends SDLGenericMotionListener_API24 {
// Generic Motion (mouse hover, joystick...) events go here
private boolean mRelativeModeEnabled;
@Override
public boolean onGenericMotion(View v, MotionEvent event) {
float x, y;
int action;
switch ( event.getSource() ) {
case InputDevice.SOURCE_JOYSTICK:
case InputDevice.SOURCE_GAMEPAD:
case InputDevice.SOURCE_DPAD:
return SDLControllerManager.handleJoystickMotionEvent(event);
case InputDevice.SOURCE_MOUSE:
// DeX desktop mouse cursor is a separate non-standard input type.
case InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN:
action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_SCROLL:
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
SDLActivity.onNativeMouse(0, action, x, y, false);
return true;
case MotionEvent.ACTION_HOVER_MOVE:
x = event.getX(0);
y = event.getY(0);
SDLActivity.onNativeMouse(0, action, x, y, false);
return true;
default:
break;
}
break;
case InputDevice.SOURCE_MOUSE_RELATIVE:
action = event.getActionMasked();
switch (action) {
case MotionEvent.ACTION_SCROLL:
x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
SDLActivity.onNativeMouse(0, action, x, y, false);
return true;
case MotionEvent.ACTION_HOVER_MOVE:
x = event.getX(0);
y = event.getY(0);
SDLActivity.onNativeMouse(0, action, x, y, true);
return true;
default:
break;
}
break;
default:
break;
}
// Event was not managed
return false;
}
@Override
public boolean supportsRelativeMouse() {
return (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27));
}
@Override
public boolean inRelativeMode() {
return mRelativeModeEnabled;
}
@Override
public boolean setRelativeMouseEnabled(boolean enabled) {
if (!SDLActivity.isDeXMode() || (Build.VERSION.SDK_INT >= 27)) {
if (enabled) {
SDLActivity.getContentView().requestPointerCapture();
}
else {
SDLActivity.getContentView().releasePointerCapture();
}
mRelativeModeEnabled = enabled;
return true;
}
else
{
return false;
}
}
@Override
public void reclaimRelativeMouseModeIfNeeded()
{
if (mRelativeModeEnabled && !SDLActivity.isDeXMode()) {
SDLActivity.getContentView().requestPointerCapture();
}
}
@Override
public float getEventX(MotionEvent event) {
// Relative mouse in capture mode will only have relative for X/Y
return event.getX(0);
}
@Override
public float getEventY(MotionEvent event) {
// Relative mouse in capture mode will only have relative for X/Y
return event.getY(0);
}
}

+ 8
- 0
modules/SDL2/android-project/app/build.gradle View File

@ -22,6 +22,11 @@ android {
arguments "APP_PLATFORM=android-16"
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
}
// cmake {
// arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
// // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
// abiFilters 'arm64-v8a'
// }
}
}
buildTypes {
@ -38,6 +43,9 @@ android {
ndkBuild {
path 'jni/Android.mk'
}
// cmake {
// path 'jni/CMakeLists.txt'
// }
}
}

+ 20
- 0
modules/SDL2/android-project/app/jni/CMakeLists.txt View File

@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.6)
project(GAME)
# armeabi-v7a requires cpufeatures library
# include(AndroidNdkModules)
# android_ndk_import_module_cpufeatures()
# SDL sources are in a subfolder named "SDL"
add_subdirectory(SDL)
# Compilation of companion libraries
#add_subdirectory(SDL_image)
#add_subdirectory(SDL_mixer)
#add_subdirectory(SDL_ttf)
# Your game and its CMakeLists.txt are in a subfolder named "src"
add_subdirectory(src)

+ 13
- 0
modules/SDL2/android-project/app/jni/src/CMakeLists.txt View File

@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.6)
project(MY_APP)
find_library(SDL2 SDL2)
add_library(main SHARED)
target_sources(main PRIVATE YourSourceHere.c)
target_link_libraries(main SDL2)

+ 15
- 1
modules/SDL2/android-project/app/src/main/AndroidManifest.xml View File

@ -17,17 +17,31 @@
android:required="false" />
<!-- Game controller support -->
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false" />
<uses-feature
android:name="android.hardware.gamepad"
android:required="false" />
<uses-feature
android:name="android.hardware.usb.host"
android:required="false" />
<!-- External mouse input events -->
<uses-feature
android:name="android.hardware.type.pc"
android:required="false" />
<!-- Audio recording support -->
<!-- if you want to capture audio, uncomment this. -->
<!-- <uses-feature
android:name="android.hardware.microphone"
android:required="false" /> -->
<!-- Allow writing to external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- Allow access to Bluetooth devices -->
<uses-permission android:name="android.permission.BLUETOOTH" />
<!-- Allow access to the vibrator -->
<uses-permission android:name="android.permission.VIBRATE" />
@ -56,7 +70,7 @@
android:label="@string/app_name"
android:alwaysRetainTaskState="true"
android:launchMode="singleInstance"
android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />

+ 3
- 0
modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java View File

@ -1,5 +1,7 @@
package org.libsdl.app;
import android.hardware.usb.UsbDevice;
interface HIDDevice
{
public int getId();
@ -9,6 +11,7 @@ interface HIDDevice
public int getVersion();
public String getManufacturerName();
public String getProductName();
public UsbDevice getDevice();
public boolean open();
public int sendFeatureReport(byte[] report);
public int sendOutputReport(byte[] report);

+ 14
- 8
modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java View File

@ -9,6 +9,7 @@ import android.bluetooth.BluetoothGattDescriptor;
import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothGattService;
import android.hardware.usb.UsbDevice;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
@ -165,13 +166,13 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
mHandler = new Handler(Looper.getMainLooper());
mGatt = connectGatt();
final HIDDeviceBLESteamController finalThis = this;
mHandler.postDelayed(new Runnable() {
@Override
public void run() {
finalThis.checkConnectionForChromebookIssue();
}
}, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
// final HIDDeviceBLESteamController finalThis = this;
// mHandler.postDelayed(new Runnable() {
// @Override
// public void run() {
// finalThis.checkConnectionForChromebookIssue();
// }
// }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
}
public String getIdentifier() {
@ -469,7 +470,7 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
// Only register controller with the native side once it has been fully configured
if (!isRegistered()) {
Log.v(TAG, "Registering Steam Controller with ID: " + getId());
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0);
mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0, 0, 0, 0);
setRegistered();
}
}
@ -563,6 +564,11 @@ class HIDDeviceBLESteamController extends BluetoothGattCallback implements HIDDe
return "Steam Controller";
}
@Override
public UsbDevice getDevice() {
return null;
}
@Override
public boolean open() {
return true;

+ 61
- 74
modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java View File

@ -19,8 +19,9 @@ import android.hardware.usb.*;
import android.os.Handler;
import android.os.Looper;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
public class HIDDeviceManager {
@ -50,7 +51,6 @@ public class HIDDeviceManager {
private Context mContext;
private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>();
private HashMap<UsbDevice, HIDDeviceUSB> mUSBDevices = new HashMap<UsbDevice, HIDDeviceUSB>();
private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
private int mNextDeviceId = 0;
private SharedPreferences mSharedPreferences = null;
@ -241,31 +241,20 @@ public class HIDDeviceManager {
}
}
private boolean isHIDDeviceUSB(UsbDevice usbDevice) {
for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); ++interface_number) {
if (isHIDDeviceInterface(usbDevice, interface_number)) {
return true;
}
}
return false;
}
private boolean isHIDDeviceInterface(UsbDevice usbDevice, int interface_number) {
UsbInterface usbInterface = usbDevice.getInterface(interface_number);
private boolean isHIDDeviceInterface(UsbDevice usbDevice, UsbInterface usbInterface) {
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
return true;
}
if (interface_number == 0) {
if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
return true;
}
if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
return true;
}
return false;
}
private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) {
final int XB360_IFACE_SUBCLASS = 93;
final int XB360_IFACE_PROTOCOL = 1; // Wired only
final int XB360_IFACE_PROTOCOL = 1; // Wired
final int XB360W_IFACE_PROTOCOL = 129; // Wireless
final int[] SUPPORTED_VENDORS = {
0x0079, // GPD Win 2
0x044f, // Thrustmaster
@ -275,8 +264,9 @@ public class HIDDeviceManager {
0x06a3, // Saitek
0x0738, // Mad Catz
0x07ff, // Mad Catz
0x0e6f, // Unknown
0x0e6f, // PDP
0x0f0d, // Hori
0x1038, // SteelSeries
0x11c9, // Nacon
0x12ab, // Unknown
0x1430, // RedOctane
@ -291,7 +281,8 @@ public class HIDDeviceManager {
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS &&
usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL) {
(usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL ||
usbInterface.getInterfaceProtocol() == XB360W_IFACE_PROTOCOL)) {
int vendor_id = usbDevice.getVendorId();
for (int supportedVid : SUPPORTED_VENDORS) {
if (vendor_id == supportedVid) {
@ -308,13 +299,15 @@ public class HIDDeviceManager {
final int[] SUPPORTED_VENDORS = {
0x045e, // Microsoft
0x0738, // Mad Catz
0x0e6f, // Unknown
0x0e6f, // PDP
0x0f0d, // Hori
0x1532, // Razer Wildcat
0x24c6, // PowerA
0x2e24, // Hyperkin
};
if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
if (usbInterface.getId() == 0 &&
usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS &&
usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) {
int vendor_id = usbDevice.getVendorId();
@ -328,45 +321,45 @@ public class HIDDeviceManager {
}
private void handleUsbDeviceAttached(UsbDevice usbDevice) {
if (isHIDDeviceUSB(usbDevice)) {
connectHIDDeviceUSB(usbDevice);
}
connectHIDDeviceUSB(usbDevice);
}
private void handleUsbDeviceDetached(UsbDevice usbDevice) {
HIDDeviceUSB device = mUSBDevices.get(usbDevice);
if (device == null)
return;
int id = device.getId();
mUSBDevices.remove(usbDevice);
mDevicesById.remove(id);
device.shutdown();
HIDDeviceDisconnected(id);
List<Integer> devices = new ArrayList<Integer>();
for (HIDDevice device : mDevicesById.values()) {
if (usbDevice.equals(device.getDevice())) {
devices.add(device.getId());
}
}
for (int id : devices) {
HIDDevice device = mDevicesById.get(id);
mDevicesById.remove(id);
device.shutdown();
HIDDeviceDisconnected(id);
}
}
private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
HIDDeviceUSB device = mUSBDevices.get(usbDevice);
if (device == null)
return;
boolean opened = false;
if (permission_granted) {
opened = device.open();
for (HIDDevice device : mDevicesById.values()) {
if (usbDevice.equals(device.getDevice())) {
boolean opened = false;
if (permission_granted) {
opened = device.open();
}
HIDDeviceOpenResult(device.getId(), opened);
}
}
HIDDeviceOpenResult(device.getId(), opened);
}
private void connectHIDDeviceUSB(UsbDevice usbDevice) {
synchronized (this) {
for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); interface_number++) {
if (isHIDDeviceInterface(usbDevice, interface_number)) {
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_number);
for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
UsbInterface usbInterface = usbDevice.getInterface(interface_index);
if (isHIDDeviceInterface(usbDevice, usbInterface)) {
HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
int id = device.getId();
mUSBDevices.put(usbDevice, device);
mDevicesById.put(id, device);
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), interface_number);
break;
HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), usbInterface.getId(), usbInterface.getInterfaceClass(), usbInterface.getInterfaceSubclass(), usbInterface.getInterfaceProtocol());
}
}
}
@ -563,33 +556,27 @@ public class HIDDeviceManager {
//////////////////////////////////////////////////////////////////////////////////////////////////////
public boolean openDevice(int deviceID) {
Log.v(TAG, "openDevice deviceID=" + deviceID);
HIDDevice device = getDevice(deviceID);
if (device == null) {
HIDDeviceDisconnected(deviceID);
return false;
}
// Look to see if this is a USB device and we have permission to access it
for (HIDDeviceUSB device : mUSBDevices.values()) {
if (deviceID == device.getId()) {
UsbDevice usbDevice = device.getDevice();
if (!mUsbManager.hasPermission(usbDevice)) {
HIDDeviceOpenPending(deviceID);
try {
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
} catch (Exception e) {
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
HIDDeviceOpenResult(deviceID, false);
}
return false;
}
break;
UsbDevice usbDevice = device.getDevice();
if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
HIDDeviceOpenPending(deviceID);
try {
mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
} catch (Exception e) {
Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
HIDDeviceOpenResult(deviceID, false);
}
return false;
}
try {
Log.v(TAG, "openDevice deviceID=" + deviceID);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
HIDDeviceDisconnected(deviceID);
return false;
}
return device.open();
} catch (Exception e) {
Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
@ -599,7 +586,7 @@ public class HIDDeviceManager {
public int sendOutputReport(int deviceID, byte[] report) {
try {
Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
//Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
@ -616,7 +603,7 @@ public class HIDDeviceManager {
public int sendFeatureReport(int deviceID, byte[] report) {
try {
Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
//Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
@ -633,7 +620,7 @@ public class HIDDeviceManager {
public boolean getFeatureReport(int deviceID, byte[] report) {
try {
Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
//Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
HIDDevice device;
device = getDevice(deviceID);
if (device == null) {
@ -672,7 +659,7 @@ public class HIDDeviceManager {
private native void HIDDeviceRegisterCallback();
private native void HIDDeviceReleaseCallback();
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number);
native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number, int interface_class, int interface_subclass, int interface_protocol);
native void HIDDeviceOpenPending(int deviceID);
native void HIDDeviceOpenResult(int deviceID, boolean opened);
native void HIDDeviceDisconnected(int deviceID);

+ 22
- 20
modules/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java View File

@ -11,6 +11,7 @@ class HIDDeviceUSB implements HIDDevice {
protected HIDDeviceManager mManager;
protected UsbDevice mDevice;
protected int mInterfaceIndex;
protected int mInterface;
protected int mDeviceId;
protected UsbDeviceConnection mConnection;
@ -20,16 +21,17 @@ class HIDDeviceUSB implements HIDDevice {
protected boolean mRunning;
protected boolean mFrozen;
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_number) {
public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_index) {
mManager = manager;
mDevice = usbDevice;
mInterface = interface_number;
mInterfaceIndex = interface_index;
mInterface = mDevice.getInterface(mInterfaceIndex).getId();
mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
mRunning = false;
}
public String getIdentifier() {
return String.format("%s/%x/%x", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId());
return String.format("%s/%x/%x/%d", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId(), mInterfaceIndex);
}
@Override
@ -51,7 +53,12 @@ class HIDDeviceUSB implements HIDDevice {
public String getSerialNumber() {
String result = null;
if (Build.VERSION.SDK_INT >= 21) {
result = mDevice.getSerialNumber();
try {
result = mDevice.getSerialNumber();
}
catch (SecurityException exception) {
//Log.w(TAG, "App permissions mean we cannot get serial number for device " + getDeviceName() + " message: " + exception.getMessage());
}
}
if (result == null) {
result = "";
@ -88,6 +95,7 @@ class HIDDeviceUSB implements HIDDevice {
return result;
}
@Override
public UsbDevice getDevice() {
return mDevice;
}
@ -104,19 +112,15 @@ class HIDDeviceUSB implements HIDDevice {
return false;
}
// Force claim all interfaces
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
UsbInterface iface = mDevice.getInterface(i);
if (!mConnection.claimInterface(iface, true)) {
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
close();
return false;
}
// Force claim our interface
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
if (!mConnection.claimInterface(iface, true)) {
Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
close();
return false;
}
// Find the endpoints
UsbInterface iface = mDevice.getInterface(mInterface);
for (int j = 0; j < iface.getEndpointCount(); j++) {
UsbEndpoint endpt = iface.getEndpoint(j);
switch (endpt.getDirection()) {
@ -166,7 +170,7 @@ class HIDDeviceUSB implements HIDDevice {
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
0x09/*HID set_report*/,
(3/*HID feature*/ << 8) | report_number,
0,
mInterface,
report, offset, length,
1000/*timeout millis*/);
@ -210,7 +214,7 @@ class HIDDeviceUSB implements HIDDevice {
UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
0x01/*HID get_report*/,
(3/*HID feature*/ << 8) | report_number,
0,
mInterface,
report, offset, length,
1000/*timeout millis*/);
@ -250,10 +254,8 @@ class HIDDeviceUSB implements HIDDevice {
mInputThread = null;
}
if (mConnection != null) {
for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
UsbInterface iface = mDevice.getInterface(i);
mConnection.releaseInterface(iface);
}
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
mConnection.releaseInterface(iface);
mConnection.close();
mConnection = null;
}

+ 137
- 40
modules/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java View File

@ -4,6 +4,7 @@ import java.io.IOException;
import java.io.InputStream;
import java.util.Arrays;
import java.util.Hashtable;
import java.util.Locale;
import java.lang.reflect.Method;
import java.lang.Math;
@ -62,6 +63,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
protected static final int SDL_ORIENTATION_PORTRAIT_FLIPPED = 4;
protected static int mCurrentOrientation;
protected static Locale mCurrentLocale;
// Handle the state of the native layer
public enum NativeState {
@ -258,6 +260,15 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
// Only record current orientation
SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
try {
if (Build.VERSION.SDK_INT < 24) {
mCurrentLocale = getContext().getResources().getConfiguration().locale;
} else {
mCurrentLocale = getContext().getResources().getConfiguration().getLocales().get(0);
}
} catch(Exception ignored) {
}
setContentView(mLayout);
setWindowStyle(false);
@ -283,10 +294,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
return;
}
if (mHIDDeviceManager != null) {
mHIDDeviceManager.setFrozen(true);
}
SDLActivity.handleNativeState();
}
@ -298,10 +305,6 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
return;
}
if (mHIDDeviceManager != null) {
mHIDDeviceManager.setFrozen(false);
}
SDLActivity.handleNativeState();
}
@ -310,6 +313,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
protected void onPause() {
Log.v(TAG, "onPause()");
super.onPause();
if (mHIDDeviceManager != null) {
mHIDDeviceManager.setFrozen(true);
}
if (!mHasMultiWindow) {
pauseNativeThread();
}
@ -319,6 +326,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
protected void onResume() {
Log.v(TAG, "onResume()");
super.onResume();
if (mHIDDeviceManager != null) {
mHIDDeviceManager.setFrozen(false);
}
if (!mHasMultiWindow) {
resumeNativeThread();
}
@ -407,6 +418,17 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
SDLActivity.nativeLowMemory();
}
@Override
public void onConfigurationChanged(Configuration newConfig) {
Log.v(TAG, "onConfigurationChanged()");
super.onConfigurationChanged(newConfig);
if (mCurrentLocale == null || !mCurrentLocale.equals(newConfig.locale)) {
mCurrentLocale = newConfig.locale;
SDLActivity.onNativeLocaleChanged();
}
}
@Override
protected void onDestroy() {
Log.v(TAG, "onDestroy()");
@ -453,7 +475,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
}
// Default system back button behavior.
super.onBackPressed();
if (!isFinishing()) {
super.onBackPressed();
}
}
// Called by JNI from SDL.
@ -466,7 +490,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
runOnUiThread(new Runnable() {
@Override
public void run() {
SDLActivity.this.superOnBackPressed();
if (!SDLActivity.this.isFinishing()) {
SDLActivity.this.superOnBackPressed();
}
}
});
}
@ -633,6 +659,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
mScreenKeyboardShown = false;
mSurface.requestFocus();
}
break;
case COMMAND_SET_KEEP_SCREEN_ON:
@ -724,7 +752,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
}
}
if (bShouldWait) {
if (bShouldWait && (SDLActivity.getContext() != null)) {
// We'll wait for the surfaceChanged() method, which will notify us
// when called. That way, we know our current size is really the
// size we need, instead of grabbing a size that's still got
@ -777,6 +805,8 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
public static native void nativeSetenv(String name, String value);
public static native void onNativeOrientationChanged(int orientation);
public static native void nativeAddTouch(int touchId, String name);
public static native void nativePermissionResult(int requestCode, boolean result);
public static native void onNativeLocaleChanged();
/**
* This method is called by SDL using JNI.
@ -811,39 +841,62 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
*/
public void setOrientationBis(int w, int h, boolean resizable, String hint)
{
int orientation = -1;
int orientation_landscape = -1;
int orientation_portrait = -1;
/* If set, hint "explicitly controls which UI orientations are allowed". */
if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
} else if (hint.contains("LandscapeRight")) {
orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
} else if (hint.contains("LandscapeLeft")) {
orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
} else if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
}
if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
} else if (hint.contains("Portrait")) {
orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
} else if (hint.contains("PortraitUpsideDown")) {
orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
}
/* no valid hint */
if (orientation == -1) {
boolean is_landscape_allowed = (orientation_landscape == -1 ? false : true);
boolean is_portrait_allowed = (orientation_portrait == -1 ? false : true);
int req = -1; /* Requested orientation */
/* No valid hint, nothing is explicitly allowed */
if (!is_portrait_allowed && !is_landscape_allowed) {
if (resizable) {
/* no fixed orientation */
/* All orientations are allowed */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
} else {
/* Fixed window and nothing specified. Get orientation from w/h of created window */
req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
}
} else {
/* At least one orientation is allowed */
if (resizable) {
if (is_portrait_allowed && is_landscape_allowed) {
/* hint allows both landscape and portrait, promote to full sensor */
req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
} else {
/* Use the only one allowed "orientation" */
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
}
} else {
if (w > h) {
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
/* Fixed window and both orientations are allowed. Choose one. */
if (is_portrait_allowed && is_landscape_allowed) {
req = (w > h ? orientation_landscape : orientation_portrait);
} else {
orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
/* Use the only one allowed "orientation" */
req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
}
}
}
Log.v("SDL", "setOrientation() orientation=" + orientation + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
if (orientation != -1) {
mSingleton.setRequestedOrientation(orientation);
}
Log.v(TAG, "setOrientation() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
mSingleton.setRequestedOrientation(req);
}
/**
@ -970,6 +1023,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
return true;
}
if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
return true;
}
return false;
}
@ -979,6 +1035,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
public static boolean isTablet() {
DisplayMetrics metrics = new DisplayMetrics();
Activity activity = (Activity)getContext();
if (activity == null) {
return false;
}
activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
double dWidthInches = metrics.widthPixels / (double)metrics.xdpi;
@ -994,6 +1053,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
* This method is called by SDL using JNI.
*/
public static boolean isChromebook() {
if (getContext() == null) {
return false;
}
return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
}
@ -1026,6 +1088,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
*/
public static boolean getManifestEnvironmentVariables() {
try {
if (getContext() == null) {
return false;
}
ApplicationInfo applicationInfo = getContext().getPackageManager().getApplicationInfo(getContext().getPackageName(), PackageManager.GET_META_DATA);
Bundle bundle = applicationInfo.metaData;
if (bundle == null) {
@ -1043,7 +1109,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
/* environment variables set! */
return true;
} catch (Exception e) {
Log.v("SDL", "exception " + e.toString());
Log.v(TAG, "exception " + e.toString());
}
return false;
}
@ -1565,6 +1631,32 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
}
return true;
}
/**
* This method is called by SDL using JNI.
*/
public static void requestPermission(String permission, int requestCode) {
if (Build.VERSION.SDK_INT < 23) {
nativePermissionResult(requestCode, true);
return;
}
Activity activity = (Activity)getContext();
if (activity.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
activity.requestPermissions(new String[]{permission}, requestCode);
} else {
nativePermissionResult(requestCode, true);
}
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
nativePermissionResult(requestCode, true);
} else {
nativePermissionResult(requestCode, false);
}
}
}
/**
@ -1590,7 +1682,7 @@ class SDLMain implements Runnable {
Log.v("SDL", "Finished main function");
if (SDLActivity.mSingleton.isFinishing()) {
if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) {
// Activity is already being destroyed
} else {
// Let's finish the Activity
@ -1803,6 +1895,19 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
int deviceId = event.getDeviceId();
int source = event.getSource();
if (source == InputDevice.SOURCE_UNKNOWN) {
InputDevice device = InputDevice.getDevice(deviceId);
if (device != null) {
source = device.getSources();
}
}
// if (event.getAction() == KeyEvent.ACTION_DOWN) {
// Log.v("SDL", "key down: " + keyCode + ", deviceId = " + deviceId + ", source = " + source);
// } else if (event.getAction() == KeyEvent.ACTION_UP) {
// Log.v("SDL", "key up: " + keyCode + ", deviceId = " + deviceId + ", source = " + source);
// }
// Dispatch the different events depending on where they come from
// Some SOURCE_JOYSTICK, SOURCE_DPAD or SOURCE_GAMEPAD are also SOURCE_KEYBOARD
// So, we try to process them as JOYSTICK/DPAD/GAMEPAD events first, if that fails we try them as KEYBOARD
@ -1823,22 +1928,14 @@ class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
}
}
if (source == InputDevice.SOURCE_UNKNOWN) {
InputDevice device = InputDevice.getDevice(deviceId);
source = device.getSources();
}
if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
if (event.getAction() == KeyEvent.ACTION_DOWN) {
//Log.v("SDL", "key down: " + keyCode);
if (SDLActivity.isTextInputEvent(event)) {
SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
}
SDLActivity.onNativeKeyDown(keyCode);
return true;
}
else if (event.getAction() == KeyEvent.ACTION_UP) {
//Log.v("SDL", "key up: " + keyCode);
} else if (event.getAction() == KeyEvent.ACTION_UP) {
SDLActivity.onNativeKeyUp(keyCode);
return true;
}

+ 26163
- 0
modules/SDL2/autom4te.cache/output.0
File diff suppressed because it is too large
View File


+ 78
- 0
modules/SDL2/autom4te.cache/requests View File

@ -0,0 +1,78 @@
# This file was generated by Autom4te Thu Apr 10 10:06:43 UTC 2014.
# It contains the lists of macros which have been traced.
# It can be safely removed.
@request = (
bless( [
'0',
1,
[
'/usr/share/autoconf'
],
[
'/usr/share/autoconf/autoconf/autoconf.m4f',
'aclocal.m4',
'configure.in'
],
{
'AC_DEFINE_TRACE_LITERAL' => 1,
'AM_PROG_CC_C_O' => 1,
'AC_CANONICAL_TARGET' => 1,
'AM_PROG_MOC' => 1,
'AM_PROG_CXX_C_O' => 1,
'LT_CONFIG_LTDL_DIR' => 1,
'_m4_warn' => 1,
'AC_FC_PP_SRCEXT' => 1,
'LT_SUPPORTED_TAG' => 1,
'AM_PATH_GUILE' => 1,
'AC_CONFIG_SUBDIRS' => 1,
'AM_MAKEFILE_INCLUDE' => 1,
'AH_OUTPUT' => 1,
'm4_pattern_allow' => 1,
'_AM_SUBST_NOTMAKE' => 1,
'AC_INIT' => 1,
'_AM_COND_ENDIF' => 1,
'AM_AUTOMAKE_VERSION' => 1,
'AM_NLS' => 1,
'm4_sinclude' => 1,
'AC_FC_SRCEXT' => 1,
'_LT_AC_TAGCONFIG' => 1,
'AC_FC_FREEFORM' => 1,
'AC_CANONICAL_BUILD' => 1,
'AM_SILENT_RULES' => 1,
'AM_PROG_AR' => 1,
'AC_SUBST' => 1,
'AC_CONFIG_AUX_DIR' => 1,
'AM_PROG_FC_C_O' => 1,
'AM_CONDITIONAL' => 1,
'AM_INIT_AUTOMAKE' => 1,
'AC_CANONICAL_HOST' => 1,
'AM_ENABLE_MULTILIB' => 1,
'AC_PROG_LIBTOOL' => 1,
'AC_REQUIRE_AUX_FILE' => 1,
'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
'AC_CONFIG_FILES' => 1,
'AM_MAINTAINER_MODE' => 1,
'_AM_COND_ELSE' => 1,
'_AM_MAKEFILE_INCLUDE' => 1,
'AC_FC_PP_DEFINE' => 1,
'AC_CONFIG_HEADERS' => 1,
'_AM_COND_IF' => 1,
'sinclude' => 1,
'm4_include' => 1,
'm4_pattern_forbid' => 1,
'AM_POT_TOOLS' => 1,
'AC_CONFIG_LIBOBJ_DIR' => 1,
'LT_INIT' => 1,
'AM_XGETTEXT_OPTION' => 1,
'AM_PROG_F77_C_O' => 1,
'AM_GNU_GETTEXT' => 1,
'AC_CONFIG_LINKS' => 1,
'AC_LIBSOURCE' => 1,
'include' => 1,
'AC_SUBST_TRACE' => 1,
'AC_CANONICAL_SYSTEM' => 1
}
], 'Autom4te::Request' )
);

+ 1973
- 0
modules/SDL2/autom4te.cache/traces.0
File diff suppressed because it is too large
View File


+ 3
- 44
modules/SDL2/build-scripts/checker-buildbot.sh View File

@ -5,51 +5,10 @@
# back to the buildmaster. You might find it useful too.
# Install Clang (you already have it on Mac OS X, apt-get install clang
# on Ubuntu, etc),
# or download checker at http://clang-analyzer.llvm.org/ and unpack it in
# /usr/local ... update CHECKERDIR as appropriate.
# on Ubuntu, etc), and make sure scan-build is in your $PATH.
FINALDIR="$1"
CHECKERDIR="/usr/local/checker-279"
if [ ! -d "$CHECKERDIR" ]; then
echo "$CHECKERDIR not found. Trying /usr/share/clang ..." 1>&2
CHECKERDIR="/usr/share/clang/scan-build"
fi
if [ ! -d "$CHECKERDIR" ]; then
echo "$CHECKERDIR not found. Giving up." 1>&2
exit 1
fi
if [ -z "$MAKE" ]; then
OSTYPE=`uname -s`
if [ "$OSTYPE" == "Linux" ]; then
NCPU=`cat /proc/cpuinfo |grep vendor_id |wc -l`
let NCPU=$NCPU+1
elif [ "$OSTYPE" = "Darwin" ]; then
NCPU=`sysctl -n hw.ncpu`
elif [ "$OSTYPE" = "SunOS" ]; then
NCPU=`/usr/sbin/psrinfo |wc -l |sed -e 's/^ *//g;s/ *$//g'`
else
NCPU=1
fi
if [ -z "$NCPU" ]; then
NCPU=1
elif [ "$NCPU" = "0" ]; then
NCPU=1
fi
MAKE="make -j$NCPU"
fi
echo "\$MAKE is '$MAKE'"
# Unset $MAKE so submakes don't use it.
MAKECOMMAND="$MAKE"
unset MAKE
set -x
set -e
@ -68,13 +27,13 @@ cd checker-buildbot
# The -Wno-liblto is new since our checker-279 upgrade, I think; checker otherwise warns "libLTO.dylib relative to clang installed dir not found"
# You might want to do this for CMake-backed builds instead...
PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis cmake -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
scan-build -o analysis cmake -G Ninja -Wno-dev -DSDL_STATIC=OFF -DCMAKE_BUILD_TYPE=Debug -DASSERTIONS=enabled -DCMAKE_C_FLAGS="-Wno-deprecated-declarations" -DCMAKE_SHARED_LINKER_FLAGS="-Wno-liblto" ..
# ...or run configure without the scan-build wrapper...
#CC="$CHECKERDIR/libexec/ccc-analyzer" CFLAGS="-O0 -Wno-deprecated-declarations" LDFLAGS="-Wno-liblto" ../configure --enable-assertions=enabled
rm -rf analysis
PATH="$CHECKERDIR/bin:$PATH" scan-build -o analysis $MAKECOMMAND
scan-build -o analysis ninja
if [ `ls -A analysis |wc -l` == 0 ] ; then
mkdir analysis/zarro

+ 3
- 4
modules/SDL2/build-scripts/emscripten-buildbot.sh View File

@ -1,7 +1,7 @@
#!/bin/bash
if [ -z "$SDKDIR" ]; then
SDKDIR="/emsdk_portable"
SDKDIR="/emsdk"
fi
ENVSCRIPT="$SDKDIR/emsdk_env.sh"
@ -55,7 +55,7 @@ mkdir buildbot
pushd buildbot
echo "Configuring..."
emconfigure ../configure --host=asmjs-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
emconfigure ../configure --host=wasm-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
echo "Building..."
emmake $MAKE || exit $?
@ -67,9 +67,8 @@ emmake $MAKE install || exit $?
perl -w -pi -e "s#$PWD/emscripten-sdl2-installed#/usr/local#g;" ./emscripten-sdl2-installed/lib/libSDL2.la ./emscripten-sdl2-installed/lib/pkgconfig/sdl2.pc ./emscripten-sdl2-installed/bin/sdl2-config
mkdir -p ./usr
mv ./emscripten-sdl2-installed ./usr/local
tar -cJvvf $TARBALL usr
popd
tar -cJvvf $TARBALL -C buildbot usr
rm -rf buildbot
exit 0

+ 8
- 6
modules/SDL2/build-scripts/iosbuild.sh View File

@ -11,7 +11,9 @@ fi
SRC_DIR=$(cd `dirname $0`/..; pwd)
if [ "$PWD" = "$SRC_DIR" ]; then
PREFIX=$SRC_DIR/ios-build
mkdir $PREFIX
if [ ! -d "$PREFIX" ]; then
mkdir $PREFIX
fi
else
PREFIX=$PWD
fi
@ -87,7 +89,7 @@ then
cd ${PREFIX}
make clean
../configure --build=x86_64-apple-${DARWIN} --host=i386-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/i386-sim "CC=${CC}" "CFLAGS=${CFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch i386 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch i386 -mios-simulator-version-min=${MIN_SDK_VERSION} ${LDFLAGS} -L${IPHONESIMULATOR_SYSROOT}/usr/lib/ -L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" || exit 2
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
make -j10 || exit 3
make install
) || exit $?
@ -105,7 +107,7 @@ then
cd ${PREFIX}
make clean
../configure --build=x86_64-apple-${DARWIN} --host=x86_64-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/x86_64-sim "CC=${CC}" "CFLAGS=${CFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch x86_64 -isysroot ${IPHONESIMULATOR_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -mios-simulator-version-min=${MIN_SDK_VERSION} -arch x86_64 -isysroot ${IPHONESIMULATOR_SYSROOT}" LDFLAGS="-arch x86_64 -mios-simulator-version-min=${MIN_SDK_VERSION} ${LDFLAGS} -L${IPHONESIMULATOR_SYSROOT}/usr/lib/ -L${IPHONESIMULATOR_SYSROOT}/usr/lib/system" || exit 2
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
make -j$NJOB || exit 3
make install
) || exit $?
@ -123,7 +125,7 @@ then
cd ${PREFIX}
make clean
../configure --build=x86_64-apple-${DARWIN} --host=armv7-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/armv7-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -arch armv7 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7 -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
make -j$NJOB || exit 3
make install
) || exit $?
@ -141,7 +143,7 @@ then
cd ${PREFIX}
make clean
../configure --build=x86_64-apple-${DARWIN} --host=armv7s-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/armv7s-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch armv7s -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch armv7s -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
make -j$NJOB || exit 3
make install
) || exit $?
@ -159,7 +161,7 @@ then
cd ${PREFIX}
make clean
../configure --build=x86_64-apple-${DARWIN} --host=arm-ios-${DARWIN} --disable-shared --prefix=${PREFIX}/platform/arm64-ios "CC=${CC}" "CFLAGS=${CFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch arm64 -isysroot ${IPHONEOS_SYSROOT}" "CXX=${CXX}" "CXXFLAGS=${CXXFLAGS} -miphoneos-version-min=${MIN_SDK_VERSION} -arch arm64 -isysroot ${IPHONEOS_SYSROOT}" LDFLAGS="-arch arm64 -miphoneos-version-min=${MIN_SDK_VERSION} ${LDFLAGS}" || exit 2
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
cp $SRC_DIR/include/SDL_config_iphoneos.h include/SDL_config.h
make -j$NJOB || exit 3
make install
) || exit $?

+ 1
- 8
modules/SDL2/build-scripts/ltmain.sh View File

@ -5099,14 +5099,7 @@ func_mode_link ()
# we shouldn't force the makefile maintainer to figure out
# which system we are compiling for in order to pass an extra
# flag for every libtool invocation.
# allow_undefined=no
# FIXME: Unfortunately, there are problems with the above when trying
# to make a dll which has undefined symbols, in which case not
# even a static library is built. For now, we need to specify
# -no-undefined on the libtool link line when we can be certain
# that all symbols are satisfied, otherwise we get a static library.
allow_undefined=yes
allow_undefined=no
;;
*)
allow_undefined=yes

+ 3
- 3
modules/SDL2/build-scripts/os2-buildbot.sh View File

@ -19,7 +19,7 @@ ZIPFILE="$1"
if [ -z $1 ]; then
ZIPFILE=sdl-os2.zip
fi
ZIPDIR=SDL2-os2
ZIPDIR=buildbot/SDL
set -e
set -x
@ -30,11 +30,11 @@ cd ..
rm -f $ZIPFILE
wmake -f Makefile.os2
rm -rf $ZIPDIR
mkdir $ZIPDIR
mkdir -p $ZIPDIR
chmod a+r SDL2.lib SDL2.dll
mv SDL2.lib SDL2.dll $ZIPDIR/
cp -R include $ZIPDIR/
zip -9r "$ZIPFILE" $ZIPDIR
zip -9r "buildbot/$ZIPFILE" $ZIPDIR
wmake -f Makefile.os2 distclean

+ 2
- 4
modules/SDL2/build-scripts/raspberrypi-buildbot.sh View File

@ -28,7 +28,7 @@ if [ "x$MAKE" == "x" ]; then
MAKE="make -j$NCPU"
fi
BUILDBOTDIR="raspberrypi-buildbot"
BUILDBOTDIR="buildbot"
PARENTDIR="$PWD"
set -e
@ -49,10 +49,8 @@ $MAKE install
perl -w -pi -e "s#$PWD/rpi-sdl2-installed#/usr/local#g;" ./rpi-sdl2-installed/lib/libSDL2.la ./rpi-sdl2-installed/lib/pkgconfig/sdl2.pc ./rpi-sdl2-installed/bin/sdl2-config
mkdir -p ./usr
mv ./rpi-sdl2-installed ./usr/local
tar -cJvvf $TARBALL usr
popd
tar -cJvvf $TARBALL -C $BUILDBOTDIR usr
rm -rf $BUILDBOTDIR
set +x
echo "All done. Final installable is in $TARBALL ...";

+ 21
- 1
modules/SDL2/build-scripts/showrev.sh View File

@ -2,4 +2,24 @@
#
# Print the current source revision, if available
hg parents --template 'hg-{rev}:{node|short}' || (echo "hg-0:baadf00d"; exit 1)
SDL_ROOT=$(dirname $0)/..
cd $SDL_ROOT
if [ -x "$(command -v hg)" ]; then
rev="$(hg parents --template 'hg-{rev}:{node|short}' 2>/dev/null)"
if [ $? = 0 ]; then
echo $rev
exit 0
fi
fi
if [ -x "$(command -v p4)" ]; then
rev="$(p4 changes -m1 ./...\#have 2>/dev/null| awk '{print $2}')"
if [ $? = 0 ]; then
echo $rev
exit 0
fi
fi
echo "hg-0:baadf00d"
exit 1

+ 25
- 0
modules/SDL2/build-scripts/showrev.sh.orig View File

@ -0,0 +1,25 @@
#!/bin/sh
#
# Print the current source revision, if available
SDL_ROOT=$(dirname $0)/..
cd $SDL_ROOT
if test -x "$(command -v hg)"; then
rev="$(hg parents --template 'hg-{rev}:{node|short}' 2>/dev/null)"
if test $? = 0; then
echo $rev
exit 0
fi
fi
if test -x "$(command -v p4)"; then
rev="$(p4 changes -m1 ./...\#have 2>/dev/null| awk '{print $2}')"
if test $? = 0; then
echo $rev
exit 0
fi
fi
echo "hg-0:baadf00d"
exit 1

+ 11
- 23
modules/SDL2/build-scripts/windows-buildbot-zipper.bat View File

@ -1,38 +1,26 @@
@echo off
rem just a helper batch file for collecting up files and zipping them.
rem usage: windows-buildbot-zipper.bat <zipfilename>
rem usage: windows-buildbot-zipper.bat <target> <slndir> <zipfilename>
rem must be run from root of SDL source tree.
IF EXIST VisualC\Win32\Release GOTO okaywin32dir
IF EXIST %2\%1\Release GOTO okaydir
echo Please run from root of source tree after doing a Release build.
GOTO done
:okaywin32dir
IF EXIST VisualC\x64\Release GOTO okaydirs
echo Please run from root of source tree after doing a Release build.
GOTO done
:okaydirs
:okaydir
erase /q /f /s zipper
IF EXIST zipper GOTO zippermade
mkdir zipper
:zippermade
mkdir zipper\SDL
mkdir zipper\SDL\include
mkdir zipper\SDL\lib
copy include\*.h include\
copy %2\%1\Release\SDL2.dll zipper\SDL\lib\
copy %2\%1\Release\SDL2.lib zipper\SDL\lib\
copy %2\%1\Release\SDL2main.lib zipper\SDL\lib\
cd zipper
mkdir SDL
cd SDL
mkdir include
mkdir lib
mkdir lib\win32
mkdir lib\win64
copy ..\..\include\*.h include\
copy ..\..\VisualC\Win32\Release\SDL2.dll lib\win32\
copy ..\..\VisualC\Win32\Release\SDL2.lib lib\win32\
copy ..\..\VisualC\Win32\Release\SDL2main.lib lib\win32\
copy ..\..\VisualC\x64\Release\SDL2.dll lib\win64\
copy ..\..\VisualC\x64\Release\SDL2.lib lib\win64\
copy ..\..\VisualC\x64\Release\SDL2main.lib lib\win64\
cd ..
zip -9r ..\%1 SDL
zip -9r ..\%3 SDL
cd ..
erase /q /f /s zipper

+ 1
- 1
modules/SDL2/build-scripts/winrtbuild.ps1 View File

@ -39,7 +39,7 @@
#
# Base version of SDL, used for packaging purposes
$SDLVersion = "2.0.10"
$SDLVersion = "2.0.13"
# Gets the .bat file that sets up an MSBuild environment, given one of
# Visual Studio's, "PlatformToolset"s.

+ 27
- 15
modules/SDL2/cmake/sdlchecks.cmake View File

@ -30,7 +30,7 @@ macro(FindLibraryAndSONAME _LIB)
endmacro()
macro(CheckDLOPEN)
check_function_exists(dlopen HAVE_DLOPEN)
check_symbol_exists(dlopen "dlfcn.h" HAVE_DLOPEN)
if(NOT HAVE_DLOPEN)
foreach(_LIBNAME dl tdl)
check_library_exists("${_LIBNAME}" "dlopen" "" DLOPEN_LIB)
@ -424,7 +424,7 @@ macro(CheckX11)
set(X11_SHARED OFF)
endif()
check_function_exists("shmat" HAVE_SHMAT)
check_symbol_exists(shmat "sys/shm.h" HAVE_SHMAT)
if(NOT HAVE_SHMAT)
check_library_exists(ipc shmat "" HAVE_SHMAT)
if(HAVE_SHMAT)
@ -476,7 +476,7 @@ macro(CheckX11)
set(SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1)
endif()
check_function_exists(XkbKeycodeToKeysym SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM)
check_symbol_exists(XkbKeycodeToKeysym "X11/Xlib.h;X11/XKBlib.h" SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM)
if(VIDEO_X11_XCURSOR AND HAVE_XCURSOR_H)
set(HAVE_VIDEO_X11_XCURSOR TRUE)
@ -593,7 +593,7 @@ endmacro()
# - HAVE_DLOPEN opt
macro(CheckWayland)
if(VIDEO_WAYLAND)
pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon)
pkg_check_modules(WAYLAND wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon)
if(WAYLAND_FOUND)
execute_process(
@ -633,6 +633,7 @@ macro(CheckWayland)
endforeach()
if(VIDEO_WAYLAND_QT_TOUCH)
set(HAVE_VIDEO_WAYLAND_QT_TOUCH TRUE)
set(SDL_VIDEO_DRIVER_WAYLAND_QT_TOUCH 1)
endif()
@ -757,8 +758,10 @@ macro(CheckOpenGLX11)
endmacro()
# Requires:
# - nada
# - PkgCheckModules
macro(CheckOpenGLESX11)
pkg_check_modules(EGL egl)
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}")
if(VIDEO_OPENGLES)
check_c_source_compiles("
#define EGL_API_FB
@ -899,12 +902,14 @@ macro(CheckPTHREAD)
endif()
endif()
check_c_source_compiles("
#include <pthread.h>
#include <pthread_np.h>
int main(int argc, char** argv) { return 0; }" HAVE_PTHREAD_NP_H)
check_function_exists(pthread_setname_np HAVE_PTHREAD_SETNAME_NP)
check_function_exists(pthread_set_name_np HAVE_PTHREAD_SET_NAME_NP)
check_include_files("pthread.h" HAVE_PTHREAD_H)
check_include_files("pthread_np.h" HAVE_PTHREAD_NP_H)
if (HAVE_PTHREAD_H)
check_symbol_exists(pthread_setname_np "pthread.h" HAVE_PTHREAD_SETNAME_NP)
if (HAVE_PTHREAD_NP_H)
check_symbol_exists(pthread_set_name_np "pthread.h;pthread_np.h" HAVE_PTHREAD_SET_NAME_NP)
endif()
endif()
set(SOURCE_FILES ${SOURCE_FILES}
${SDL2_SOURCE_DIR}/src/thread/pthread/SDL_systhread.c
@ -1074,7 +1079,7 @@ macro(CheckHIDAPI)
set(HAVE_HIDAPI FALSE)
pkg_check_modules(LIBUSB libusb)
if (LIBUSB_FOUND)
check_include_file(libusb.h HAVE_LIBUSB_H)
check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS})
if (HAVE_LIBUSB_H)
set(HAVE_HIDAPI TRUE)
endif()
@ -1086,10 +1091,17 @@ macro(CheckHIDAPI)
set(HAVE_SDL_JOYSTICK TRUE)
file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES})
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} \"-I${SDL2_SOURCE_DIR}/src/hidapi/hidapi\"")
if(NOT HIDAPI_SKIP_LIBUSB)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
if(HIDAPI_ONLY_LIBUSB)
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
else()
set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/SDL_hidapi.c)
# libusb is loaded dynamically, so don't add it to EXTRA_LIBS
FindLibraryAndSONAME("usb-1.0")
set(SDL_LIBUSB_DYNAMIC "\"${USB_LIB_SONAME}\"")
endif()
endif()
endif()
endif()

+ 819
- 289
modules/SDL2/configure
File diff suppressed because it is too large
View File


+ 302
- 86
modules/SDL2/configure.ac View File

@ -20,9 +20,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
#
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=0
SDL_MICRO_VERSION=10
SDL_INTERFACE_AGE=0
SDL_BINARY_AGE=10
SDL_MICRO_VERSION=13
SDL_INTERFACE_AGE=1
SDL_BINARY_AGE=13
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
AC_SUBST(SDL_MAJOR_VERSION)
@ -34,6 +34,7 @@ AC_SUBST(SDL_VERSION)
# libtool versioning
LT_INIT([win32-dll])
LT_LANG([Windows Resource])
LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
@ -55,7 +56,7 @@ AC_PROG_CC
AC_PROG_CXX
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_CHECK_TOOL(WINDRES, [windres], [:])
AC_LIBTOOL_RC
PKG_PROG_PKG_CONFIG
dnl Make sure that srcdir is a full pathname
@ -69,7 +70,17 @@ case "$host" in
esac
dnl Set up the compiler and linker flags
INCLUDE="-I$srcdir/include -idirafter $srcdir/src/video/khronos"
INCLUDE="-I$srcdir/include"
dnl Don't use our khronos headers on QNX.
case "$host" in
*-*-nto-qnx*)
;;
*)
INCLUDE="$INCLUDE -idirafter $srcdir/src/video/khronos"
;;
esac
if test x$srcdir != x.; then
INCLUDE="-Iinclude $INCLUDE"
elif test -d .hg; then
@ -335,10 +346,10 @@ if test x$enable_libc = xyes; then
AC_DEFINE(HAVE_MPROTECT, 1, [ ])
]),
)
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit)
AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit)
AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf trunc truncf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
AC_CHECK_FUNCS(iconv)
@ -412,6 +423,7 @@ SOURCES="$SOURCES $srcdir/src/thread/*.c"
SOURCES="$SOURCES $srcdir/src/timer/*.c"
SOURCES="$SOURCES $srcdir/src/video/*.c"
SOURCES="$SOURCES $srcdir/src/video/yuv2rgb/*.c"
SOURCES="$SOURCES $srcdir/src/locale/*.c"
dnl Enable/disable various subsystems of the SDL library
@ -1303,6 +1315,82 @@ AS_HELP_STRING([--enable-libsamplerate-shared], [dynamically load libsamplerate
fi
}
dnl Check for ARM instruction support using gas syntax
CheckARM()
{
AC_ARG_ENABLE(arm-simd,
AC_HELP_STRING([--enable-arm-simd], [use SIMD assembly blitters on ARM [[default=no]]]),
enable_arm_simd=$enableval, enable_arm_simd=no)
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_simd = xyes; then
save_CFLAGS="$CFLAGS"
have_arm_simd=no
CFLAGS="-x assembler-with-cpp $CFLAGS"
AC_MSG_CHECKING(for ARM SIMD)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
.text
.arch armv6
.object_arch armv4
.arm
.altmacro
#ifndef __ARM_EABI__
#error EABI is required (to be sure that calling conventions are compatible)
#endif
pld [r0]
uqadd8 r0, r0, r0
]])], have_arm_simd=yes)
AC_MSG_RESULT($have_arm_simd)
CFLAGS="$save_CFLAGS"
if test x$have_arm_simd = xyes; then
AC_DEFINE(SDL_ARM_SIMD_BLITTERS, 1, [ ])
dnl SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.c"
SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
WARN_ABOUT_ARM_SIMD_ASM_MIT="yes"
fi
fi
}
dnl Check for ARM NEON instruction support using gas syntax
CheckNEON()
{
AC_ARG_ENABLE(arm-neon,
AC_HELP_STRING([--enable-arm-neon], [use NEON assembly blitters on ARM [[default=no]]]),
enable_arm_neon=$enableval, enable_arm_neon=no)
if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_neon = xyes; then
save_CFLAGS="$CFLAGS"
have_arm_neon=no
CFLAGS="-x assembler-with-cpp $CFLAGS"
AC_MSG_CHECKING(for ARM NEON)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
.text
.fpu neon
.arch armv7a
.object_arch armv4
.eabi_attribute 10, 0
.arm
.altmacro
#ifndef __ARM_EABI__
#error EABI is required (to be sure that calling conventions are compatible)
#endif
pld [r0]
vmovn.u16 d0, q0
]])], have_arm_neon=yes)
AC_MSG_RESULT($have_arm_neon)
CFLAGS="$save_CFLAGS"
if test x$have_arm_neon = xyes; then
AC_DEFINE(SDL_ARM_NEON_BLITTERS, 1, [ ])
dnl SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.c"
SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S"
WARN_ABOUT_ARM_NEON_ASM_MIT="yes"
fi
fi
}
dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
dnl Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
CheckVisibilityHidden()
@ -1450,7 +1538,7 @@ AS_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for
video_wayland=no
if test x$video_opengl_egl = xyes && \
test x$video_opengles_v2 = xyes; then
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-egl wayland-cursor egl xkbcommon ; then
WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
WAYLAND_LIBS=`$PKG_CONFIG --libs wayland-client wayland-egl wayland-cursor xkbcommon`
WAYLAND_SCANNER=`$PKG_CONFIG --variable=wayland_scanner wayland-scanner`
@ -1610,10 +1698,10 @@ AS_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
# This isn't necessary for X11, but fixes GLX detection
if test "x$x_includes" = xNONE && \
test "x$x_libraries" = xNONE && \
test -d /usr/X11R6/include && \
test -d /usr/X11R6/lib; then
x_includes="/usr/X11R6/include"
x_libraries="/usr/X11R6/lib"
test -d /opt/X11/include && \
test -d /opt/X11/lib; then
x_includes="/opt/X11/include"
x_libraries="/opt/X11/lib"
fi
;;
esac
@ -1626,15 +1714,16 @@ AS_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=ma
case "$host" in
*-*-darwin*)
x11_lib='/usr/X11R6/lib/libX11.6.dylib'
x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
xss_lib='/usr/X11R6/lib/libXss.1.dylib'
xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
# Apple now puts this in /opt/X11
x11_lib='/opt/X11/lib/libX11.6.dylib'
x11ext_lib='/opt/X11/lib/libXext.6.dylib'
xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
xinput_lib='/opt/X11/lib/libXi.6.dylib'
xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
xrender_lib='/opt/X11/lib/libXrender.1.dylib'
xss_lib='/opt/X11/lib/libXss.1.dylib'
xvidmode_lib='/opt/X11/lib/libXxf86vm.1.dylib'
;;
*-*-openbsd*)
x11_lib='libX11.so'
@ -1850,7 +1939,7 @@ int event_type = XI_TouchBegin;
XITouchClassInfo *t;
],[
have_xinput2_multitouch=yes
AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [])
AC_DEFINE([SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH], 1, [ ])
SUMMARY_video_x11="${SUMMARY_video_x11} xinput2_multitouch"
])
AC_MSG_RESULT($have_xinput2_multitouch)
@ -1958,6 +2047,9 @@ AS_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[d
SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
fi
fi
else
# Prevent Mesa from including X11 headers
EXTRA_CFLAGS="$EXTRA_CFLAGS -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11"
fi
}
@ -2048,10 +2140,13 @@ AS_HELP_STRING([--enable-video-cocoa], [use Cocoa video driver [[default=yes]]])
CheckMETAL()
{
AC_ARG_ENABLE(video-metal,
AC_HELP_STRING([--enable-video-metal], [include Metal support [[default=yes]]]),
, enable_video_metal=yes)
AC_ARG_ENABLE(render-metal,
AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[default=yes]]]),
, enable_render_metal=yes)
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
if test x$enable_video = xyes -a x$enable_video_metal = xyes; then
save_CFLAGS="$CFLAGS"
dnl Work around that we don't have Objective-C support in autoconf
CFLAGS="$CFLAGS -x objective-c"
@ -2062,7 +2157,7 @@ AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[defaul
#import <Metal/Metal.h>
#import <QuartzCore/CAMetalLayer.h>
#if !TARGET_CPU_X86_64
#if TARGET_CPU_X86
#error Metal doesn't work on this configuration
#endif
],[
@ -2072,10 +2167,14 @@ AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[defaul
CFLAGS="$save_CFLAGS"
AC_MSG_RESULT($have_metal)
if test x$have_metal = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
AC_DEFINE(SDL_VIDEO_METAL, 1, [ ])
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
fi
SUMMARY_video="${SUMMARY_video} metal"
else
enable_video_metal=no
enable_render_metal=no
fi
fi
@ -2284,7 +2383,7 @@ CheckOpenGLESX11()
if test x$video_opengl_egl = xyes; then
AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
fi
if test x$enable_video_opengles1 = xyes; then
AC_MSG_CHECKING(for OpenGL ES v1 headers)
video_opengles_v1=no
@ -2473,7 +2572,7 @@ CheckVulkan()
#include <Metal/Metal.h>
#include <QuartzCore/CAMetalLayer.h>
#if !TARGET_CPU_X86_64
#if TARGET_CPU_X86
#error Vulkan doesn't work on this configuration
#endif
],[
@ -2595,7 +2694,7 @@ AS_HELP_STRING([--enable-ime], [enable IME support [[default=yes]]]),
, enable_ime=yes)
if test x$enable_ime = xyes; then
AC_DEFINE(SDL_USE_IME, 1, [ ])
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
fi
}
@ -2642,25 +2741,18 @@ CheckFcitx()
AS_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
, enable_fcitx=yes)
if test x$enable_fcitx = xyes; then
PKG_CHECK_MODULES([FCITX], [fcitx], have_fcitx=yes, have_fcitx=no)
CFLAGS="$CFLAGS $FCITX_CFLAGS"
AC_CHECK_HEADER(fcitx/frontend.h,
have_fcitx_frontend_h_hdr=yes,
have_fcitx_frontend_h_hdr=no)
CFLAGS="$save_CFLAGS"
if test x$have_fcitx_frontend_h_hdr = xyes; then
if test x$enable_ime != xyes; then
AC_MSG_WARN([IME support is required for fcitx.])
have_fcitx_frontend_h_hdr=no
elif test x$enable_dbus != xyes; then
AC_MSG_WARN([DBus support is required for fcitx.])
have_fcitx_frontend_h_hdr=no
else
AC_DEFINE(HAVE_FCITX_FRONTEND_H, 1, [ ])
EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
fi
AC_MSG_CHECKING(for fcitx support)
have_fcitx=no
if test x$enable_ime != xyes; then
AC_MSG_WARN([IME support is required for fcitx.])
elif test x$have_dbus_dbus_h_hdr != xyes; then
AC_MSG_WARN([DBus support is required for fcitx.])
else
have_fcitx=yes
AC_DEFINE(HAVE_FCITX, 1, [ ])
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
fi
AC_MSG_RESULT($have_fcitx)
fi
}
@ -3007,15 +3099,13 @@ XINPUT_STATE_EX s1;
AC_CHECK_HEADER(mmdeviceapi.h, have_wasapi=yes)
if test x$have_wasapi = xyes; then
AC_DEFINE(HAVE_MMDEVICEAPI_H,1,[])
AC_DEFINE(HAVE_MMDEVICEAPI_H, 1, [ ])
fi
AC_CHECK_HEADER(audioclient.h,,have_wasapi=no)
if test x$have_wasapi = xyes; then
AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
AC_DEFINE(HAVE_AUDIOCLIENT_H, 1, [ ])
fi
AC_CHECK_HEADER(endpointvolume.h,AC_DEFINE(HAVE_ENDPOINTVOLUME_H,1,[]))
AC_ARG_ENABLE(wasapi,
AS_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]),
, enable_wasapi=yes)
@ -3067,7 +3157,7 @@ CheckUSBHID()
AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
fi
save_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $USB_CFLAGS"
@ -3197,26 +3287,24 @@ CheckHIDAPI()
{
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
# so we'll just use libusb when it's available.
#
# Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
#
# On macOS and Windows, where you don't need libusb or root, we default to yes.
skiplibusb=no
case "$host" in
*-*-cygwin* | *-*-mingw32* | *-*-darwin* )
# libusb does not support iOS
*-ios-* )
skiplibusb=yes
;;
# On the other hand, *BSD specifically uses libusb only
*-*-*bsd* )
onlylibusb=yes
;;
# RAWINPUT is only available on Win32, but can be enabled if HIDAPI is
*-*-cygwin* | *-*-mingw32*)
userawinput=yes
;;
esac
AC_ARG_ENABLE(hidapi,
AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=maybe]]]),
, enable_hidapi=maybe)
hidapi_support=no
if test x$enable_hidapi = xmaybe; then
enable_hidapi=$skiplibusb
fi
AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]),
, enable_hidapi=no)
if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
if test x$skiplibusb = xyes; then
hidapi_support=yes
@ -3228,18 +3316,46 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
CFLAGS="$save_CFLAGS"
if test x$have_libusb_h = xyes; then
hidapi_support=yes
elif test x$onlylibusb = xyes; then
hidapi_support=no
else
hidapi_support=yes
fi
fi
if test x$hidapi_support = xyes; then
AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
if test x$userawinput = xyes; then
AC_DEFINE(SDL_JOYSTICK_RAWINPUT, 1, [ ])
fi
EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
if test x$skiplibusb = xno; then
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
if test x$have_libusb_h = xyes; then
EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
if test x$onlylibusb = xyes; then
SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
else
if test x$have_loadso != xyes; then
AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libusb loading])
fi
# libusb is loaded dynamically, so don't add it to LDFLAGS
libusb_lib=""
case "$host" in
*-*-darwin* )
libusb_lib="libusb-1.0.0.dylib"
;;
*-*-cygwin* | *-*-mingw32* )
libusb_lib="libusb-1.0.dll"
;;
esac
if test x$libusb_lib = x; then
libusb_lib=[`find_lib "libusb-1.0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
fi
AC_DEFINE_UNQUOTED(SDL_LIBUSB_DYNAMIC, "$libusb_lib", [ ])
fi
fi
fi
@ -3306,6 +3422,18 @@ AS_HELP_STRING([--enable-foregrounding-signal], [number to use for magic foregro
fi
}
dnl Set up the Virtual joystick driver.
CheckVirtualJoystick()
{
AC_ARG_ENABLE(joystick-virtual,
AS_HELP_STRING([--enable-joystick-virtual], [enable virtual joystick APIs [[default=yes]]]),
, enable_joystick_virtual=yes)
if test x$enable_joystick = xyes -a x$enable_joystick_virtual = xyes; then
AC_DEFINE(SDL_JOYSTICK_VIRTUAL, 1, [ ])
SOURCES="$SOURCES $srcdir/src/joystick/virtual/*.c"
have_joystick_virtual=yes
fi
}
dnl Do this on all platforms, before everything else (other things might want to override it).
@ -3315,6 +3443,8 @@ CheckNoStrictAliasing
dnl Do this for every platform, but for some it doesn't mean anything, but better to catch it here anyhow.
CheckEventSignals
have_locale=no
dnl Set up the configuration based on the host platform!
case "$host" in
*-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
@ -3362,6 +3492,8 @@ case "$host" in
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
CheckARM
CheckNEON
CheckOSS
CheckALSA
CheckPulseAudio
@ -3401,6 +3533,9 @@ case "$host" in
CheckRPATH
CheckVivanteVideo
SOURCES="$SOURCES $srcdir/src/locale/unix/*.c"
have_locale=yes
# Set up files for the audio library
if test x$enable_audio = xyes; then
case $ARCH in
@ -3550,6 +3685,10 @@ case "$host" in
# Set up the core platform files
SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
# Use the Windows locale APIs.
SOURCES="$SOURCES $srcdir/src/locale/windows/*.c"
have_locale=yes
# Set up files for the video library
if test x$enable_video = xyes; then
AC_DEFINE(SDL_VIDEO_DRIVER_WINDOWS, 1, [ ])
@ -3599,9 +3738,6 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
fi
SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
have_joystick=yes
if test x$hidapi_support = xyes; then
SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
fi
fi
if test x$enable_haptic = xyes; then
if test x$have_dinput = xyes -o x$have_xinput = xyes; then
@ -3615,11 +3751,19 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
have_haptic=yes
fi
fi
# Set up files for the sensor library
if test x$enable_sensor = xyes; then
AC_DEFINE(SDL_SENSOR_WINDOWS, 1, [ ])
SOURCES="$SOURCES $srcdir/src/sensor/windows/*.c"
have_sensor=yes
fi
# Set up files for the power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_WINDOWS, 1, [ ])
SOURCES="$SOURCES $srcdir/src/power/windows/SDL_syspower.c"
have_power=yes
fi
# Set up files for the filesystem library
if test x$enable_filesystem = xyes; then
AC_DEFINE(SDL_FILESYSTEM_WINDOWS, 1, [ ])
SOURCES="$SOURCES $srcdir/src/filesystem/windows/SDL_sysfilesystem.c"
@ -3716,6 +3860,11 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
SOURCES="$SOURCES $srcdir/src/filesystem/haiku/*.cc"
have_filesystem=yes
fi
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/haiku/*.cc"
have_locale=yes
# The Haiku platform requires special setup.
SOURCES="$srcdir/src/main/haiku/*.cc $SOURCES"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lroot -lbe -lmedia -lgame -ldevice -ltextencoding"
@ -3723,7 +3872,7 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
# other spins, like x86-64, use a more standard "libstdc++.so.*"
AC_CHECK_FILE("/boot/system/lib/libstdc++.r4.so", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++.r4", EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lstdc++")
;;
arm*-apple-darwin*|*-ios-*)
*-ios-*)
ARCH=ios
CheckVisibilityHidden
@ -3736,6 +3885,10 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
CheckVulkan
CheckPTHREAD
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
have_locale=yes
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
@ -3749,6 +3902,9 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
have_joystick=yes
else
# Need this code for accelerometer as joystick support
SOURCES="$SOURCES $srcdir/src/joystick/iphoneos/*.m"
fi
# Set up files for the haptic library
#if test x$enable_haptic = xyes; then
@ -3756,6 +3912,12 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
# have_haptic=yes
# EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
#fi
# Set up files for the sensor library
if test x$enable_sensor = xyes; then
AC_DEFINE(SDL_SENSOR_COREMOTION, 1, [ ])
SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m"
have_sensor=yes
fi
# Set up files for the power library
if test x$enable_power = xyes; then
AC_DEFINE(SDL_POWER_UIKIT, 1, [ ])
@ -3799,7 +3961,7 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
fi
;;
@ -3829,6 +3991,10 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
CheckPTHREAD
CheckHIDAPI
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/macosx/*.m"
have_locale=yes
# Set up files for the audio library
if test x$enable_audio = xyes; then
AC_DEFINE(SDL_AUDIO_DRIVER_COREAUDIO, 1, [ ])
@ -3842,9 +4008,6 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
AC_DEFINE(SDL_JOYSTICK_IOKIT, 1, [ ])
SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
have_joystick=yes
if test x$hidapi_support = xyes; then
SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
fi
fi
# Set up files for the haptic library
if test x$enable_haptic = xyes; then
@ -3884,7 +4047,7 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
fi
;;
@ -3953,6 +4116,28 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
SOURCES="$SOURCES $srcdir/src/filesystem/emscripten/*.c"
have_filesystem=yes
fi
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
have_timers=yes
fi
# Set up files for the locale library
SOURCES="$SOURCES $srcdir/src/locale/emscripten/*.c"
have_locale=yes
;;
*-*-riscos*)
ARCH=riscos
CheckVisibilityHidden
CheckDeclarationAfterStatement
CheckDummyVideo
CheckDiskAudio
CheckDummyAudio
CheckDLOPEN
CheckOSS
CheckPTHREAD
CheckClockGettime
# Set up files for the timer library
if test x$enable_timers = xyes; then
AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
@ -3967,6 +4152,9 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
;;
esac
dnl Permit use of virtual joystick APIs on any platform (subject to configure options)
CheckVirtualJoystick
# Check whether to install sdl2-config
AC_MSG_CHECKING(whether to install sdl2-config)
AC_ARG_ENABLE([sdl2-config],
@ -3985,6 +4173,9 @@ AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
# Verify that we have all the platform specific files we need
if test x$have_locale != xyes; then
SOURCES="$SOURCES $srcdir/src/locale/dummy/*.c"
fi
if test x$have_joystick != xyes; then
if test x$enable_joystick = xyes; then
AC_DEFINE(SDL_JOYSTICK_DUMMY, 1, [ ])
@ -4069,10 +4260,10 @@ GEN_OBJECTS=`echo "$GEN_SOURCES" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.l
VERSION_OBJECTS=`echo $VERSION_SOURCES`
VERSION_DEPENDS=`echo $VERSION_SOURCES`
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.lo,g'`
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
\\$(objects)/\\2.o: \\1/\\2.rc\\\\
\\$(WINDRES) \\$< \\$@,g"`
\\$(objects)/\\2.lo: \\1/\\2.rc \\$(objects)/.created\\\\
\\$(RUN_CMD_RC)\\$(LIBTOOL) --mode=compile --tag=RC \\$(RC) -i \\$< -o \\$@,g"`
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
@ -4090,7 +4281,7 @@ SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.
# Set runtime shared library paths as needed
if test "x$enable_rpath" = "xyes"; then
if test "x$enable_rpath" = "xyes" -a "x$enable_shared" = "xyes"; then
if test $ARCH = bsdi -o $ARCH = freebsd -o $ARCH = linux -o $ARCH = netbsd; then
SDL_RLD_FLAGS="-Wl,-rpath,\${libdir}"
@ -4114,7 +4305,7 @@ else
SDL_RLD_FLAGS=""
fi
SDL_STATIC_LIBS="$SDL_LIBS $EXTRA_LDFLAGS"
SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
dnl Expand the cflags and libraries needed by apps using SDL
AC_SUBST(SDL_CFLAGS)
@ -4122,9 +4313,12 @@ AC_SUBST(SDL_LIBS)
AC_SUBST(SDL_STATIC_LIBS)
AC_SUBST(SDL_RLD_FLAGS)
if test x$enable_shared = xyes; then
PKG_CONFIG_LIBS_PRIV="
Libs.private:"
ENABLE_SHARED_TRUE=
ENABLE_SHARED_FALSE="#"
else
PKG_CONFIG_LIBS_PRIV=
ENABLE_SHARED_TRUE="#"
ENABLE_SHARED_FALSE=
fi
@ -4135,6 +4329,7 @@ else
ENABLE_STATIC_TRUE="#"
ENABLE_STATIC_FALSE=
fi
AC_SUBST(PKG_CONFIG_LIBS_PRIV)
AC_SUBST(ENABLE_SHARED_TRUE)
AC_SUBST(ENABLE_SHARED_FALSE)
AC_SUBST(ENABLE_STATIC_TRUE)
@ -4153,7 +4348,6 @@ AC_SUBST(BUILD_CFLAGS)
AC_SUBST(EXTRA_CFLAGS)
AC_SUBST(BUILD_LDFLAGS)
AC_SUBST(EXTRA_LDFLAGS)
AC_SUBST(WINDRES)
AC_SUBST(WAYLAND_SCANNER)
cat >Makefile.rules <<__EOF__
@ -4171,7 +4365,7 @@ $WAYLAND_PROTOCOLS_DEPENDS
__EOF__
AC_CONFIG_FILES([
Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc
Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc
])
AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
@ -4190,6 +4384,11 @@ if test x$have_x = xyes; then
SUMMARY="${SUMMARY}X11 libraries :${SUMMARY_video_x11}\n"
fi
SUMMARY="${SUMMARY}Input drivers :${SUMMARY_input}\n"
if test x$have_joystick_virtual = xyes; then
SUMMARY="${SUMMARY}Enable virtual joystick APIs : YES\n"
else
SUMMARY="${SUMMARY}Enable virtual joystick APIs : NO\n"
fi
if test x$have_samplerate_h_hdr = xyes; then
SUMMARY="${SUMMARY}Using libsamplerate : YES\n"
else
@ -4215,11 +4414,28 @@ if test x$have_ibus_ibus_h_hdr = xyes; then
else
SUMMARY="${SUMMARY}Using ibus : NO\n"
fi
if test x$have_fcitx_frontend_h_hdr = xyes; then
if test x$have_fcitx = xyes; then
SUMMARY="${SUMMARY}Using fcitx : YES\n"
else
SUMMARY="${SUMMARY}Using fcitx : NO\n"
fi
if test x$WARN_ABOUT_ARM_SIMD_ASM_MIT = xyes; then
SUMMARY="${SUMMARY}\nSDL is being built with ARM SIMD optimizations, which\n"
SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
SUMMARY="${SUMMARY}configure script with:\n"
SUMMARY="${SUMMARY}\n --disable-arm-simd\n"
fi
if test x$WARN_ABOUT_ARM_NEON_ASM_MIT = xyes; then
SUMMARY="${SUMMARY}\nSDL is being built with ARM NEON optimizations, which\n"
SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
SUMMARY="${SUMMARY}configure script with:\n"
SUMMARY="${SUMMARY}\n --disable-arm-neon\n"
fi
AC_CONFIG_COMMANDS([summary], [echo -en "$SUMMARY"], [SUMMARY="$SUMMARY"])
AC_OUTPUT

+ 19
- 1
modules/SDL2/debian/changelog View File

@ -1,8 +1,26 @@
libsdl2 (2.0.12) UNRELEASED; urgency=low
* Updated SDL to version 2.0.13 for development builds
-- Sam Lantinga <slouken@libsdl.org> Tue, 10 Mar 2020 18:24:22 -0800
libsdl2 (2.0.12) UNRELEASED; urgency=low
* Updated SDL to version 2.0.12
-- Sam Lantinga <slouken@libsdl.org> Sun, 1 Mar 2020 14:57:07 -0800
libsdl2 (2.0.11) UNRELEASED; urgency=low
* Updated SDL to version 2.0.11 for development builds
-- Sam Lantinga <slouken@libsdl.org> Sun, 22 Sep 2019 10:33:03 -0800
libsdl2 (2.0.10) UNRELEASED; urgency=low
* Updated SDL to version 2.0.10
-- Sam Lantinga <slouken@libsdl.org> Mon, 17 Jun 2018 08:48:47 -0800
-- Sam Lantinga <slouken@libsdl.org> Mon, 17 Jun 2019 08:48:47 -0800
libsdl2 (2.0.9) UNRELEASED; urgency=low

+ 6
- 6
modules/SDL2/debian/copyright View File

@ -4,7 +4,7 @@ Upstream-Contact: Sam Lantinga
Source: http://www.libsdl.org/
Files: *
Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
License: zlib/libpng
Files: src/libm/*
@ -12,7 +12,7 @@ Copyright: 1993 by Sun Microsystems, Inc. All rights reserved.
License: SunPro
Files: src/main/windows/SDL_windows_main.c
Copyright: 2019 Sam Lantinga
Copyright: 2020 Sam Lantinga
License: PublicDomain_Sam_Lantinga
Comment: SDL_main.c, placed in the public domain by Sam Lantinga 4/13/98
@ -32,7 +32,7 @@ Copyright: 1995 Erik Corry
License: BrownUn_UnCalifornia_ErikCorry
Files: src/test/SDL_test_md5.c
Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
1990 RSA Data Security, Inc.
License: zlib/libpng and RSA_Data_Security
@ -46,12 +46,12 @@ Copyright: 1994-2003 The XFree86 Project, Inc.
License: MIT/X11
Files: test/testhaptic.c
Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
2008 Edgar Simo Serra
License: BSD_3_clause
Files: test/testrumble.c
Copyright: 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
2011 Edgar Simo Serra
License: BSD_3_clause
@ -169,7 +169,7 @@ License: BSD_3_clause
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Comment:
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

+ 1
- 0
modules/SDL2/debian/libsdl2-dev.install View File

@ -5,4 +5,5 @@ usr/lib/*/*.la
usr/lib/*/*.so
usr/lib/*/pkgconfig/sdl2.pc
usr/lib/*/cmake/SDL2/sdl2-config.cmake
usr/lib/*/cmake/SDL2/sdl2-config-version.cmake
usr/share/aclocal/sdl2.m4

+ 19
- 0
modules/SDL2/docs/README-android.md View File

@ -82,6 +82,23 @@ For more complex projects, follow these instructions:
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
If you already have a project that uses CMake, the instructions change somewhat:
1. Do points 1 and 2 from the instruction above.
2. Edit "<project>/app/build.gradle" to comment out or remove sections containing ndk-build
and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
3. Edit "<project>/app/jni/CMakeLists.txt" to include your project (it defaults to
adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
add_executable() for the target containing your "main" function.
If you wish to use Android Studio, you can skip the last step.
4. Run './gradlew installDebug' or './gradlew installRelease' in the project directory. It will build and install your .apk on any
connected Android device
Here's an explanation of the files in the Android project, so you can customize them:
android-project/app
@ -90,10 +107,12 @@ Here's an explanation of the files in the Android project, so you can customize
jni/ - directory holding native code
jni/Application.mk - Application JNI settings, including target platform and STL library
jni/Android.mk - Android makefile that can call recursively the Android.mk files in all subdirectories
jni/CMakeLists.txt - Top-level CMake project that adds SDL as a subproject
jni/SDL/ - (symlink to) directory holding the SDL library files
jni/SDL/Android.mk - Android makefile for creating the SDL shared library
jni/src/ - directory holding your C/C++ source
jni/src/Android.mk - Android makefile that you should customize to include your source code and any library references
jni/src/CMakeLists.txt - CMake file that you may customize to include your source code and any library references
src/main/assets/ - directory holding asset files for your application
src/main/res/ - directory holding resources for your application
src/main/res/mipmap-* - directories holding icons for different phone hardware

+ 53
- 1
modules/SDL2/docs/README-cmake.md View File

@ -15,7 +15,7 @@ platforms:
* Linux
* VS.NET 2010
* MinGW and Msys
* OS X with support for XCode
* macOS, iOS, and tvOS, with support for XCode
================================================================================
@ -30,3 +30,55 @@ Assuming the source for SDL is located at ~/sdl
cmake ../sdl
This will build the static and dynamic versions of SDL in the ~/build directory.
================================================================================
Usage, iOS/tvOS
================================================================================
CMake 3.14+ natively includes support for iOS and tvOS. SDL binaries may be built
using Xcode or Make, possibly among other build-systems.
When using a recent version of CMake (3.14+), it should be possible to:
- build SDL for iOS, both static and dynamic
- build SDL test apps (as iOS/tvOS .app bundles)
- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis)
To use, set the following CMake variables when running CMake's configuration stage:
- `CMAKE_SYSTEM_NAME=<OS>` (either `iOS` or `tvOS`)
- `CMAKE_OSX_SYSROOT=<SDK>` (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`,
`appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.)
- `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
### Examples (for iOS/tvOS):
- for iOS-Simulator, using the latest, installed SDK:
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for iOS-Device, using the latest, installed SDK, 64-bit only
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64`
- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"`
- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example):
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64`
- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
`cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for tvOS-Simulator, using the latest, installed SDK:
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for tvOS-Device, using the latest, installed SDK:
`cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`

+ 16
- 0
modules/SDL2/docs/README-ios.md View File

@ -228,6 +228,22 @@ Textures:
Loading Shared Objects:
This is disabled by default since it seems to break the terms of the iOS SDK agreement for iOS versions prior to iOS 8. It can be re-enabled in SDL_config_iphoneos.h.
==============================================================================
Notes -- CoreBluetooth.framework
==============================================================================
SDL_JOYSTICK_HIDAPI is disabled by default. It can give you access to a lot
more game controller devices, but it requires permission from the user before
your app will be able to talk to the Bluetooth hardware. "Made For iOS"
branded controllers do not need this as we don't have to speak to them
directly with raw bluetooth, so many apps can live without this.
You'll need to link with CoreBluetooth.framework and add something like this
to your Info.plist:
<key>NSBluetoothPeripheralUsageDescription</key>
<string>MyApp would like to remain connected to nearby bluetooth Game Controllers and Game Pads even when you're not using the app.</string>
==============================================================================
Game Center
==============================================================================

+ 6
- 9
modules/SDL2/docs/README-linux.md View File

@ -13,21 +13,18 @@ default configuration parameters.
Build Dependencies
================================================================================
Ubuntu 13.04, all available features enabled:
Ubuntu 20.04, all available features enabled:
sudo apt-get install build-essential mercurial make cmake autoconf automake \
libtool libasound2-dev libpulse-dev libaudio-dev libx11-dev libxext-dev \
libxrandr-dev libxcursor-dev libxi-dev libxinerama-dev libxxf86vm-dev \
libxss-dev libgl1-mesa-dev libesd0-dev libdbus-1-dev libudev-dev \
libgles1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libibus-1.0-dev \
fcitx-libs-dev libsamplerate0-dev libsndio-dev
Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols"
to that command line for Wayland support.
libxss-dev libgl1-mesa-dev libdbus-1-dev libudev-dev libgles2-mesa-dev \
libegl1-mesa-dev libibus-1.0-dev fcitx-libs-dev libsamplerate0-dev \
libsndio-dev libwayland-dev libxkbcommon-dev
NOTES:
- This includes all the audio targets except arts, because Ubuntu pulled the
artsc0-dev package, but in theory SDL still supports it.
- This includes all the audio targets except arts and esd, because Ubuntu
(and/or Debian) pulled their packages, but in theory SDL still supports them.
- libsamplerate0-dev lets SDL optionally link to libresamplerate at runtime
for higher-quality audio resampling. SDL will work without it if the library
is missing, so it's safe to build in support even if the end user doesn't

+ 3
- 1
modules/SDL2/include/SDL.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -47,6 +47,7 @@
#include "SDL_loadso.h"
#include "SDL_log.h"
#include "SDL_messagebox.h"
#include "SDL_metal.h"
#include "SDL_mutex.h"
#include "SDL_power.h"
#include "SDL_render.h"
@ -58,6 +59,7 @@
#include "SDL_timer.h"
#include "SDL_version.h"
#include "SDL_video.h"
#include "SDL_locale.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */

+ 3
- 1
modules/SDL2/include/SDL_assert.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -53,6 +53,8 @@ assert can have unique static variables associated with it.
#define SDL_TriggerBreakpoint() __debugbreak()
#elif ( (!defined(__NACL__)) && ((defined(__GNUC__) || defined(__clang__)) && (defined(__i386__) || defined(__x86_64__))) )
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "int $3\n\t" )
#elif ( defined(__APPLE__) && defined(__arm64__) ) /* this might work on other ARM targets, but this is a known quantity... */
#define SDL_TriggerBreakpoint() __asm__ __volatile__ ( "brk #22\n\t" )
#elif defined(__386__) && defined(__WATCOMC__)
#define SDL_TriggerBreakpoint() { _asm { int 0x03 } }
#elif defined(HAVE_SIGNAL_H) && !defined(__WATCOMC__)

+ 1
- 1
modules/SDL2/include/SDL_atomic.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

+ 1
- 1
modules/SDL2/include/SDL_audio.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

+ 1
- 1
modules/SDL2/include/SDL_bits.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

+ 4
- 1
modules/SDL2/include/SDL_blendmode.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -50,6 +50,9 @@ typedef enum
SDL_BLENDMODE_MOD = 0x00000004, /**< color modulate
dstRGB = srcRGB * dstRGB
dstA = dstA */
SDL_BLENDMODE_MUL = 0x00000008, /**< color multiply
dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
dstA = (srcA * dstA) + (dstA * (1-srcA)) */
SDL_BLENDMODE_INVALID = 0x7FFFFFFF
/* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */

+ 1
- 1
modules/SDL2/include/SDL_clipboard.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

+ 1
- 1
modules/SDL2/include/SDL_config.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages

+ 28
- 3
modules/SDL2/include/SDL_config.h.cmake View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -96,7 +96,10 @@
#cmakedefine HAVE_WCSLEN 1
#cmakedefine HAVE_WCSLCPY 1
#cmakedefine HAVE_WCSLCAT 1
#cmakedefine HAVE_WCSDUP 1
#cmakedefine HAVE_WCSSTR 1
#cmakedefine HAVE_WCSCMP 1
#cmakedefine HAVE_WCSNCMP 1
#cmakedefine HAVE_STRLEN 1
#cmakedefine HAVE_STRLCPY 1
#cmakedefine HAVE_STRLCAT 1
@ -108,6 +111,8 @@
#cmakedefine HAVE_STRCHR 1
#cmakedefine HAVE_STRRCHR 1
#cmakedefine HAVE_STRSTR 1
#cmakedefine HAVE_STRTOK_R 1
#cmakedefine HAVE_STRTOK_S 1
#cmakedefine HAVE_ITOA 1
#cmakedefine HAVE__LTOA 1
#cmakedefine HAVE__UITOA 1
@ -127,6 +132,7 @@
#cmakedefine HAVE_STRCASECMP 1
#cmakedefine HAVE__STRNICMP 1
#cmakedefine HAVE_STRNCASECMP 1
#cmakedefine HAVE_SSCANF 1
#cmakedefine HAVE_VSSCANF 1
#cmakedefine HAVE_VSNPRINTF 1
#cmakedefine HAVE_M_PI 1
@ -197,7 +203,7 @@
#cmakedefine HAVE_ALTIVEC_H 1
#cmakedefine HAVE_DBUS_DBUS_H 1
#cmakedefine HAVE_FCITX_FRONTEND_H 1
#cmakedefine HAVE_FCITX 1
#cmakedefine HAVE_IBUS_IBUS_H 1
#cmakedefine HAVE_IMMINTRIN_H 1
#cmakedefine HAVE_LIBSAMPLERATE_H 1
@ -211,7 +217,6 @@
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
#cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
@ -288,15 +293,18 @@
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
#cmakedefine SDL_JOYSTICK_VIRTUAL @SDL_JOYSTICK_VIRTUAL@
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
#cmakedefine SDL_HAPTIC_IOKIT @SDL_HAPTIC_IOKIT@
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
/* Enable various sensor drivers */
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
/* Enable various shared object loading systems */
@ -322,9 +330,11 @@
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
#cmakedefine SDL_VIDEO_DRIVER_UIKIT @SDL_VIDEO_DRIVER_UIKIT@
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
#cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
@ -387,15 +397,25 @@
/* Enable Vulkan support */
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
/* Enable Metal support */
#cmakedefine SDL_VIDEO_METAL @SDL_VIDEO_METAL@
/* Enable system power support */
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
/* Enable sensor support */
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
#cmakedefine SDL_SENSOR_WINDOWS @SDL_SENSOR_WINDOWS@
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
/* Enable system filesystem support */
#cmakedefine SDL_FILESYSTEM_ANDROID @SDL_FILESYSTEM_ANDROID@
#cmakedefine SDL_FILESYSTEM_HAIKU @SDL_FILESYSTEM_HAIKU@
@ -408,11 +428,16 @@
/* Enable assembly routines */
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
#cmakedefine SDL_ARM_SIMD_BLITTERS @SDL_ARM_SIMD_BLITTERS@
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
/* Enable dynamic libsamplerate support */
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
/* Platform specific definitions */
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
#if !defined(__WIN32__)
# if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
typedef unsigned int size_t;

+ 21
- 7
modules/SDL2/include/SDL_config.h.in View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -33,7 +33,7 @@
/* Make sure that this isn't included by Visual C++ */
#ifdef _MSC_VER
#error You should run hg revert SDL_config.h
#error You should run hg revert SDL_config.h
#endif
/* C language features */
@ -99,7 +99,10 @@
#undef HAVE_WCSLEN
#undef HAVE_WCSLCPY
#undef HAVE_WCSLCAT
#undef HAVE_WCSDUP
#undef HAVE_WCSSTR
#undef HAVE_WCSCMP
#undef HAVE_WCSNCMP
#undef HAVE_STRLEN
#undef HAVE_STRLCPY
#undef HAVE_STRLCAT
@ -111,6 +114,8 @@
#undef HAVE_STRCHR
#undef HAVE_STRRCHR
#undef HAVE_STRSTR
#undef HAVE_STRTOK_R
#undef HAVE_STRTOK_S
#undef HAVE_ITOA
#undef HAVE__LTOA
#undef HAVE__UITOA
@ -192,14 +197,14 @@
#undef HAVE__EXIT
#else
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDINT_H 1
#endif /* HAVE_LIBC */
#undef HAVE_ALTIVEC_H
#undef HAVE_DBUS_DBUS_H
#undef HAVE_FCITX_FRONTEND_H
#undef HAVE_FCITX
#undef HAVE_IBUS_IBUS_H
#undef HAVE_IMMINTRIN_H
#undef HAVE_LIBSAMPLERATE_H
@ -210,7 +215,6 @@
#undef HAVE_DSOUND_H
#undef HAVE_DXGI_H
#undef HAVE_XINPUT_H
#undef HAVE_ENDPOINTVOLUME_H
#undef HAVE_MMDEVICEAPI_H
#undef HAVE_AUDIOCLIENT_H
#undef HAVE_XINPUT_GAMEPAD_EX
@ -285,7 +289,9 @@
#undef SDL_JOYSTICK_USBHID
#undef SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H
#undef SDL_JOYSTICK_HIDAPI
#undef SDL_JOYSTICK_RAWINPUT
#undef SDL_JOYSTICK_EMSCRIPTEN
#undef SDL_JOYSTICK_VIRTUAL
#undef SDL_HAPTIC_DUMMY
#undef SDL_HAPTIC_ANDROID
#undef SDL_HAPTIC_LINUX
@ -383,6 +389,9 @@
/* Enable Vulkan support */
#undef SDL_VIDEO_VULKAN
/* Enable Metal support */
#undef SDL_VIDEO_METAL
/* Enable system power support */
#undef SDL_POWER_LINUX
#undef SDL_POWER_WINDOWS
@ -405,6 +414,8 @@
/* Enable assembly routines */
#undef SDL_ASSEMBLY_ROUTINES
#undef SDL_ALTIVEC_BLITTERS
#undef SDL_ARM_SIMD_BLITTERS
#undef SDL_ARM_NEON_BLITTERS
/* Enable ime support */
#undef SDL_USE_IME
@ -412,6 +423,9 @@
/* Enable dynamic udev support */
#undef SDL_UDEV_DYNAMIC
/* Enable dynamic libusb support */
#undef SDL_LIBUSB_DYNAMIC
/* Enable dynamic libsamplerate support */
#undef SDL_LIBSAMPLERATE_DYNAMIC

+ 5
- 3
modules/SDL2/include/SDL_config_android.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -71,6 +71,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1
@ -135,8 +136,9 @@
/* Enable various input drivers */
#define SDL_JOYSTICK_ANDROID 1
#define SDL_JOYSTICK_HIDAPI 1
#define SDL_HAPTIC_ANDROID 1
#define SDL_JOYSTICK_HIDAPI 1
#define SDL_JOYSTICK_VIRTUAL 1
#define SDL_HAPTIC_ANDROID 1
/* Enable sensor driver */
#define SDL_SENSOR_ANDROID 1

+ 8
- 2
modules/SDL2/include/SDL_config_iphoneos.h View File

@ -1,6 +1,6 @@
/*
Simple DirectMedia Layer
Copyright (C) 1997-2019 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -71,6 +71,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1
@ -136,8 +137,9 @@
#define SDL_HAPTIC_DUMMY 1
/* Enable MFi joystick support */
#define SDL_JOYSTICK_MFI 1
/*#define SDL_JOYSTICK_HIDAPI 1*/
#define SDL_JOYSTICK_MFI 1
#define SDL_JOYSTICK_VIRTUAL 1
#ifdef __TVOS__
#define SDL_SENSOR_DUMMY 1
@ -181,6 +183,10 @@
#define SDL_VIDEO_VULKAN 1
#endif
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_METAL 1
#endif
/* Enable system power support */
#define SDL_POWER_UIKIT 1

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save