Browse Source

update sdl to 2.26.5

AzaezelX 2 years ago
parent
commit
0e44e165bd
100 changed files with 6012 additions and 7051 deletions
  1. 89 0
      Engine/lib/sdl/.clang-format
  2. 77 0
      Engine/lib/sdl/.editorconfig
  3. 4 0
      Engine/lib/sdl/.gitignore
  4. 15 0
      Engine/lib/sdl/.wikiheaders-options
  5. 8 2
      Engine/lib/sdl/Android.mk
  6. 282 142
      Engine/lib/sdl/CMakeLists.txt
  7. 1 1
      Engine/lib/sdl/LICENSE.txt
  8. 6 3
      Engine/lib/sdl/Makefile.in
  9. 11 6
      Engine/lib/sdl/Makefile.os2
  10. 81 23
      Engine/lib/sdl/Makefile.w32
  11. 0 119
      Engine/lib/sdl/SDL2Config.cmake
  12. 65 0
      Engine/lib/sdl/SDL2Config.cmake.in
  13. 6 0
      Engine/lib/sdl/VisualC-GDK/clean.sh
  14. BIN
      Engine/lib/sdl/VisualC-GDK/logos/Logo100x100.png
  15. BIN
      Engine/lib/sdl/VisualC-GDK/logos/Logo150x150.png
  16. BIN
      Engine/lib/sdl/VisualC-GDK/logos/Logo44x44.png
  17. BIN
      Engine/lib/sdl/VisualC-GDK/logos/Logo480x480.png
  18. BIN
      Engine/lib/sdl/VisualC-GDK/logos/SplashScreenImage.png
  19. 9 0
      Engine/lib/sdl/VisualC-GDK/tests/testgamecontroller/PackageLayout.xml
  20. 34 0
      Engine/lib/sdl/VisualC-GDK/tests/testgamecontroller/wingdk/MicrosoftGame.config
  21. 29 0
      Engine/lib/sdl/VisualC-GDK/tests/testgamecontroller/xboxone/MicrosoftGame.config
  22. 29 0
      Engine/lib/sdl/VisualC-GDK/tests/testgamecontroller/xboxseries/MicrosoftGame.config
  23. 10 0
      Engine/lib/sdl/VisualC-GDK/tests/testgdk/PackageLayout.xml
  24. 502 0
      Engine/lib/sdl/VisualC-GDK/tests/testgdk/src/testgdk.cpp
  25. 34 0
      Engine/lib/sdl/VisualC-GDK/tests/testgdk/wingdk/MicrosoftGame.config
  26. 29 0
      Engine/lib/sdl/VisualC-GDK/tests/testgdk/xboxone/MicrosoftGame.config
  27. 29 0
      Engine/lib/sdl/VisualC-GDK/tests/testgdk/xboxseries/MicrosoftGame.config
  28. 9 0
      Engine/lib/sdl/VisualC-GDK/tests/testsprite2/PackageLayout.xml
  29. 34 0
      Engine/lib/sdl/VisualC-GDK/tests/testsprite2/wingdk/MicrosoftGame.config
  30. 29 0
      Engine/lib/sdl/VisualC-GDK/tests/testsprite2/xboxone/MicrosoftGame.config
  31. 29 0
      Engine/lib/sdl/VisualC-GDK/tests/testsprite2/xboxseries/MicrosoftGame.config
  32. 96 13
      Engine/lib/sdl/WhatsNew.txt
  33. 32 384
      Engine/lib/sdl/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
  34. 14 0
      Engine/lib/sdl/Xcode-iOS/Demos/config.xcconfig
  35. 2 2
      Engine/lib/sdl/Xcode-iOS/Demos/src/accelerometer.c
  36. 1 1
      Engine/lib/sdl/Xcode-iOS/Demos/src/happy.c
  37. 1 1
      Engine/lib/sdl/Xcode-iOS/Demos/src/keyboard.c
  38. 1 1
      Engine/lib/sdl/Xcode-iOS/Demos/src/rectangles.c
  39. 1 1
      Engine/lib/sdl/Xcode-iOS/Demos/src/touch.c
  40. 0 422
      Engine/lib/sdl/Xcode-iOS/SDLtest/SDL2test.xcodeproj/project.pbxproj
  41. 0 34
      Engine/lib/sdl/Xcode-iOS/Test/Info.plist
  42. 0 11
      Engine/lib/sdl/Xcode-iOS/Test/README
  43. 0 3703
      Engine/lib/sdl/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
  44. 2 2
      Engine/lib/sdl/Xcode/SDL/Info-Framework.plist
  45. 256 52
      Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/project.pbxproj
  46. 67 0
      Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/Framework-iOS.xcscheme
  47. 67 0
      Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/xcFramework-iOS.xcscheme
  48. 7 21
      Engine/lib/sdl/Xcode/SDL/SDL2/Info.plist
  49. 1 1
      Engine/lib/sdl/Xcode/SDL/pkg-support/resources/License.txt
  50. 13 1
      Engine/lib/sdl/Xcode/SDL/pkg-support/resources/ReadMe.txt
  51. 184 602
      Engine/lib/sdl/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj
  52. 14 0
      Engine/lib/sdl/Xcode/SDLTest/config.xcconfig
  53. 173 0
      Engine/lib/sdl/acinclude/ax_compute_relative_paths.m4
  54. 115 0
      Engine/lib/sdl/acinclude/ax_normalize_path.m4
  55. 56 0
      Engine/lib/sdl/acinclude/ax_recursive_eval.m4
  56. 5 4
      Engine/lib/sdl/acinclude/esd.m4
  57. 4 0
      Engine/lib/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
  58. 186 525
      Engine/lib/sdl/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
  59. 26 0
      Engine/lib/sdl/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java
  60. 405 0
      Engine/lib/sdl/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java
  61. 351 0
      Engine/lib/sdl/build-scripts/android-prefab.sh
  62. 3 3
      Engine/lib/sdl/build-scripts/clang-fat.sh
  63. 6 3
      Engine/lib/sdl/build-scripts/config.guess
  64. 1 1
      Engine/lib/sdl/build-scripts/config.sub
  65. 1 1
      Engine/lib/sdl/build-scripts/emscripten-buildbot.sh
  66. 9 1
      Engine/lib/sdl/build-scripts/fnsince.pl
  67. 450 0
      Engine/lib/sdl/build-scripts/gen_audio_channel_conversion.c
  68. 4 3
      Engine/lib/sdl/build-scripts/gen_audio_resampler_filter.c
  69. 29 6
      Engine/lib/sdl/build-scripts/showrev.sh
  70. 47 17
      Engine/lib/sdl/build-scripts/test-versioning.sh
  71. 92 0
      Engine/lib/sdl/build-scripts/update-version.sh
  72. 31 1
      Engine/lib/sdl/build-scripts/updaterev.sh
  73. 178 32
      Engine/lib/sdl/build-scripts/wikiheaders.pl
  74. 0 8
      Engine/lib/sdl/build-scripts/winrtbuild.bat
  75. 0 302
      Engine/lib/sdl/build-scripts/winrtbuild.ps1
  76. 40 0
      Engine/lib/sdl/cmake/CheckCPUArchitecture.cmake
  77. 17 6
      Engine/lib/sdl/cmake/macros.cmake
  78. 221 189
      Engine/lib/sdl/cmake/sdlchecks.cmake
  79. 124 0
      Engine/lib/sdl/cmake/test/CMakeLists.txt
  80. 11 0
      Engine/lib/sdl/cmake/test/jni/Android.mk
  81. 14 0
      Engine/lib/sdl/cmake/test/main_cli.c
  82. 28 0
      Engine/lib/sdl/cmake/test/main_gui.c
  83. 33 0
      Engine/lib/sdl/cmake/test/main_lib.c
  84. 51 0
      Engine/lib/sdl/cmake/test/test_pkgconfig.sh
  85. 51 0
      Engine/lib/sdl/cmake/test/test_sdlconfig.sh
  86. 239 173
      Engine/lib/sdl/configure
  87. 245 78
      Engine/lib/sdl/configure.ac
  88. 97 0
      Engine/lib/sdl/docs/CONTRIBUTING.md
  89. 1 1
      Engine/lib/sdl/docs/README-android.md
  90. 107 28
      Engine/lib/sdl/docs/README-cmake.md
  91. 43 2
      Engine/lib/sdl/docs/README-emscripten.md
  92. 155 0
      Engine/lib/sdl/docs/README-gdk.md
  93. 35 3
      Engine/lib/sdl/docs/README-ios.md
  94. 10 9
      Engine/lib/sdl/docs/README-linux.md
  95. 3 3
      Engine/lib/sdl/docs/README-macos.md
  96. 27 0
      Engine/lib/sdl/docs/README-n3ds.md
  97. 51 0
      Engine/lib/sdl/docs/README-ps2.md
  98. 8 39
      Engine/lib/sdl/docs/README-winrt.md
  99. 4 8
      Engine/lib/sdl/docs/README.md
  100. 15 57
      Engine/lib/sdl/docs/release_checklist.md

+ 89 - 0
Engine/lib/sdl/.clang-format

@@ -0,0 +1,89 @@
+---
+AlignConsecutiveMacros: Consecutive
+AlignConsecutiveAssignments: None
+AlignConsecutiveBitFields: None
+AlignConsecutiveDeclarations: None
+AlignEscapedNewlines: Right
+AlignOperands: Align
+AlignTrailingComments: true
+
+AllowAllArgumentsOnNextLine: true
+AllowAllParametersOfDeclarationOnNextLine: true
+AllowShortEnumsOnASingleLine: true
+AllowShortBlocksOnASingleLine: Never
+AllowShortCaseLabelsOnASingleLine: false
+AllowShortFunctionsOnASingleLine: All
+AllowShortIfStatementsOnASingleLine: Never
+AllowShortLoopsOnASingleLine: false
+
+AlwaysBreakAfterDefinitionReturnType: All
+AlwaysBreakAfterReturnType: AllDefinitions
+AlwaysBreakBeforeMultilineStrings: false
+AlwaysBreakTemplateDeclarations: MultiLine
+
+# Custom brace breaking
+BreakBeforeBraces: Custom
+BraceWrapping:
+  AfterCaseLabel: true
+  AfterClass: true
+  AfterControlStatement: Never
+  AfterEnum: true
+  AfterFunction: true
+  AfterNamespace: true
+  AfterObjCDeclaration: true
+  AfterStruct: true
+  AfterUnion: true
+  AfterExternBlock: false
+  BeforeElse: false
+  BeforeWhile: true
+  IndentBraces: false
+  SplitEmptyFunction: true
+  SplitEmptyRecord: true
+
+# Make the closing brace of container literals go to a new line
+Cpp11BracedListStyle: false
+
+# Never format includes
+IncludeBlocks: Preserve
+# clang-format version 4.0 through 12.0:
+#SortIncludes: false
+# clang-format version 13.0+:
+#SortIncludes: Never
+
+# No length limit, in case it breaks macros, you can
+# disable it with /* clang-format off/on */ comments
+ColumnLimit: 0
+
+IndentWidth: 4
+ContinuationIndentWidth: 4
+IndentCaseLabels: false
+IndentCaseBlocks: false
+IndentGotoLabels: true
+IndentPPDirectives: None
+IndentExternBlock: NoIndent
+
+SpaceAfterCStyleCast: true
+SpacesInCStyleCastParentheses: false
+SpacesInConditionalStatement: false
+SpacesInContainerLiterals: true
+SpaceBeforeAssignmentOperators: true
+SpaceBeforeCaseColon: false
+SpaceBeforeParens: ControlStatements
+SpaceAroundPointerQualifiers: Default
+SpaceInEmptyBlock: false
+SpaceInEmptyParentheses: false
+
+UseCRLF: false
+UseTab: Never
+
+ForEachMacros:
+  [
+    "spa_list_for_each",
+    "spa_list_for_each_safe",
+    "wl_list_for_each",
+    "wl_array_for_each",
+    "udev_list_entry_foreach",
+  ]
+
+---
+

+ 77 - 0
Engine/lib/sdl/.editorconfig

@@ -0,0 +1,77 @@
+# For format see editorconfig.org
+# Copyright 2022 Collabora Ltd.
+# SPDX-License-Identifier: Zlib
+
+root = true
+
+[*.{c,cg,cpp,gradle,h,java,m,metal,pl,py,S,sh,txt}]
+indent_size = 4
+indent_style = space
+
+[*.{html,js,json,m4,yml,yaml,vcxproj,vcxproj.filters}]
+indent_size = 2
+indent_style = space
+
+[*.xml]
+indent_size = 4
+indent_style = space
+
+[{CMakeLists.txt,sdl2-config*.cmake.in,cmake/*.cmake}]
+indent_size = 2
+indent_style = space
+
+[{cmake_uninstall.cmake.in,test/CMakeLists.txt}]
+indent_size = 4
+indent_style = space
+
+[configure.ac]
+# Inconsistently 2-, 4- or occasionally 3-space indented, but mostly 4,
+# so let's use 4 for new code
+indent_size = 4
+indent_style = space
+
+[{Makefile.*,*.mk,*.sln,*.pbxproj,*.plist}]
+indent_size = 8
+indent_style = tab
+tab_width = 8
+
+[Makefile.os2]
+indent_size = 4
+indent_style = space
+
+[test/Makefile.os2]
+indent_size = 2
+indent_style = space
+
+[{src/core/os2/geniconv/makefile,src/core/os2/geniconv/os2cp.c}]
+indent_size = 2
+indent_style = space
+
+[src/joystick/controller_type.*]
+indent_style = tab
+
+[src/joystick/hidapi/steam/*.h]
+indent_style = tab
+
+[src/libm/*.c]
+indent_style = tab
+
+[src/test/SDL_test_{crc32,md5,random}.c]
+indent_size = 2
+indent_style = space
+
+[src/video/yuv2rgb/*.{c,h}]
+indent_style = tab
+
+[wayland-protocols/*.xml]
+indent_size = 2
+indent_style = space
+
+[*.{markdown,md}]
+indent_size = 4
+indent_style = space
+# Markdown syntax treats tabs as 4 spaces
+tab_width = 4
+
+[{*.bat,*.rc}]
+end_of_line = crlf

+ 4 - 0
Engine/lib/sdl/.gitignore

@@ -15,6 +15,7 @@ build
 gen
 gen
 Build
 Build
 buildbot
 buildbot
+/VERSION.txt
 
 
 *.so
 *.so
 *.so.*
 *.so.*
@@ -22,6 +23,7 @@ buildbot
 *.exe
 *.exe
 *.o
 *.o
 *.obj
 *.obj
+*.res
 *.lib
 *.lib
 *.a
 *.a
 *.la
 *.la
@@ -95,9 +97,11 @@ VisualC/visualtest/testsprite2.exe
 VisualC/visualtest/testsprite2_sample.actions
 VisualC/visualtest/testsprite2_sample.actions
 VisualC/visualtest/testsprite2_sample.config
 VisualC/visualtest/testsprite2_sample.config
 VisualC/visualtest/testsprite2_sample.parameters
 VisualC/visualtest/testsprite2_sample.parameters
+VisualC-GDK/**/Layout
 
 
 # for Android
 # for Android
 android-project/local.properties
 android-project/local.properties
+android-project/.gradle/
 
 
 test/checkkeys
 test/checkkeys
 test/checkkeysthreads
 test/checkkeysthreads

+ 15 - 0
Engine/lib/sdl/.wikiheaders-options

@@ -0,0 +1,15 @@
+projectfullname = SDL_mixer
+projectshortname = SDL_mixer
+incsubdir = include
+wikisubdir =
+apiprefixregex = (SDL_|SDLK_|KMOD_|AUDIO_)
+mainincludefname = SDL.h
+versionfname = include/SDL_version.h
+versionmajorregex = \A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z
+versionminorregex = \A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z
+versionpatchregex = \A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z
+selectheaderregex = \ASDL.*?\.h\Z
+projecturl = https://libsdl.org/
+wikiurl = https://wiki.libsdl.org
+bugreporturl = https://github.com/libsdl-org/sdlwiki/issues/new
+warn_about_missing = 0

+ 8 - 2
Engine/lib/sdl/Android.mk

@@ -75,12 +75,13 @@ LOCAL_CFLAGS += \
 	-Wstrict-prototypes \
 	-Wstrict-prototypes \
 	-Wkeyword-macro \
 	-Wkeyword-macro \
 
 
-
 # Warnings we haven't fixed (yet)
 # Warnings we haven't fixed (yet)
 LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
 LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
 
 
 LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
 LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
 
 
+LOCAL_LDFLAGS := -Wl,--no-undefined
+
 ifeq ($(NDK_DEBUG),1)
 ifeq ($(NDK_DEBUG),1)
     cmd-strip :=
     cmd-strip :=
 endif
 endif
@@ -89,6 +90,7 @@ LOCAL_STATIC_LIBRARIES := cpufeatures
 
 
 include $(BUILD_SHARED_LIBRARY)
 include $(BUILD_SHARED_LIBRARY)
 
 
+
 ###########################
 ###########################
 #
 #
 # SDL static library
 # SDL static library
@@ -99,11 +101,15 @@ LOCAL_MODULE := SDL2_static
 
 
 LOCAL_MODULE_FILENAME := libSDL2
 LOCAL_MODULE_FILENAME := libSDL2
 
 
-LOCAL_LDLIBS := 
+LOCAL_LDLIBS :=
+
+LOCAL_LDFLAGS :=
+
 LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
 LOCAL_EXPORT_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
 
 
 include $(BUILD_STATIC_LIBRARY)
 include $(BUILD_STATIC_LIBRARY)
 
 
+
 ###########################
 ###########################
 #
 #
 # SDL main static library
 # SDL main static library

File diff suppressed because it is too large
+ 282 - 142
Engine/lib/sdl/CMakeLists.txt


+ 1 - 1
Engine/lib/sdl/LICENSE.txt

@@ -1,4 +1,4 @@
-Copyright (C) 1997-2022 Sam Lantinga <[email protected]>
+Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
   
   
 This software is provided 'as-is', without any express or implied
 This software is provided 'as-is', without any express or implied
 warranty.  In no event will the authors be held liable for any damages
 warranty.  In no event will the authors be held liable for any damages

+ 6 - 3
Engine/lib/sdl/Makefile.in

@@ -32,6 +32,7 @@ RANLIB	= @RANLIB@
 RC	= @RC@
 RC	= @RC@
 LINKER = @LINKER@
 LINKER = @LINKER@
 LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
 LIBTOOLLINKERTAG = @LIBTOOLLINKERTAG@
+SDL_VENDOR_INFO = @SDL_VENDOR_INFO@
 
 
 TARGET  = libSDL2.la
 TARGET  = libSDL2.la
 OBJECTS = @OBJECTS@
 OBJECTS = @OBJECTS@
@@ -50,7 +51,7 @@ WAYLAND_SCANNER_CODE_MODE = @WAYLAND_SCANNER_CODE_MODE@
 
 
 INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
 INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
 
 
-SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac 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 VisualC-WinRT Xcode Xcode-iOS wayland-protocols
+SRC_DIST = *.md *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac docs include Makefile.* mingw sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake.in src test VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
 GEN_DIST = SDL2.spec
 GEN_DIST = SDL2.spec
 
 
 ifneq ($V,1)
 ifneq ($V,1)
@@ -80,6 +81,7 @@ HDRS = \
 	SDL_filesystem.h \
 	SDL_filesystem.h \
 	SDL_gamecontroller.h \
 	SDL_gamecontroller.h \
 	SDL_gesture.h \
 	SDL_gesture.h \
+	SDL_guid.h \
 	SDL_haptic.h \
 	SDL_haptic.h \
 	SDL_hidapi.h \
 	SDL_hidapi.h \
 	SDL_hints.h \
 	SDL_hints.h \
@@ -151,7 +153,7 @@ $(objects)/.created:
 	touch $@
 	touch $@
 
 
 update-revision:
 update-revision:
-	$(SHELL) $(auxdir)/updaterev.sh
+	$(SHELL) $(auxdir)/updaterev.sh --vendor "$(SDL_VENDOR_INFO)"
 
 
 .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
 .PHONY: all update-revision install install-bin install-hdrs install-lib install-data uninstall uninstall-bin uninstall-hdrs uninstall-lib uninstall-data clean distclean dist $(OBJECTS:.lo=.d)
 
 
@@ -251,7 +253,8 @@ dist $(distfile):
 	    -name '.#*' \) \
 	    -name '.#*' \) \
 	    -exec rm -f {} \;
 	    -exec rm -f {} \;
 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
 	if test -f $(distdir)/test/Makefile; then (cd $(distdir)/test && make distclean); fi
-	(cd $(distdir); build-scripts/updaterev.sh)
+	# Intentionally no vendor suffix: that's a property of the build, not the source
+	(cd $(distdir); $(srcdir)/build-scripts/updaterev.sh --dist)
 	tar cvf - $(distdir) | gzip --best >$(distfile)
 	tar cvf - $(distdir) | gzip --best >$(distfile)
 	rm -rf $(distdir)
 	rm -rf $(distdir)
 
 

+ 11 - 6
Engine/lib/sdl/Makefile.os2

@@ -9,11 +9,13 @@
 # can compile hidapi joystick support against it (experimental)
 # can compile hidapi joystick support against it (experimental)
 # by specifying HIDAPI=1, e.g.:
 # by specifying HIDAPI=1, e.g.:
 # wmake -f Makefile.os2 HIDAPI=1
 # wmake -f Makefile.os2 HIDAPI=1
+#
+# To error out upon warnings: wmake -f Makefile.os2 ENABLE_WERROR=1
 
 
 LIBNAME = SDL2
 LIBNAME = SDL2
 MAJOR_VERSION = 2
 MAJOR_VERSION = 2
-MINOR_VERSION = 23
-MICRO_VERSION = 0
+MINOR_VERSION = 26
+MICRO_VERSION = 5
 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
 DESCRIPTION = Simple DirectMedia Layer 2
 DESCRIPTION = Simple DirectMedia Layer 2
 
 
@@ -40,6 +42,9 @@ CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
 
 
 # max warnings:
 # max warnings:
 CFLAGS+= -wx
 CFLAGS+= -wx
+!ifeq ENABLE_WERROR 1
+CFLAGS+= -we
+!endif
 # newer OpenWatcom versions enable W303 by default
 # newer OpenWatcom versions enable W303 by default
 CFLAGS+= -wcd=303
 CFLAGS+= -wcd=303
 # the include paths :
 # the include paths :
@@ -67,15 +72,15 @@ CFLAGS_DLL+= -DSDL_BUILD_MAJOR_VERSION=$(MAJOR_VERSION)
 CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
 CFLAGS_DLL+= -DSDL_BUILD_MINOR_VERSION=$(MINOR_VERSION)
 CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
 CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
 
 
-SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c
-SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc32.c
+SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c SDL_utils.c
+SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc16.c SDL_crc32.c
 SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.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_rwops.c SDL_power.c
 SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
 SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
 SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
 SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
        SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
        SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
        SDL_sensor.c SDL_touch.c
        SDL_sensor.c SDL_touch.c
-SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c
+SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
 SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
 SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
        SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
        SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
        SDL_render_sw.c SDL_rotate.c SDL_triangle.c
        SDL_render_sw.c SDL_rotate.c SDL_triangle.c
@@ -89,7 +94,7 @@ SRCS+= SDL_systimer.c
 SRCS+= SDL_sysloadso.c
 SRCS+= SDL_sysloadso.c
 SRCS+= SDL_sysfilesystem.c
 SRCS+= SDL_sysfilesystem.c
 SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
 SRCS+= SDL_os2joystick.c SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
-SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
+SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
 SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
 SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
 SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
 SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
 SRCS+= SDL_dummysensor.c
 SRCS+= SDL_dummysensor.c

+ 81 - 23
Engine/lib/sdl/Makefile.w32

@@ -1,12 +1,13 @@
 # Open Watcom makefile to build SDL2.dll for Win32
 # Open Watcom makefile to build SDL2.dll for Win32
 # wmake -f Makefile.w32
 # wmake -f Makefile.w32
+#
+# To error out upon warnings: wmake -f Makefile.w32 ENABLE_WERROR=1
 
 
 LIBNAME = SDL2
 LIBNAME = SDL2
 MAJOR_VERSION = 2
 MAJOR_VERSION = 2
-MINOR_VERSION = 23
-MICRO_VERSION = 0
+MINOR_VERSION = 26
+MICRO_VERSION = 5
 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
 VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
-DESCRIPTION = Simple DirectMedia Layer 2
 
 
 LIBHOME = .
 LIBHOME = .
 DLLFILE = $(LIBHOME)/$(LIBNAME).dll
 DLLFILE = $(LIBHOME)/$(LIBNAME).dll
@@ -18,14 +19,22 @@ INCPATH = -I"$(%WATCOM)/h/nt" -I"$(%WATCOM)/h/nt/directx" -I"$(%WATCOM)/h"
 INCPATH+= -Iinclude
 INCPATH+= -Iinclude
 INCPATH+= -I"src/video/khronos"
 INCPATH+= -I"src/video/khronos"
 
 
+LIBM = SDL2libm.lib
 TLIB = SDL2test.lib
 TLIB = SDL2test.lib
-LIBS = user32.lib gdi32.lib winmm.lib imm32.lib ole32.lib oleaut32.lib shell32.lib setupapi.lib version.lib uuid.lib dxguid.lib
+# user32.lib, gdi32.lib, ole32.lib and oleaut32.lib are actually
+# among the default libraries in wlink.lnk for nt_dll linkage...
+LIBS = user32.lib gdi32.lib winmm.lib imm32.lib ole32.lib oleaut32.lib shell32.lib setupapi.lib version.lib uuid.lib dxguid.lib $(LIBM)
 
 
 CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
 CFLAGS = -bt=nt -d0 -q -bm -5s -fp5 -fpi87 -sg -oeatxhn -ei
 # max warnings:
 # max warnings:
 CFLAGS+= -wx
 CFLAGS+= -wx
+!ifeq ENABLE_WERROR 1
+CFLAGS+= -we
+!endif
 # newer OpenWatcom versions enable W303 by default
 # newer OpenWatcom versions enable W303 by default
 CFLAGS+= -wcd=303
 CFLAGS+= -wcd=303
+# new vulkan headers result in lots of W202 warnings
+CFLAGS+= -wcd=202
 # the include paths :
 # the include paths :
 CFLAGS+= $(INCPATH)
 CFLAGS+= $(INCPATH)
 CFLAGS_STATIC=$(CFLAGS)
 CFLAGS_STATIC=$(CFLAGS)
@@ -42,15 +51,15 @@ CFLAGS_DLL+= -DSDL_BUILD_MICRO_VERSION=$(MICRO_VERSION)
 
 
 RCFLAGS = -q -r -bt=nt $(INCPATH)
 RCFLAGS = -q -r -bt=nt $(INCPATH)
 
 
-SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c
-SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc32.c
+SRCS = SDL.c SDL_assert.c SDL_error.c SDL_guid.c SDL_log.c SDL_dataqueue.c SDL_hints.c SDL_list.c SDL_utils.c
+SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c SDL_crc16.c SDL_crc32.c
 SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.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_rwops.c SDL_power.c
 SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
 SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
 SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
 SRCS+= SDL_events.c SDL_quit.c SDL_keyboard.c SDL_mouse.c SDL_windowevents.c &
        SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
        SDL_clipboardevents.c SDL_dropevents.c SDL_displayevents.c SDL_gesture.c &
        SDL_sensor.c SDL_touch.c
        SDL_sensor.c SDL_touch.c
-SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c
+SRCS+= SDL_haptic.c SDL_hidapi.c SDL_gamecontroller.c SDL_joystick.c controller_type.c
 SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
 SRCS+= SDL_render.c yuv_rgb.c SDL_yuv.c SDL_yuv_sw.c SDL_blendfillrect.c &
        SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
        SDL_blendline.c SDL_blendpoint.c SDL_drawline.c SDL_drawpoint.c &
        SDL_render_sw.c SDL_rotate.c SDL_triangle.c
        SDL_render_sw.c SDL_rotate.c SDL_triangle.c
@@ -59,16 +68,12 @@ SRCS+= SDL_blit.c SDL_blit_0.c SDL_blit_1.c SDL_blit_A.c SDL_blit_auto.c &
        SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
        SDL_pixels.c SDL_rect.c SDL_RLEaccel.c SDL_shape.c SDL_stretch.c &
        SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
        SDL_surface.c SDL_video.c SDL_clipboard.c SDL_vulkan_utils.c SDL_egl.c
 
 
-SRCS+= e_atan2.c e_exp.c e_fmod.c e_log10.c e_log.c e_pow.c e_rem_pio2.c e_sqrt.c &
-       k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
-       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_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
 SRCS+= SDL_syscond.c SDL_sysmutex.c SDL_syssem.c SDL_systhread.c SDL_systls.c
 SRCS+= SDL_systimer.c
 SRCS+= SDL_systimer.c
 SRCS+= SDL_sysloadso.c
 SRCS+= SDL_sysloadso.c
 SRCS+= SDL_sysfilesystem.c
 SRCS+= SDL_sysfilesystem.c
 SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
 SRCS+= SDL_syshaptic.c SDL_sysjoystick.c SDL_virtualjoystick.c
-SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
+SRCS+= SDL_hidapijoystick.c SDL_hidapi_rumble.c SDL_hidapi_combined.c SDL_hidapi_gamecube.c SDL_hidapi_luna.c SDL_hidapi_ps3.c SDL_hidapi_ps4.c SDL_hidapi_ps5.c SDL_hidapi_shield.c SDL_hidapi_stadia.c SDL_hidapi_switch.c SDL_hidapi_wii.c SDL_hidapi_xbox360.c SDL_hidapi_xbox360w.c SDL_hidapi_xboxone.c SDL_hidapi_steam.c
 SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
 SRCS+= SDL_dummyaudio.c SDL_diskaudio.c
 SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
 SRCS+= SDL_nullvideo.c SDL_nullframebuffer.c SDL_nullevents.c
 SRCS+= SDL_dummysensor.c
 SRCS+= SDL_dummysensor.c
@@ -76,13 +81,14 @@ SRCS+= SDL_locale.c SDL_syslocale.c
 SRCS+= SDL_url.c SDL_sysurl.c
 SRCS+= SDL_url.c SDL_sysurl.c
 
 
 SRCS+= SDL_winmm.c SDL_directsound.c SDL_wasapi.c SDL_wasapi_win32.c
 SRCS+= SDL_winmm.c SDL_directsound.c SDL_wasapi.c SDL_wasapi_win32.c
-SRCS+= SDL_hid.c SDL_windows.c SDL_xinput.c
+SRCS+= SDL_hid.c SDL_immdevice.c SDL_windows.c SDL_xinput.c
 SRCS+= SDL_dinputhaptic.c SDL_windowshaptic.c SDL_xinputhaptic.c
 SRCS+= SDL_dinputhaptic.c SDL_windowshaptic.c SDL_xinputhaptic.c
 SRCS+= SDL_dinputjoystick.c SDL_rawinputjoystick.c SDL_windowsjoystick.c SDL_windows_gaming_input.c SDL_xinputjoystick.c
 SRCS+= SDL_dinputjoystick.c SDL_rawinputjoystick.c SDL_windowsjoystick.c SDL_windows_gaming_input.c SDL_xinputjoystick.c
 SRCS+= SDL_syspower.c
 SRCS+= SDL_syspower.c
 SRCS+= SDL_d3dmath.c
 SRCS+= SDL_d3dmath.c
 SRCS+= SDL_render_d3d.c SDL_shaders_d3d.c
 SRCS+= SDL_render_d3d.c SDL_shaders_d3d.c
 SRCS+= SDL_render_d3d11.c SDL_shaders_d3d11.c
 SRCS+= SDL_render_d3d11.c SDL_shaders_d3d11.c
+SRCS+= SDL_render_d3d12.c SDL_shaders_d3d12.c
 SRCS+= SDL_render_gl.c SDL_shaders_gl.c
 SRCS+= SDL_render_gl.c SDL_shaders_gl.c
 SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
 SRCS+= SDL_render_gles2.c SDL_shaders_gles2.c
 SRCS+= SDL_windowssensor.c
 SRCS+= SDL_windowssensor.c
@@ -91,7 +97,7 @@ SRCS+= SDL_windowsclipboard.c SDL_windowsevents.c SDL_windowsframebuffer.c SDL_w
 
 
 SRCS+= SDL_dynapi.c
 SRCS+= SDL_dynapi.c
 
 
-RCSRCS+= version.rc
+RCSRCS = version.rc
 
 
 OBJS = $(SRCS:.c=.obj)
 OBJS = $(SRCS:.c=.obj)
 RCOBJS= $(RCSRCS:.rc=.res)
 RCOBJS= $(RCSRCS:.rc=.res)
@@ -99,11 +105,10 @@ RCOBJS= $(RCSRCS:.rc=.res)
 .extensions:
 .extensions:
 .extensions: .lib .dll .obj .res .c .rc .asm
 .extensions: .lib .dll .obj .res .c .rc .asm
 
 
-.c: ./src/libm;
 .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;./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/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
 .c: ./src/haptic/dummy;./src/joystick/dummy;./src/joystick/virtual;./src/audio/dummy;./src/video/dummy;./src/sensor/dummy;
 .c: ./src/core/windows;./src/audio/winmm;./src/audio/directsound;./src/audio/wasapi;./src/loadso/windows;./src/filesystem/windows;./src/haptic/windows;./src/joystick/windows;./src/sensor/windows;./src/thread/windows;./src/timer/windows;./src/video/windows;
 .c: ./src/core/windows;./src/audio/winmm;./src/audio/directsound;./src/audio/wasapi;./src/loadso/windows;./src/filesystem/windows;./src/haptic/windows;./src/joystick/windows;./src/sensor/windows;./src/thread/windows;./src/timer/windows;./src/video/windows;
-.c: ./src/locale/;./src/locale/windows;./src/misc;./src/misc/windows;./src/power/windows;./src/joystick/hidapi;./src/hidapi;./src/render/direct3d;./src/render/direct3d11;./src/render/opengl;./src/render/opengles2
+.c: ./src/locale/;./src/locale/windows;./src/misc;./src/misc/windows;./src/power/windows;./src/joystick/hidapi;./src/hidapi;./src/render/direct3d;./src/render/direct3d11;./src/render/direct3d12;./src/render/opengl;./src/render/opengles2
 .rc: ./src/main/windows
 .rc: ./src/main/windows
 
 
 all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
 all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
@@ -111,10 +116,9 @@ all: $(DLLFILE) $(LIBFILE) $(TLIB) .symbolic
 build_dll: .symbolic
 build_dll: .symbolic
     @echo * Compiling dll objects
     @echo * Compiling dll objects
 
 
-$(DLLFILE): build_dll $(OBJS) $(MOBJS) $(RCOBJS) $(LNKFILE)
+$(DLLFILE): build_dll $(OBJS) $(LIBM) $(RCOBJS) $(LNKFILE)
     @echo * Linking: $@
     @echo * Linking: $@
     wlink @$(LNKFILE)
     wlink @$(LNKFILE)
-    wrc $(RCOBJS) $^@
 
 
 $(LIBFILE): $(DLLFILE)
 $(LIBFILE): $(DLLFILE)
     @echo * Creating LIB file: $@
     @echo * Creating LIB file: $@
@@ -140,9 +144,62 @@ SDL_blendpoint.obj: SDL_blendpoint.c
     wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
     wcc386 $(CFLAGS_DLL) -wcd=200 -fo=$^@ $<
 SDL_RLEaccel.obj: SDL_RLEaccel.c
 SDL_RLEaccel.obj: SDL_RLEaccel.c
     wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
     wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
-# c99 mode needed because of structs with flexible array members in libusb.h
-SDL_hidapi.obj: SDL_hidapi.c
-    wcc386 $(CFLAGS_DLL) -za99 -fo=$^@ $<
+SDL_malloc.obj: SDL_malloc.c
+    wcc386 $(CFLAGS_DLL) -wcd=201 -fo=$^@ $<
+
+# SDL2libm
+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.c &
+       k_cos.c k_rem_pio2.c k_sin.c k_tan.c &
+       s_atan.c s_copysign.c s_cos.c s_fabs.c s_floor.c s_scalbn.c s_sin.c s_tan.c
+MOBJS= $(MSRCS:.c=.obj)
+
+.c: ./src/libm;
+e_atan2.obj: e_atan2.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+e_exp.obj: e_exp.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+e_fmod.obj: e_fmod.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+e_log10.obj: e_log10.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+e_log.obj: e_log.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+e_pow.obj: e_pow.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+e_rem_pio2.obj: e_rem_pio2.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+e_sqrt.obj: e_sqrt.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+k_cos.obj: k_cos.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+k_rem_pio2.obj: k_rem_pio2.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+k_sin.obj: k_sin.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+k_tan.obj: k_tan.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+s_atan.obj: s_atan.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+s_copysign.obj: s_copysign.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+s_cos.obj: s_cos.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+s_fabs.obj: s_fabs.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+s_floor.obj: s_floor.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+s_scalbn.obj: s_scalbn.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+s_sin.obj: s_sin.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+s_tan.obj: s_tan.c
+    wcc386 $(CFLAGS_STATIC) -fo=$^@ $<
+
+build_libm: .symbolic
+    @echo * Compiling libm objects
+$(LIBM): build_libm $(MOBJS)
+    @echo * Creating: $@
+    wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
 
 
 # SDL2test
 # SDL2test
 TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
 TSRCS = SDL_test_assert.c SDL_test_common.c SDL_test_compare.c &
@@ -199,20 +256,21 @@ $(LNKFILE): Makefile.w32
     @%append $@ NAME $(DLLFILE)
     @%append $@ NAME $(DLLFILE)
     @for %i in ($(OBJS)) do @%append $@ FILE %i
     @for %i in ($(OBJS)) do @%append $@ FILE %i
     @for %i in ($(LIBS)) do @%append $@ LIB %i
     @for %i in ($(LIBS)) do @%append $@ LIB %i
+    @%append $@ OPTION RESOURCE=$(RCOBJS)
     @%append $@ EXPORT=src/dynapi/SDL2.exports
     @%append $@ EXPORT=src/dynapi/SDL2.exports
     @%append $@ OPTION QUIET
     @%append $@ OPTION QUIET
     @%append $@ OPTION IMPF=$(EXPFILE)
     @%append $@ OPTION IMPF=$(EXPFILE)
     @%append $@ OPTION MAP=$(LIBHOME)/$^&.map
     @%append $@ OPTION MAP=$(LIBHOME)/$^&.map
-    @%append $@ OPTION DESCRIPTION '@$#libsdl org:$(VERSION)$#@$(DESCRIPTION)'
     @%append $@ OPTION ELIMINATE
     @%append $@ OPTION ELIMINATE
-    @%append $@ OPTION OSNAME='Windows NT'
     @%append $@ OPTION SHOWDEAD
     @%append $@ OPTION SHOWDEAD
 
 
 clean: .SYMBOLIC
 clean: .SYMBOLIC
     @echo * Clean: $(LIBNAME)
     @echo * Clean: $(LIBNAME)
     @if exist *.obj rm *.obj
     @if exist *.obj rm *.obj
+    @if exist *.res rm *.res
     @if exist *.err rm *.err
     @if exist *.err rm *.err
     @if exist $(LNKFILE) rm $(LNKFILE)
     @if exist $(LNKFILE) rm $(LNKFILE)
+    @if exist $(LIBM) rm $(LIBM)
 
 
 distclean: .SYMBOLIC clean
 distclean: .SYMBOLIC clean
     @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
     @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp

+ 0 - 119
Engine/lib/sdl/SDL2Config.cmake

@@ -1,119 +0,0 @@
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
-  include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
-endif()
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
-  include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
-endif()
-if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
-  include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
-endif()
-
-# on static-only builds create an alias
-if(NOT TARGET SDL2::SDL2 AND TARGET SDL2::SDL2-static)
-  if(CMAKE_VERSION VERSION_LESS "3.18")
-      # Aliasing local targets is not supported on CMake < 3.18, so make it global.
-      set_target_properties(SDL2::SDL2-static PROPERTIES IMPORTED_GLOBAL TRUE)
-  endif()
-  add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
-endif()
-
-# provide ${SDL2_LIBRARIES}, ${SDL2_INCLUDE_DIRS} etc, like sdl2-config.cmake does,
-# for compatibility between SDL2 built with autotools and SDL2 built with CMake
-
-# the following seems to work on Windows for both MSVC and MINGW+MSYS and with both SDL2Config/Target.cmake
-# from vcpkg and from building myself with cmake from latest git
-# AND on Linux when building SDL2 (tested current git) with CMake
-
-# the headers are easy - but note that this adds both .../include/ and .../include/SDL2/
-# while the SDL2_INCLUDE_DIRS of sdl2-config.cmake only add ...include/SDL2/
-# But at least if building worked with sdl2-config.cmake it will also work with this.
-get_target_property(SDL2_INCLUDE_DIRS SDL2::SDL2 INTERFACE_INCLUDE_DIRECTORIES)
-
-# get the paths to the files to link against (.lib or .dll.a on Windows, .so or .a on Unix, ...) for both SDL2 and SDL2main
-
-# for the "normal"/release build they could be in lots of different properties..
-set(relprops IMPORTED_IMPLIB_RELEASE IMPORTED_IMPLIB_NOCONFIG IMPORTED_IMPLIB IMPORTED_IMPLIB_MINSIZEREL IMPORTED_IMPLIB_RELWITHDEBINFO
-             IMPORTED_LOCATION_RELEASE IMPORTED_LOCATION_NOCONFIG IMPORTED_LOCATION IMPORTED_LOCATION_MINSIZEREL IMPORTED_LOCATION_RELWITHDEBINFO)
-
-# fewer possibilities for debug builds
-set(dbgprops IMPORTED_IMPLIB_DEBUG IMPORTED_LOCATION_DEBUG)
-
-foreach(prop ${relprops})
-	get_target_property(sdl2implib SDL2::SDL2 ${prop})
-	if(sdl2implib)
-		#message("set sdl2implib from ${prop}")
-		break()
-	endif()
-endforeach()
-
-foreach(prop ${relprops})
-	get_target_property(sdl2mainimplib SDL2::SDL2main ${prop})
-	if(sdl2mainimplib)
-		#message("set sdl2mainimplib from ${prop}")
-		break()
-	endif()
-endforeach()
-
-foreach(prop ${dbgprops})
-	get_target_property(sdl2implibdbg SDL2::SDL2 ${prop})
-	if(sdl2implibdbg)
-		#message("set sdl2implibdbg from ${prop}")
-		break()
-	endif()
-endforeach()
-
-foreach(prop ${dbgprops})
-	get_target_property(sdl2mainimplibdbg SDL2::SDL2main ${prop})
-	if(sdl2mainimplibdbg)
-		#message("set sdl2mainimplibdbg from ${prop}")
-		break()
-	endif()
-endforeach()
-
-if( sdl2implib AND sdl2mainimplib AND sdl2implibdbg AND sdl2mainimplibdbg )
-	# we have both release and debug builds of SDL2 and SDL2main, so use this ugly
-	# generator expression in SDL2_LIBRARIES to support both in MSVC, depending on build type configured there
-	set(SDL2_LIBRARIES $<IF:$<CONFIG:Debug>,${sdl2mainimplibdbg},${sdl2mainimplib}>   $<IF:$<CONFIG:Debug>,${sdl2implibdbg},${sdl2implib}>)
-else()
-	if( (NOT sdl2implib) AND sdl2implibdbg ) # if we only have a debug version of the lib
-		set(sdl2implib ${sdl2implibdbg})
-	endif()
-	if( (NOT sdl2mainimplib) AND sdl2mainimplibdbg ) # if we only have a debug version of the lib
-		set(sdl2mainimplib ${sdl2mainimplibdbg})
-	endif()
-
-	if( sdl2implib AND sdl2mainimplib )
-		set(SDL2_LIBRARIES ${sdl2mainimplib}  ${sdl2implib})
-	elseif(WIN32 OR APPLE) # I think these platforms have a non-dummy SDLmain?
-		message(FATAL_ERROR, "SDL2::SDL2 and/or SDL2::SDL2main don't seem to contain any kind of IMPORTED_IMPLIB* or IMPORTED_LOCATION*")
-	elseif(sdl2implib) # on other platforms just libSDL2 will hopefully do?
-		set(SDL2_LIBRARIES ${sdl2implib})
-		message(STATUS, "No SDL2main lib not found, I hope you don't need it..")
-	else()
-		message(FATAL_ERROR, "SDL2::SDL2 doesn't seem to contain any kind of lib to link against in IMPORTED_IMPLIB* or IMPORTED_LOCATION*")
-	endif()
-
-	# TODO: should something like INTERFACE_LINK_LIBRARIES be appended? or wherever -mwindows and things like that
-	#       might be defined (if they were defined by the CMake build at all; autotools has @SDL_RLD_FLAGS@ @SDL_LIBS@)?
-	#       LINK_DEPENDS? LINK_FLAGS?
-
-endif()
-
-get_filename_component(SDL2_LIBDIR ${sdl2implib} PATH)
-
-# NOTE: SDL2_LIBRARIES now looks like "c:/path/to/SDL2main.lib;c:/path/to/SDL2.lib"
-#       which is different to what it looks like when coming from sdl2-config.cmake
-#       (there it's more like "-L${SDL2_LIBDIR} -lSDL2main -lSDL2" - and also -lmingw32 and -mwindows)
-#       This seems to work with both MSVC and MinGW though, while the other only worked with MinGW
-#   On Linux it looks like "/tmp/sdl2inst/lib/libSDL2main.a;/tmp/sdl2inst/lib/libSDL2-2.0.so.0.14.1" which also seems to work
-
-# the exec prefix is one level up from lib/ - TODO: really, always? at least on Linux there's /usr/lib/x86_64-bla-blub/libSDL2-asdf.so.0 ..
-get_filename_component(SDL2_EXEC_PREFIX ${SDL2_LIBDIR} PATH)
-set(SDL2_PREFIX ${SDL2_EXEC_PREFIX}) # TODO: could this be somewhere else? parent dir of include or sth?
-
-unset(sdl2implib)
-unset(sdl2mainimplib)
-unset(sdl2implibdbg)
-unset(sdl2mainimplibdbg)
-unset(relprops)
-unset(dbgprops)

+ 65 - 0
Engine/lib/sdl/SDL2Config.cmake.in

@@ -0,0 +1,65 @@
+# sdl2 cmake project-config input for CMakeLists.txt script
+
+include(FeatureSummary)
+set_package_properties(SDL2 PROPERTIES
+  URL "https://www.libsdl.org/"
+  DESCRIPTION "low level access to audio, keyboard, mouse, joystick, and graphics hardware"
+)
+
+@PACKAGE_INIT@
+
+set(SDL2_FOUND TRUE)
+
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
+  include("${CMAKE_CURRENT_LIST_DIR}/SDL2Targets.cmake")
+  set(SDL2_SDL2_FOUND TRUE)
+endif()
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
+  if(ANDROID)
+    enable_language(CXX)
+  endif()
+  include("${CMAKE_CURRENT_LIST_DIR}/SDL2staticTargets.cmake")
+  set(SDL2_SDL2-static_FOUND TRUE)
+endif()
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
+  include("${CMAKE_CURRENT_LIST_DIR}/SDL2mainTargets.cmake")
+  set(SDL2_SDL2main_FOUND TRUE)
+endif()
+if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
+  include("${CMAKE_CURRENT_LIST_DIR}/SDL2testTargets.cmake")
+  set(SDL2_SDL2test_FOUND TRUE)
+endif()
+
+check_required_components(SDL2)
+
+# Create SDL2::SDL2 alias for static-only builds
+if(TARGET SDL2::SDL2-static AND NOT TARGET SDL2::SDL2)
+  if(CMAKE_VERSION VERSION_LESS "3.18")
+    # FIXME: Aliasing local targets is not supported on CMake < 3.18, so make it global.
+    add_library(SDL2::SDL2 INTERFACE IMPORTED)
+    set_target_properties(SDL2::SDL2 PROPERTIES INTERFACE_LINK_LIBRARIES "SDL2::SDL2-static")
+  else()
+    add_library(SDL2::SDL2 ALIAS SDL2::SDL2-static)
+  endif()
+endif()
+
+# For compatibility with autotools sdl2-config.cmake, provide SDL2_* variables.
+
+set(SDL2_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
+set(SDL2_EXEC_PREFIX "@PACKAGE_CMAKE_INSTALL_PREFIX@")
+set(SDL2_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
+set(SDL2_INCLUDE_DIRS "@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@;@PACKAGE_CMAKE_INSTALL_FULL_INCLUDEDIR@/SDL2")
+set(SDL2_BINDIR "@PACKAGE_CMAKE_INSTALL_FULL_BINDIR@")
+set(SDL2_LIBDIR "@PACKAGE_CMAKE_INSTALL_FULL_LIBDIR@")
+set(SDL2_LIBRARIES SDL2::SDL2)
+set(SDL2_STATIC_LIBRARIES SDL2::SDL2-static)
+set(SDL2_STATIC_PRIVATE_LIBS)
+
+set(SDL2MAIN_LIBRARY)
+if(TARGET SDL2::SDL2main)
+  set(SDL2MAIN_LIBRARY SDL2::SDL2main)
+  list(INSERT SDL2_LIBRARIES 0 SDL2::SDL2main)
+  list(INSERT SDL2_STATIC_LIBRARIES 0 SDL2::SDL2main)
+endif()
+
+set(SDL2TEST_LIBRARY SDL2::SDL2test)

+ 6 - 0
Engine/lib/sdl/VisualC-GDK/clean.sh

@@ -0,0 +1,6 @@
+#!/bin/sh
+find . -type f \( -name '*.user' -o -name '*.sdf' -o -name '*.ncb' -o -name '*.suo' \) -print -delete
+find . -type f \( -name '*.bmp' -o -name '*.wav' -o -name '*.dat' \) -print -delete
+find . -depth -type d \( -name Gaming.Desktop.x64 \) -exec rm -rv {} \;
+find . -depth -type d \( -name Gaming.Xbox.Scarlett.x64 \) -exec rm -rv {} \;
+find . -depth -type d \( -name Gaming.Xbox.XboxOne.x64 \) -exec rm -rv {} \;

BIN
Engine/lib/sdl/VisualC-GDK/logos/Logo100x100.png


BIN
Engine/lib/sdl/VisualC-GDK/logos/Logo150x150.png


BIN
Engine/lib/sdl/VisualC-GDK/logos/Logo44x44.png


BIN
Engine/lib/sdl/VisualC-GDK/logos/Logo480x480.png


BIN
Engine/lib/sdl/VisualC-GDK/logos/SplashScreenImage.png


+ 9 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgamecontroller/PackageLayout.xml

@@ -0,0 +1,9 @@
+<Package>
+  <Chunk Id="1000" Marker="Launch">
+    <FileGroup DestinationPath="." SourcePath="." Include="testgamecontroller.exe" />
+    <FileGroup DestinationPath="." SourcePath="." Include="MicrosoftGame.config" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.bmp" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.png" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.dll" />
+  </Chunk>
+</Package>

+ 34 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgamecontroller/wingdk/MicrosoftGame.config

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testgamecontroller.exe"
+					TargetDeviceFamily="PC"
+					Id="Game" />
+	</ExecutableList>
+
+	<DesktopRegistration>
+		<DependencyList>
+			<KnownDependency Name="VC14"/>
+		</DependencyList>
+	</DesktopRegistration>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testgamecontroller"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					Description="testgamecontroller"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 29 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgamecontroller/xboxone/MicrosoftGame.config

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testgamecontroller.exe"
+					TargetDeviceFamily="XboxOne"
+					Id="Game" />
+	</ExecutableList>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testgamecontroller"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					SplashScreenImage="SplashScreenImage.png"
+					Description="testgamecontroller"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 29 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgamecontroller/xboxseries/MicrosoftGame.config

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testgamecontroller.exe"
+					TargetDeviceFamily="Scarlett"
+					Id="Game" />
+	</ExecutableList>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testgamecontroller"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					SplashScreenImage="SplashScreenImage.png"
+					Description="testgamecontroller"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 10 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgdk/PackageLayout.xml

@@ -0,0 +1,10 @@
+<Package>
+  <Chunk Id="1000" Marker="Launch">
+    <FileGroup DestinationPath="." SourcePath="." Include="testgdk.exe" />
+    <FileGroup DestinationPath="." SourcePath="." Include="MicrosoftGame.config" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.bmp" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.wav" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.png" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.dll" />
+  </Chunk>
+</Package>

+ 502 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgdk/src/testgdk.cpp

@@ -0,0 +1,502 @@
+/*
+  Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely.
+*/
+/* testgdk:  Basic tests of using task queue/xbl (with simple drawing) in GDK.
+ * NOTE: As of June 2022 GDK, login will only work if MicrosoftGame.config is
+ * configured properly. See README-gdk.md.
+ */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <time.h>
+
+#include "SDL_test.h"
+#include "SDL_test_common.h"
+#include "../src/core/windows/SDL_windows.h"
+
+extern "C" {
+#include "../test/testutils.h"
+}
+
+#include <XGameRuntime.h>
+
+#define NUM_SPRITES    100
+#define MAX_SPEED     1
+
+static SDLTest_CommonState *state;
+static int num_sprites;
+static SDL_Texture **sprites;
+static SDL_bool cycle_color;
+static SDL_bool cycle_alpha;
+static int cycle_direction = 1;
+static int current_alpha = 0;
+static int current_color = 0;
+static int sprite_w, sprite_h;
+static SDL_BlendMode blendMode = SDL_BLENDMODE_BLEND;
+
+int done;
+
+static struct
+{
+    SDL_AudioSpec spec;
+    Uint8 *sound;    /* Pointer to wave data */
+    Uint32 soundlen; /* Length of wave data */
+    int soundpos;    /* Current play position */
+} wave;
+
+static SDL_AudioDeviceID device;
+
+static void
+close_audio()
+{
+    if (device != 0) {
+        SDL_CloseAudioDevice(device);
+        device = 0;
+    }
+}
+
+/* Call this instead of exit(), so we can clean up SDL: atexit() is evil. */
+static void
+quit(int rc)
+{
+    SDL_free(sprites);
+    close_audio();
+    SDL_FreeWAV(wave.sound);
+    SDLTest_CommonQuit(state);
+    /* If rc is 0, just let main return normally rather than calling exit.
+     * This allows testing of platforms where SDL_main is required and does meaningful cleanup.
+     */
+    if (rc != 0) {
+        exit(rc);
+    }
+}
+
+static void
+open_audio()
+{
+    /* Initialize fillerup() variables */
+    device = SDL_OpenAudioDevice(NULL, SDL_FALSE, &wave.spec, NULL, 0);
+    if (!device) {
+        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't open audio: %s\n", SDL_GetError());
+        SDL_FreeWAV(wave.sound);
+        quit(2);
+    }
+
+    /* Let the audio run */
+    SDL_PauseAudioDevice(device, SDL_FALSE);
+}
+
+static void
+reopen_audio()
+{
+    close_audio();
+    open_audio();
+}
+
+void SDLCALL
+fillerup(void *unused, Uint8 *stream, int len)
+{
+    Uint8 *waveptr;
+    int waveleft;
+
+    /* Set up the pointers */
+    waveptr = wave.sound + wave.soundpos;
+    waveleft = wave.soundlen - wave.soundpos;
+
+    /* Go! */
+    while (waveleft <= len) {
+        SDL_memcpy(stream, waveptr, waveleft);
+        stream += waveleft;
+        len -= waveleft;
+        waveptr = wave.sound;
+        waveleft = wave.soundlen;
+        wave.soundpos = 0;
+    }
+    SDL_memcpy(stream, waveptr, len);
+    wave.soundpos += len;
+}
+
+void
+UserLoggedIn(XUserHandle user)
+{
+    HRESULT hr;
+    char gamertag[128];
+    hr = XUserGetGamertag(user, XUserGamertagComponent::UniqueModern, sizeof(gamertag), gamertag, NULL);
+
+    if (SUCCEEDED(hr)) {
+        SDL_Log("User logged in: %s", gamertag);
+    } else {
+        SDL_Log("[GDK] UserLoggedIn -- XUserGetGamertag failed: 0x%08x.", hr);
+    }
+
+    XUserCloseHandle(user);
+}
+
+void
+AddUserUICallback(XAsyncBlock *asyncBlock)
+{
+    HRESULT hr;
+    XUserHandle user = NULL;
+
+    hr = XUserAddResult(asyncBlock, &user);
+    if (SUCCEEDED(hr)) {
+        uint64_t userId;
+
+        hr = XUserGetId(user, &userId);
+        if (FAILED(hr)) {
+            /* If unable to get the user ID, it means the account is banned, etc. */
+            SDL_Log("[GDK] AddUserSilentCallback -- XUserGetId failed: 0x%08x.", hr);
+            XUserCloseHandle(user);
+
+            /* Per the docs, likely should call XUserResolveIssueWithUiAsync here. */
+        } else {
+            UserLoggedIn(user);
+        }
+    } else {
+        SDL_Log("[GDK] AddUserUICallback -- XUserAddAsync failed: 0x%08x.", hr);
+    }
+
+    delete asyncBlock;
+}
+
+void
+AddUserUI()
+{
+    HRESULT hr;
+    XAsyncBlock *asyncBlock = new XAsyncBlock;
+
+    asyncBlock->context = NULL;
+    asyncBlock->queue = NULL; /* A null queue will use the global process task queue */
+    asyncBlock->callback = &AddUserUICallback;
+
+    hr = XUserAddAsync(XUserAddOptions::None, asyncBlock);
+
+    if (FAILED(hr)) {
+        delete asyncBlock;
+        SDL_Log("[GDK] AddUserSilent -- failed: 0x%08x", hr);
+    }
+}
+
+void
+AddUserSilentCallback(XAsyncBlock *asyncBlock)
+{
+    HRESULT hr;
+    XUserHandle user = NULL;
+
+    hr = XUserAddResult(asyncBlock, &user);
+    if (SUCCEEDED(hr)) {
+        uint64_t userId;
+
+        hr = XUserGetId(user, &userId);
+        if (FAILED(hr)) {
+            /* If unable to get the user ID, it means the account is banned, etc. */
+            SDL_Log("[GDK] AddUserSilentCallback -- XUserGetId failed: 0x%08x. Trying with UI.", hr);
+            XUserCloseHandle(user);
+            AddUserUI();
+        } else {
+            UserLoggedIn(user);
+        }
+    } else {
+        SDL_Log("[GDK] AddUserSilentCallback -- XUserAddAsync failed: 0x%08x. Trying with UI.", hr);
+        AddUserUI();
+    }
+
+    delete asyncBlock;
+}
+
+void
+AddUserSilent()
+{
+    HRESULT hr;
+    XAsyncBlock *asyncBlock = new XAsyncBlock;
+
+    asyncBlock->context = NULL;
+    asyncBlock->queue = NULL; /* A null queue will use the global process task queue */
+    asyncBlock->callback = &AddUserSilentCallback;
+
+    hr = XUserAddAsync(XUserAddOptions::AddDefaultUserSilently, asyncBlock);
+
+    if (FAILED(hr)) {
+        delete asyncBlock;
+        SDL_Log("[GDK] AddUserSilent -- failed: 0x%08x", hr);
+    }
+}
+
+int
+LoadSprite(const char *file)
+{
+    int i;
+
+    for (i = 0; i < state->num_windows; ++i) {
+        /* This does the SDL_LoadBMP step repeatedly, but that's OK for test code. */
+        sprites[i] = LoadTexture(state->renderers[i], file, SDL_TRUE, &sprite_w, &sprite_h);
+        if (!sprites[i]) {
+            return (-1);
+        }
+        if (SDL_SetTextureBlendMode(sprites[i], blendMode) < 0) {
+            SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't set blend mode: %s\n", SDL_GetError());
+            SDL_DestroyTexture(sprites[i]);
+            return (-1);
+        }
+    }
+
+    /* We're ready to roll. :) */
+    return (0);
+}
+
+void
+DrawSprites(SDL_Renderer * renderer, SDL_Texture * sprite)
+{
+    SDL_Rect viewport, temp;
+
+    /* Query the sizes */
+    SDL_RenderGetViewport(renderer, &viewport);
+
+    /* Cycle the color and alpha, if desired */
+    if (cycle_color) {
+        current_color += cycle_direction;
+        if (current_color < 0) {
+            current_color = 0;
+            cycle_direction = -cycle_direction;
+        }
+        if (current_color > 255) {
+            current_color = 255;
+            cycle_direction = -cycle_direction;
+        }
+        SDL_SetTextureColorMod(sprite, 255, (Uint8) current_color,
+                               (Uint8) current_color);
+    }
+    if (cycle_alpha) {
+        current_alpha += cycle_direction;
+        if (current_alpha < 0) {
+            current_alpha = 0;
+            cycle_direction = -cycle_direction;
+        }
+        if (current_alpha > 255) {
+            current_alpha = 255;
+            cycle_direction = -cycle_direction;
+        }
+        SDL_SetTextureAlphaMod(sprite, (Uint8) current_alpha);
+    }
+
+    /* Draw a gray background */
+    SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
+    SDL_RenderClear(renderer);
+
+    /* Test points */
+    SDL_SetRenderDrawColor(renderer, 0xFF, 0x00, 0x00, 0xFF);
+    SDL_RenderDrawPoint(renderer, 0, 0);
+    SDL_RenderDrawPoint(renderer, viewport.w-1, 0);
+    SDL_RenderDrawPoint(renderer, 0, viewport.h-1);
+    SDL_RenderDrawPoint(renderer, viewport.w-1, viewport.h-1);
+
+    /* Test horizontal and vertical lines */
+    SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF);
+    SDL_RenderDrawLine(renderer, 1, 0, viewport.w-2, 0);
+    SDL_RenderDrawLine(renderer, 1, viewport.h-1, viewport.w-2, viewport.h-1);
+    SDL_RenderDrawLine(renderer, 0, 1, 0, viewport.h-2);
+    SDL_RenderDrawLine(renderer, viewport.w-1, 1, viewport.w-1, viewport.h-2);
+
+    /* Test fill and copy */
+    SDL_SetRenderDrawColor(renderer, 0xFF, 0xFF, 0xFF, 0xFF);
+    temp.x = 1;
+    temp.y = 1;
+    temp.w = sprite_w;
+    temp.h = sprite_h;
+    SDL_RenderFillRect(renderer, &temp);
+    SDL_RenderCopy(renderer, sprite, NULL, &temp);
+    temp.x = viewport.w-sprite_w-1;
+    temp.y = 1;
+    temp.w = sprite_w;
+    temp.h = sprite_h;
+    SDL_RenderFillRect(renderer, &temp);
+    SDL_RenderCopy(renderer, sprite, NULL, &temp);
+    temp.x = 1;
+    temp.y = viewport.h-sprite_h-1;
+    temp.w = sprite_w;
+    temp.h = sprite_h;
+    SDL_RenderFillRect(renderer, &temp);
+    SDL_RenderCopy(renderer, sprite, NULL, &temp);
+    temp.x = viewport.w-sprite_w-1;
+    temp.y = viewport.h-sprite_h-1;
+    temp.w = sprite_w;
+    temp.h = sprite_h;
+    SDL_RenderFillRect(renderer, &temp);
+    SDL_RenderCopy(renderer, sprite, NULL, &temp);
+
+    /* Test diagonal lines */
+    SDL_SetRenderDrawColor(renderer, 0x00, 0xFF, 0x00, 0xFF);
+    SDL_RenderDrawLine(renderer, sprite_w, sprite_h,
+                       viewport.w-sprite_w-2, viewport.h-sprite_h-2);
+    SDL_RenderDrawLine(renderer, viewport.w-sprite_w-2, sprite_h,
+                       sprite_w, viewport.h-sprite_h-2);
+
+    /* Update the screen! */
+    SDL_RenderPresent(renderer);
+}
+
+void
+loop()
+{
+    int i;
+    SDL_Event event;
+
+    /* Check for events */
+    while (SDL_PollEvent(&event)) {
+        if (event.type == SDL_KEYDOWN && !event.key.repeat) {
+            SDL_Log("Initial SDL_KEYDOWN: %s", SDL_GetScancodeName(event.key.keysym.scancode));
+        }
+#if defined(__XBOXONE__) || defined(__XBOXSERIES__)
+        /* On Xbox, ignore the keydown event because the features aren't supported */
+        if (event.type != SDL_KEYDOWN) {
+            SDLTest_CommonEvent(state, &event, &done);
+        }
+#else
+        SDLTest_CommonEvent(state, &event, &done);
+#endif
+    }
+    for (i = 0; i < state->num_windows; ++i) {
+        if (state->windows[i] == NULL)
+            continue;
+        DrawSprites(state->renderers[i], sprites[i]);
+    }
+}
+
+int
+main(int argc, char *argv[])
+{
+    int i;
+    const char *icon = "icon.bmp";
+    char *soundname = NULL;
+
+    /* Initialize parameters */
+    num_sprites = NUM_SPRITES;
+
+    /* Initialize test framework */
+    state = SDLTest_CommonCreateState(argv, SDL_INIT_VIDEO | SDL_INIT_AUDIO);
+    if (!state) {
+        return 1;
+    }
+
+    for (i = 1; i < argc;) {
+        int consumed;
+
+        consumed = SDLTest_CommonArg(state, i);
+        if (consumed == 0) {
+            consumed = -1;
+            if (SDL_strcasecmp(argv[i], "--blend") == 0) {
+                if (argv[i + 1]) {
+                    if (SDL_strcasecmp(argv[i + 1], "none") == 0) {
+                        blendMode = SDL_BLENDMODE_NONE;
+                        consumed = 2;
+                    } else if (SDL_strcasecmp(argv[i + 1], "blend") == 0) {
+                        blendMode = SDL_BLENDMODE_BLEND;
+                        consumed = 2;
+                    } else if (SDL_strcasecmp(argv[i + 1], "add") == 0) {
+                        blendMode = SDL_BLENDMODE_ADD;
+                        consumed = 2;
+                    } else if (SDL_strcasecmp(argv[i + 1], "mod") == 0) {
+                        blendMode = SDL_BLENDMODE_MOD;
+                        consumed = 2;
+                    } else if (SDL_strcasecmp(argv[i + 1], "sub") == 0) {
+                        blendMode = SDL_ComposeCustomBlendMode(SDL_BLENDFACTOR_SRC_ALPHA, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT, SDL_BLENDFACTOR_ZERO, SDL_BLENDFACTOR_ONE, SDL_BLENDOPERATION_SUBTRACT);
+                        consumed = 2;
+                    }
+                }
+            } else if (SDL_strcasecmp(argv[i], "--cyclecolor") == 0) {
+                cycle_color = SDL_TRUE;
+                consumed = 1;
+            } else if (SDL_strcasecmp(argv[i], "--cyclealpha") == 0) {
+                cycle_alpha = SDL_TRUE;
+                consumed = 1;
+            } else if (SDL_isdigit(*argv[i])) {
+                num_sprites = SDL_atoi(argv[i]);
+                consumed = 1;
+            } else if (argv[i][0] != '-') {
+                icon = argv[i];
+                consumed = 1;
+            }
+        }
+        if (consumed < 0) {
+            static const char *options[] = {
+                "[--blend none|blend|add|mod]",
+                "[--cyclecolor]",
+                "[--cyclealpha]",
+                "[num_sprites]",
+                "[icon.bmp]",
+                NULL };
+            SDLTest_CommonLogUsage(state, argv[0], options);
+            quit(1);
+        }
+        i += consumed;
+    }
+    if (!SDLTest_CommonInit(state)) {
+        quit(2);
+    }
+
+    /* Create the windows, initialize the renderers, and load the textures */
+    sprites =
+        (SDL_Texture **) SDL_malloc(state->num_windows * sizeof(*sprites));
+    if (!sprites) {
+        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Out of memory!\n");
+        quit(2);
+    }
+    for (i = 0; i < state->num_windows; ++i) {
+        SDL_Renderer *renderer = state->renderers[i];
+        SDL_SetRenderDrawColor(renderer, 0xA0, 0xA0, 0xA0, 0xFF);
+        SDL_RenderClear(renderer);
+    }
+    if (LoadSprite(icon) < 0) {
+        quit(2);
+    }
+
+    soundname = GetResourceFilename(argc > 1 ? argv[1] : NULL, "sample.wav");
+
+    if (soundname == NULL) {
+        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "%s\n", SDL_GetError());
+        quit(1);
+    }
+
+    /* Load the wave file into memory */
+    if (SDL_LoadWAV(soundname, &wave.spec, &wave.sound, &wave.soundlen) == NULL) {
+        SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Couldn't load %s: %s\n", soundname, SDL_GetError());
+        quit(1);
+    }
+
+    wave.spec.callback = fillerup;
+
+    /* Show the list of available drivers */
+    SDL_Log("Available audio drivers:");
+    for (i = 0; i < SDL_GetNumAudioDrivers(); ++i) {
+        SDL_Log("%i: %s", i, SDL_GetAudioDriver(i));
+    }
+
+    SDL_Log("Using audio driver: %s\n", SDL_GetCurrentAudioDriver());
+
+    open_audio();
+
+    /* Main render loop */
+    done = 0;
+
+    /* Try to add the default user silently */
+    AddUserSilent();
+
+    while (!done) {
+        loop();
+    }
+
+    quit(0);
+
+    SDL_free(soundname);
+    return 0;
+}
+
+/* vi: set ts=4 sw=4 expandtab: */

+ 34 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgdk/wingdk/MicrosoftGame.config

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testgdk.exe"
+					TargetDeviceFamily="PC"
+					Id="Game" />
+	</ExecutableList>
+
+	<DesktopRegistration>
+		<DependencyList>
+			<KnownDependency Name="VC14"/>
+		</DependencyList>
+	</DesktopRegistration>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testgdk"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					Description="testgdk"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 29 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgdk/xboxone/MicrosoftGame.config

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testgdk.exe"
+					TargetDeviceFamily="XboxOne"
+					Id="Game" />
+	</ExecutableList>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testgdk"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					SplashScreenImage="SplashScreenImage.png"
+					Description="testgdk"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 29 - 0
Engine/lib/sdl/VisualC-GDK/tests/testgdk/xboxseries/MicrosoftGame.config

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testgdk.exe"
+					TargetDeviceFamily="Scarlett"
+					Id="Game" />
+	</ExecutableList>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testgdk"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					SplashScreenImage="SplashScreenImage.png"
+					Description="testgdk"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 9 - 0
Engine/lib/sdl/VisualC-GDK/tests/testsprite2/PackageLayout.xml

@@ -0,0 +1,9 @@
+<Package>
+  <Chunk Id="1000" Marker="Launch">
+    <FileGroup DestinationPath="." SourcePath="." Include="testsprite2.exe" />
+    <FileGroup DestinationPath="." SourcePath="." Include="MicrosoftGame.config" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.bmp" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.png" />
+    <FileGroup DestinationPath="." SourcePath="." Include="*.dll" />
+  </Chunk>
+</Package>

+ 34 - 0
Engine/lib/sdl/VisualC-GDK/tests/testsprite2/wingdk/MicrosoftGame.config

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testsprite2.exe"
+					TargetDeviceFamily="PC"
+					Id="Game" />
+	</ExecutableList>
+
+	<DesktopRegistration>
+		<DependencyList>
+			<KnownDependency Name="VC14"/>
+		</DependencyList>
+	</DesktopRegistration>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testsprite2"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					Description="testsprite2"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 29 - 0
Engine/lib/sdl/VisualC-GDK/tests/testsprite2/xboxone/MicrosoftGame.config

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testsprite2.exe"
+					TargetDeviceFamily="XboxOne"
+					Id="Game" />
+	</ExecutableList>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testsprite2"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					SplashScreenImage="SplashScreenImage.png"
+					Description="testsprite2"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 29 - 0
Engine/lib/sdl/VisualC-GDK/tests/testsprite2/xboxseries/MicrosoftGame.config

@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Game configVersion="1">
+
+	<!-- Set these to the correct identifiers from Partner Center -->
+	<Identity Name="SDL"
+		Version="1.0.0.0"
+		Publisher="CN=Publisher"/>
+
+	<ExecutableList>
+		<Executable Name="testsprite2.exe"
+					TargetDeviceFamily="Scarlett"
+					Id="Game" />
+	</ExecutableList>
+
+	<!-- Set these to the correct values from Partner Center -->
+	<MSAAppId>PleaseChangeMe</MSAAppId>
+	<TitleId>FFFFFFFF</TitleId>
+
+	<ShellVisuals DefaultDisplayName="testsprite2"
+					PublisherDisplayName="SDL"
+					Square480x480Logo="Logo480x480.png"
+					Square150x150Logo="Logo150x150.png"
+					Square44x44Logo="Logo44x44.png"
+					Description="testsprite2"
+					SplashScreenImage="SplashScreenImage.png"
+					ForegroundText="light"
+					BackgroundColor="#000000"
+					StoreLogo="Logo100x100.png"/>
+</Game>

+ 96 - 13
Engine/lib/sdl/WhatsNew.txt

@@ -1,30 +1,113 @@
 
 
 This is a list of major changes in SDL's version history.
 This is a list of major changes in SDL's version history.
 
 
+---------------------------------------------------------------------------
+2.26.0:
+---------------------------------------------------------------------------
+
+General:
+* Updated OpenGL headers to the latest API from The Khronos Group Inc.
+* Added SDL_GetWindowSizeInPixels() to get the window size in pixels, which may differ from the window coordinate size for windows with high-DPI support
+* Added simulated vsync synchronization for the software renderer
+* Added the mouse position to SDL_MouseWheelEvent
+* Added SDL_ResetHints() to reset all hints to their default values
+* Added SDL_GetJoystickGUIDInfo() to get device information encoded in a joystick GUID
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 to control whether the HIDAPI driver for XBox 360 controllers should be used
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED to control whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS to control whether the HIDAPI driver for XBox 360 wireless controllers should be used
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE to control whether the HIDAPI driver for XBox One controllers should be used
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED to control the brightness of the XBox One guide button LED
+* Added support for PS3 controllers to the HIDAPI driver, enabled by default on macOS, controlled by the SDL_HINT_JOYSTICK_HIDAPI_PS3 hint
+* Added support for Nintendo Wii controllers to the HIDAPI driver, not enabled by default, controlled by the SDL_HINT_JOYSTICK_HIDAPI_WII hint
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED to control whether the player LED should be lit on the Nintendo Wii controllers
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS to control whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
+* Added access to the individual left and right gyro sensors of the combined Joy-Cons controller
+* Added a microsecond timestamp to SDL_SensorEvent and SDL_ControllerSensorEvent, when the hardware provides that information
+* Added SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp() to retrieve the last sensor data with the associated microsecond timestamp
+* Added the hint SDL_HINT_HIDAPI_IGNORE_DEVICES to have the SDL HID API ignore specific devices 
+* SDL_GetRevision() now includes more information about the SDL build, including the git commit hash if available
+
+Windows:
+* Added the hint SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE to control whether the system mouse acceleration curve is used for relative mouse motion
+
+macOS:
+* Implemented vsync synchronization on macOS 12
+
+Linux:
+* Added SDL_SetPrimarySelectionText(), SDL_GetPrimarySelectionText(), and SDL_HasPrimarySelectionText() to interact with the X11 primary selection clipboard
+* Added the hint SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP to control whether mouse pointer warp emulation is enabled under Wayland
+
+Android:
+* Enabled IME soft keyboard input
+* Added version checking to make sure the SDL Java and C code are compatible
+
+
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 2.24.0:
 2.24.0:
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 
 
 General:
 General:
 * New version numbering scheme, similar to GLib and Flatpak.
 * New version numbering scheme, similar to GLib and Flatpak.
-    * An even number in the minor version (second component) indicates
-      a production-ready stable release such as 2.24.0, which would have
-      been 2.0.24 under the old system.
-      * The patchlevel (micro version, third component) indicates a
-        bugfix-only update: for example, 2.24.1 would be a bugfix-only
-        release to fix bugs in 2.24.0, without adding new features.
-    * An odd number in the minor version indicates a prerelease such
-      as 2.23.0. Stable distributions should not use these prereleases.
-      * The patchlevel indicates successive prereleases, for example
-        2.23.1 and 2.23.2 would be prereleases during development of
-        the SDL 2.24.0 stable release.
-* Added SDL_bsearch() to the stdlib routines
+    * An even number in the minor version (second component) indicates a production-ready stable release such as 2.24.0, which would have been 2.0.24 under the old system.
+      * The patchlevel (micro version, third component) indicates a bugfix-only update: for example, 2.24.1 would be a bugfix-only release to fix bugs in 2.24.0, without adding new features.
+    * An odd number in the minor version indicates a prerelease such as 2.23.0. Stable distributions should not use these prereleases.
+      * The patchlevel indicates successive prereleases, for example 2.23.1 and 2.23.2 would be prereleases during development of the SDL 2.24.0 stable release.
+* Added SDL_GetPointDisplayIndex() and SDL_GetRectDisplayIndex() to get the display associated with a point and rectangle in screen space
+* Added SDL_bsearch(), SDL_crc16(), and  SDL_utf8strnlen() to the stdlib routines
+* Added SDL_CPUPauseInstruction() as a macro in SDL_atomic.h
+* Added SDL_size_mul_overflow() and SDL_size_add_overflow() for better size overflow protection
+* Added SDL_ResetHint() to reset a hint to the default value
+* Added SDL_ResetKeyboard() to reset SDL's internal keyboard state, generating key up events for all currently pressed keys
+* Added the hint SDL_HINT_MOUSE_RELATIVE_WARP_MOTION to control whether mouse warping generates motion events in relative mode. This hint defaults off.
+* Added the hint SDL_HINT_TRACKPAD_IS_TOUCH_ONLY to control whether trackpads are treated as touch devices or mice. By default touchpads are treated as mouse input.
+* The hint SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS now defaults on
+* Added support for mini-gamepad mode for Nintendo Joy-Con controllers using the HIDAPI driver
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS to control whether Joy-Con controllers are automatically merged into a unified gamepad when using the HIDAPI driver. This hint defaults on.
+* The hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED can be set to a floating point value to set the brightness of the Home LED on Nintendo Switch controllers
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED to set the Home LED brightness for the Nintendo Joy-Con controllers. By default the Home LED is not modified.
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED to control whether the player LED should be lit on the Nintendo Joy-Con controllers
+* Added support for Nintendo Online classic controllers using the HIDAPI driver
+* Added the hint SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC to control whether the HIDAPI driver for Nintendo Online classic controllers should be used
+* Added support for the NVIDIA Shield Controller to the HIDAPI driver, supporting rumble and battery status
+* Added support for NVIDIA SHIELD controller to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_SHIELD to control whether this is used
 * Added functions to get the platform dependent name for a joystick or game controller:
 * Added functions to get the platform dependent name for a joystick or game controller:
     * SDL_JoystickPathForIndex()
     * SDL_JoystickPathForIndex()
     * SDL_JoystickPath()
     * SDL_JoystickPath()
     * SDL_GameControllerPathForIndex()
     * SDL_GameControllerPathForIndex()
     * SDL_GameControllerPath()
     * SDL_GameControllerPath()
-* Added joystick event SDL_JOYBATTERYUPDATED for when battery status changes.
+* Added SDL_GameControllerGetFirmwareVersion() and SDL_JoystickGetFirmwareVersion(), currently implemented for DualSense(tm) Wireless Controllers using HIDAPI
+* Added SDL_JoystickAttachVirtualEx() for extended virtual controller support
+* Added joystick event SDL_JOYBATTERYUPDATED for when battery status changes
+* Added SDL_GUIDToString() and SDL_GUIDFromString() to convert between SDL GUID and string
+* Added SDL_HasLSX() and SDL_HasLASX() to detect LoongArch SIMD support
+* Added SDL_GetOriginalMemoryFunctions()
+* Added SDL_GetDefaultAudioInfo() to get the name and format of the default audio device, currently implemented for PipeWire, PulseAudio, WASAPI, and DirectSound
+* Added HIDAPI driver for the NVIDIA SHIELD controller (2017 model) to enable support for battery status and rumble
+* Added support for opening audio devices with 3 or 5 channels (2.1, 4.1). All channel counts from Mono to 7.1 are now supported.
+* Rewrote audio channel converters used by SDL_AudioCVT, based on the channel matrix coefficients used as the default for FAudio voices
+* SDL log messages are no longer limited to 4K and can be any length
+* Fixed a long-standing calling convention issue with dynapi affecting OpenWatcom or OS/2 builds
+
+Windows:
+* Added initial support for building for Windows and Xbox with Microsoft's Game Development Kit (GDK), see docs/README-gdk.md for details
+* Added a D3D12 renderer implementation and SDL_RenderGetD3D12Device() to retrieve the D3D12 device associated with it
+* Added the hint SDL_HINT_WINDOWS_DPI_AWARENESS to set whether the application is DPI-aware. This hint must be set before initializing the video subsystem
+* Added the hint SDL_HINT_WINDOWS_DPI_SCALING to control whether the SDL coordinates are in DPI-scaled points or pixels
+* Added the hint SDL_HINT_DIRECTINPUT_ENABLED to control whether the DirectInput driver should be used
+* Added support for SDL_GetAudioDeviceSpec to the DirectSound backend
+
+Linux:
+* Support for XVidMode has been removed, mode changes are only supported using the XRandR extension
+* Added the hint SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION to control whether to expose a set of emulated modes in addition to the native resolution modes available on Wayland
+* Added the hint SDL_HINT_KMSDRM_DEVICE_INDEX to specify which KMSDRM device to use if the default is not desired
+* Added the hint SDL_HINT_LINUX_DIGITAL_HATS to control whether to treat hats as digital rather than checking to see if they may be analog
+* Added the hint SDL_HINT_LINUX_HAT_DEADZONES to control whether to use deadzones on analog hats
+
+macOS:
+* Bumped minimum OS deployment version to macOS 10.9
+* Added SDL_GL_FLOATBUFFERS to allow Cocoa GL contexts to use EDR
+* Added the hint SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH to control whether dispatching OpenGL context updates should block the dispatching thread until the main thread finishes processing. This hint defaults to blocking, which is the safer option on modern macOS.
+
 
 
 ---------------------------------------------------------------------------
 ---------------------------------------------------------------------------
 2.0.22:
 2.0.22:

+ 32 - 384
Engine/lib/sdl/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj

@@ -7,47 +7,19 @@
 	objects = {
 	objects = {
 
 
 /* Begin PBXBuildFile section */
 /* Begin PBXBuildFile section */
-		1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
-		1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-		1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
 		F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
 		F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
 		F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
 		F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A497392555EEA900E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
 		F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A497432555EEC400E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
 		F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A497452555EED500E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4959B2555ED0500E92A8B /* libSDL2.a */; };
 		F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4959B2555ED0500E92A8B /* libSDL2.a */; };
-		F3A497482555EEEE00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497472555EEEE00E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
 		F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A4974A2555EF1200E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
 		F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A4974C2555EF2000E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4974D2555EF9500E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 		F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
 		F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A495992555ED0500E92A8B /* libSDL2.a */; };
-		F3A4974F2555EFA400E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497382555EEA900E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A497592555EFC300E92A8B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497582555EFC300E92A8B /* AVFoundation.framework */; };
-		F3A497632555EFCF00E92A8B /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A497622555EFCF00E92A8B /* Metal.framework */; };
-		F3F7590022AC5EC7001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
-		F3F7590122AC5F00001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
-		F3F7590222AC5F3D001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
-		F3F7590322AC5F71001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
-		F3F7590422AC5F8D001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
-		F3F7590522AC5FB3001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
-		F3F7590622AC5FD1001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3F758FF22AC5EC7001D97F2 /* Metal.framework */; };
 		FA30DEB01BBF5A8F009C397F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FA30DEB01BBF5A8F009C397F /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FA30DEB11BBF5A93009C397F /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
 		FA30DEB11BBF5A93009C397F /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
 		FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; };
 		FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; };
 		FA30DEB41BBF5ADD009C397F /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
 		FA30DEB41BBF5ADD009C397F /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
 		FA30DEB61BBF5AE6009C397F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
 		FA30DEB61BBF5AE6009C397F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
-		FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
-		FA30DEC91BBF5C14009C397F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
-		FA30DECA1BBF5C14009C397F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
-		FA30DECB1BBF5C14009C397F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
-		FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
-		FA30DECD1BBF5C14009C397F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
-		FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-		FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */; };
 		FA86C0371D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C0371D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C0381D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C0381D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C0391D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C0391D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
@@ -55,37 +27,6 @@
 		FA86C03B1D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C03B1D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C03C1D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C03C1D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C03D1D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
 		FA86C03D1D9765BB009CB637 /* iOS Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */; };
-		FA8B4BA31967070A00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BA41967071300F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BA51967071A00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BA61967072100F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BA71967072800F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BA81967073400F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */; };
-		FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
-		FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
-		FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
-		FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
-		FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
-		FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
-		FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D31D8B5E5600915323 /* AVFoundation.framework */; };
-		FAE0E96A1BAF96A00098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
-		FAE0E96C1BAF96A90098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
-		FAE0E96D1BAF96AF0098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
-		FAE0E96E1BAF96B10098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
-		FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
-		FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
-		FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FAE0E9691BAF96A00098DFA4 /* GameController.framework */; };
-		FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-		FD15FD6A0E086911003BDF25 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
-		FD15FD6B0E086911003BDF25 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
-		FD15FD6C0E086911003BDF25 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
-		FD15FD6D0E086911003BDF25 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
-		FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-		FD5F9CE90E0E0741008E885B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
-		FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
-		FD5F9CEB0E0E0741008E885B /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
-		FD5F9CEC0E0E0741008E885B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
 		FD77A00E0E26BC0500F39101 /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
 		FD77A00E0E26BC0500F39101 /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
 		FD77A0130E26BC0500F39101 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FD77A0130E26BC0500F39101 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FD77A0160E26BC0500F39101 /* rectangles.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A00A0E26BC0500F39101 /* rectangles.c */; };
 		FD77A0160E26BC0500F39101 /* rectangles.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A00A0E26BC0500F39101 /* rectangles.c */; };
@@ -116,51 +57,15 @@
 		FDB651FA0E43D1F300F688B5 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
 		FDB651FA0E43D1F300F688B5 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
 		FDB651FB0E43D1F300F688B5 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
 		FDB651FB0E43D1F300F688B5 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
 		FDB651FD0E43D1F300F688B5 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FDB651FD0E43D1F300F688B5 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
-		FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-		FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
-		FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
-		FDB652050E43D1F300F688B5 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
-		FDB652060E43D1F300F688B5 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
-		FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */; };
-		FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
 		FDB652120E43D21A00F688B5 /* keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = FDB652110E43D21A00F688B5 /* keyboard.c */; };
 		FDB652120E43D21A00F688B5 /* keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = FDB652110E43D21A00F688B5 /* keyboard.c */; };
 		FDB652C70E43E25900F688B5 /* kromasky_16x16.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB652C60E43E25900F688B5 /* kromasky_16x16.bmp */; };
 		FDB652C70E43E25900F688B5 /* kromasky_16x16.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB652C60E43E25900F688B5 /* kromasky_16x16.bmp */; };
-		FDB96ED40DEFC9C700FAF19F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
-		FDB96EE00DEFC9DC00FAF19F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
 		FDC202E10E107B1200ABAC90 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
 		FDC202E10E107B1200ABAC90 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
-		FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-		FDC202E70E107B1200ABAC90 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
-		FDC202E80E107B1200ABAC90 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
-		FDC202E90E107B1200ABAC90 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
-		FDC202EA0E107B1200ABAC90 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
 		FDC214870E26D78A00DDED23 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FDC214870E26D78A00DDED23 /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FDC52EC80E2843D6008D768C /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
 		FDC52EC80E2843D6008D768C /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
 		FDC52EC90E2843D6008D768C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
 		FDC52EC90E2843D6008D768C /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FD787AA00E22A5CC003E8E36 /* Default.png */; };
 		FDC52ECF0E2843D6008D768C /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
 		FDC52ECF0E2843D6008D768C /* common.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0060E26BC0500F39101 /* common.c */; };
-		FDC52ED40E2843D6008D768C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-		FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
-		FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
-		FDC52ED70E2843D6008D768C /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
-		FDC52ED80E2843D6008D768C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
-		FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */; };
-		FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
 		FDC52EE50E284410008D768C /* fireworks.c in Sources */ = {isa = PBXBuildFile; fileRef = FDC52EE40E284410008D768C /* fireworks.c */; };
 		FDC52EE50E284410008D768C /* fireworks.c in Sources */ = {isa = PBXBuildFile; fileRef = FDC52EE40E284410008D768C /* fireworks.c */; };
 		FDF0D6960E12D05400247964 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
 		FDF0D6960E12D05400247964 /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = FD925B180E0F276600E92347 /* Icon.png */; };
-		FDF0D69C0E12D05400247964 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D30AB110D05D00D00671497 /* Foundation.framework */; };
-		FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1DF5F4DF0D08C38300B7A737 /* UIKit.framework */; };
-		FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */; };
-		FDF0D69F0E12D05400247964 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */; };
-		FDF0D6A00E12D05400247964 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */; };
-		FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */; };
-		FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
-		FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */; };
-		FDF0D7960E12D52900247964 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
-		FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */; };
-		FDF0D7A80E12D53200247964 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
-		FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */; };
-		FDF0D7AA0E12D53500247964 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
-		FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */; };
-		FDF0D7AC0E12D53800247964 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDF0D7220E12D31800247964 /* AudioToolbox.framework */; };
 /* End PBXBuildFile section */
 /* End PBXBuildFile section */
 
 
 /* Begin PBXContainerItemProxy section */
 /* Begin PBXContainerItemProxy section */
@@ -234,47 +139,21 @@
 			remoteGlobalIDString = BECDF6BE0761BA81005FE872;
 			remoteGlobalIDString = BECDF6BE0761BA81005FE872;
 			remoteInfo = "Standard DMG";
 			remoteInfo = "Standard DMG";
 		};
 		};
-		F3A495A42555ED0500E92A8B /* PBXContainerItemProxy */ = {
+		F3C17D9128E4355900E1A26D /* PBXContainerItemProxy */ = {
 			isa = PBXContainerItemProxy;
 			isa = PBXContainerItemProxy;
 			containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
 			containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
 			proxyType = 2;
 			proxyType = 2;
-			remoteGlobalIDString = A75FDB8C23E4C74400529352;
-			remoteInfo = hidapi;
-		};
-		F3A495A62555ED0500E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A75FDB4923E399AC00529352;
-			remoteInfo = "hidapi-iOS";
-		};
-		F3A495A82555ED0500E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A495802555ED0400E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A75FDB6E23E3A2C900529352;
-			remoteInfo = "hidapi-tvOS";
+			remoteGlobalIDString = E2D187CF28A5673500D2B4F1;
+			remoteInfo = "xcFramework-iOS";
 		};
 		};
 /* End PBXContainerItemProxy section */
 /* End PBXContainerItemProxy section */
 
 
 /* Begin PBXFileReference section */
 /* Begin PBXFileReference section */
-		1D30AB110D05D00D00671497 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
 		1D6058910D05DD3D006BFB54 /* Rectangles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rectangles.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		1D6058910D05DD3D006BFB54 /* Rectangles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Rectangles.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		1DF5F4DF0D08C38300B7A737 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
 		F3A495802555ED0400E92A8B /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
 		F3A495802555ED0400E92A8B /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
-		F3A497382555EEA900E92A8B /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; };
-		F3A497472555EEEE00E92A8B /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CoreHaptics.framework; sourceTree = DEVELOPER_DIR; };
-		F3A497582555EFC300E92A8B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
-		F3A497622555EFCF00E92A8B /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; };
-		F3F758FF22AC5EC7001D97F2 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
+		F3C17D9F28E437C300E1A26D /* config.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = config.xcconfig; sourceTree = "<group>"; };
 		FA30DE961BBF59D9009C397F /* Happy-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Happy-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		FA30DE961BBF59D9009C397F /* Happy-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "Happy-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; };
 		FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "iOS Launch Screen.storyboard"; sourceTree = "<group>"; };
 		FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.storyboard; path = "iOS Launch Screen.storyboard"; sourceTree = "<group>"; };
-		FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
-		FABA34D31D8B5E5600915323 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		FABA34D71D8B5E7700915323 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS10.0.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
-		FAE0E9691BAF96A00098DFA4 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
 		FD15FCB20E086866003BDF25 /* Happy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Happy.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FD15FCB20E086866003BDF25 /* Happy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Happy.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FD5F9BE40E0DEBEA008E885B /* Accel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Accel.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FD5F9BE40E0DEBEA008E885B /* Accel.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Accel.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FD77A0050E26BC0500F39101 /* accelerometer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = accelerometer.c; sourceTree = "<group>"; };
 		FD77A0050E26BC0500F39101 /* accelerometer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = accelerometer.c; sourceTree = "<group>"; };
@@ -298,14 +177,10 @@
 		FDB6520C0E43D1F300F688B5 /* Keyboard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Keyboard.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FDB6520C0E43D1F300F688B5 /* Keyboard.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Keyboard.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FDB652110E43D21A00F688B5 /* keyboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = keyboard.c; sourceTree = "<group>"; };
 		FDB652110E43D21A00F688B5 /* keyboard.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = keyboard.c; sourceTree = "<group>"; };
 		FDB652C60E43E25900F688B5 /* kromasky_16x16.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = kromasky_16x16.bmp; sourceTree = "<group>"; };
 		FDB652C60E43E25900F688B5 /* kromasky_16x16.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = kromasky_16x16.bmp; sourceTree = "<group>"; };
-		FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
-		FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		FDC202EE0E107B1200ABAC90 /* Touch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Touch.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FDC202EE0E107B1200ABAC90 /* Touch.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Touch.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FDC52EDE0E2843D6008D768C /* Fireworks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Fireworks.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FDC52EDE0E2843D6008D768C /* Fireworks.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Fireworks.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FDC52EE40E284410008D768C /* fireworks.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fireworks.c; sourceTree = "<group>"; };
 		FDC52EE40E284410008D768C /* fireworks.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = fireworks.c; sourceTree = "<group>"; };
 		FDF0D6A40E12D05400247964 /* Mixer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Mixer.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		FDF0D6A40E12D05400247964 /* Mixer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Mixer.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
-		FDF0D7220E12D31800247964 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 /* End PBXFileReference section */
 /* End PBXFileReference section */
 
 
 /* Begin PBXFrameworksBuildPhase section */
 /* Begin PBXFrameworksBuildPhase section */
@@ -314,18 +189,6 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */,
 				F3A497102555EE4800E92A8B /* libSDL2.a in Frameworks */,
-				FDF0D7AC0E12D53800247964 /* AudioToolbox.framework in Frameworks */,
-				FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */,
-				FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */,
-				1D3623EC0D0F72F000981E51 /* CoreGraphics.framework in Frameworks */,
-				F3A4974D2555EF9500E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BA31967070A00F8EB7C /* CoreMotion.framework in Frameworks */,
-				1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
-				FAE0E96A1BAF96A00098DFA4 /* GameController.framework in Frameworks */,
-				F3F7590022AC5EC7001D97F2 /* Metal.framework in Frameworks */,
-				FDB96ED40DEFC9C700FAF19F /* OpenGLES.framework in Frameworks */,
-				FDB96EE00DEFC9DC00FAF19F /* QuartzCore.framework in Frameworks */,
-				1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -334,17 +197,6 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */,
 				F3A497462555EEDF00E92A8B /* libSDL2.a in Frameworks */,
-				FA30DEC91BBF5C14009C397F /* AudioToolbox.framework in Frameworks */,
-				F3A497592555EFC300E92A8B /* AVFoundation.framework in Frameworks */,
-				FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */,
-				FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */,
-				F3A497482555EEEE00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */,
-				FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */,
-				F3A497632555EFCF00E92A8B /* Metal.framework in Frameworks */,
-				FA30DECA1BBF5C14009C397F /* QuartzCore.framework in Frameworks */,
-				FA30DECB1BBF5C14009C397F /* OpenGLES.framework in Frameworks */,
-				FA30DECD1BBF5C14009C397F /* UIKit.framework in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -353,18 +205,6 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */,
 				F3A497442555EECD00E92A8B /* libSDL2.a in Frameworks */,
-				FDF0D7AA0E12D53500247964 /* AudioToolbox.framework in Frameworks */,
-				FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */,
-				FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */,
-				FD15FD6B0E086911003BDF25 /* CoreGraphics.framework in Frameworks */,
-				F3A497452555EED500E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BA41967071300F8EB7C /* CoreMotion.framework in Frameworks */,
-				FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */,
-				FAE0E96C1BAF96A90098DFA4 /* GameController.framework in Frameworks */,
-				F3F7590122AC5F00001D97F2 /* Metal.framework in Frameworks */,
-				FD15FD6C0E086911003BDF25 /* OpenGLES.framework in Frameworks */,
-				FD15FD6D0E086911003BDF25 /* QuartzCore.framework in Frameworks */,
-				FD15FD6A0E086911003BDF25 /* UIKit.framework in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -373,18 +213,6 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */,
 				F3A4972F2555EE8A00E92A8B /* libSDL2.a in Frameworks */,
-				FDF0D7A80E12D53200247964 /* AudioToolbox.framework in Frameworks */,
-				FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */,
-				FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */,
-				FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */,
-				F3A497392555EEA900E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BA51967071A00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */,
-				FAE0E96D1BAF96AF0098DFA4 /* GameController.framework in Frameworks */,
-				F3F7590222AC5F3D001D97F2 /* Metal.framework in Frameworks */,
-				FD5F9CEB0E0E0741008E885B /* OpenGLES.framework in Frameworks */,
-				FD5F9CEC0E0E0741008E885B /* QuartzCore.framework in Frameworks */,
-				FD5F9CE90E0E0741008E885B /* UIKit.framework in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -393,18 +221,6 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */,
 				F3A497492555EF0B00E92A8B /* libSDL2.a in Frameworks */,
-				FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */,
-				FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */,
-				FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */,
-				FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */,
-				F3A4974A2555EF1200E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */,
-				FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */,
-				F3F7590622AC5FD1001D97F2 /* Metal.framework in Frameworks */,
-				FDB652050E43D1F300F688B5 /* OpenGLES.framework in Frameworks */,
-				FDB652060E43D1F300F688B5 /* QuartzCore.framework in Frameworks */,
-				FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -413,18 +229,6 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */,
 				F3A4974E2555EF9F00E92A8B /* libSDL2.a in Frameworks */,
-				FDF0D7960E12D52900247964 /* AudioToolbox.framework in Frameworks */,
-				FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */,
-				FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */,
-				FDC202E80E107B1200ABAC90 /* CoreGraphics.framework in Frameworks */,
-				F3A4974F2555EFA400E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BA61967072100F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */,
-				FAE0E96E1BAF96B10098DFA4 /* GameController.framework in Frameworks */,
-				F3F7590322AC5F71001D97F2 /* Metal.framework in Frameworks */,
-				FDC202E90E107B1200ABAC90 /* OpenGLES.framework in Frameworks */,
-				FDC202EA0E107B1200ABAC90 /* QuartzCore.framework in Frameworks */,
-				FDC202E70E107B1200ABAC90 /* UIKit.framework in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -433,18 +237,6 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */,
 				F3A497422555EEBE00E92A8B /* libSDL2.a in Frameworks */,
-				FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */,
-				FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */,
-				FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */,
-				FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */,
-				F3A497432555EEC400E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BA81967073400F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDC52ED40E2843D6008D768C /* Foundation.framework in Frameworks */,
-				FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */,
-				F3F7590522AC5FB3001D97F2 /* Metal.framework in Frameworks */,
-				FDC52ED70E2843D6008D768C /* OpenGLES.framework in Frameworks */,
-				FDC52ED80E2843D6008D768C /* QuartzCore.framework in Frameworks */,
-				FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -453,18 +245,6 @@
 			buildActionMask = 2147483647;
 			buildActionMask = 2147483647;
 			files = (
 			files = (
 				F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */,
 				F3A4974B2555EF1B00E92A8B /* libSDL2.a in Frameworks */,
-				FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */,
-				FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */,
-				FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */,
-				FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */,
-				F3A4974C2555EF2000E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BA71967072800F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDF0D69C0E12D05400247964 /* Foundation.framework in Frameworks */,
-				FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */,
-				F3F7590422AC5F8D001D97F2 /* Metal.framework in Frameworks */,
-				FDF0D69F0E12D05400247964 /* OpenGLES.framework in Frameworks */,
-				FDF0D6A00E12D05400247964 /* QuartzCore.framework in Frameworks */,
-				FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */,
 			);
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			runOnlyForDeploymentPostprocessing = 0;
 		};
 		};
@@ -489,11 +269,11 @@
 		29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
 		29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
+				F3C17D9F28E437C300E1A26D /* config.xcconfig */,
 				F3A495802555ED0400E92A8B /* SDL.xcodeproj */,
 				F3A495802555ED0400E92A8B /* SDL.xcodeproj */,
 				FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */,
 				FA86C0361D9765BA009CB637 /* iOS Launch Screen.storyboard */,
 				FD77A0040E26BC0500F39101 /* src */,
 				FD77A0040E26BC0500F39101 /* src */,
 				29B97317FDCFA39411CA2CEA /* Resources */,
 				29B97317FDCFA39411CA2CEA /* Resources */,
-				29B97323FDCFA39411CA2CEA /* Frameworks */,
 				19C28FACFE9D520D11CA2CBB /* Products */,
 				19C28FACFE9D520D11CA2CBB /* Products */,
 			);
 			);
 			name = CustomTemplate;
 			name = CustomTemplate;
@@ -505,40 +285,17 @@
 				FDB651C30E43D19800F688B5 /* data */,
 				FDB651C30E43D19800F688B5 /* data */,
 				FD787AA00E22A5CC003E8E36 /* Default.png */,
 				FD787AA00E22A5CC003E8E36 /* Default.png */,
 				FD925B180E0F276600E92347 /* Icon.png */,
 				FD925B180E0F276600E92347 /* Icon.png */,
-				8D1107310486CEB800E47090 /* Info.plist */,
 			);
 			);
 			name = Resources;
 			name = Resources;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
 		};
 		};
-		29B97323FDCFA39411CA2CEA /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				F3A497622555EFCF00E92A8B /* Metal.framework */,
-				F3A497582555EFC300E92A8B /* AVFoundation.framework */,
-				F3A497382555EEA900E92A8B /* CoreHaptics.framework */,
-				F3A497472555EEEE00E92A8B /* CoreHaptics.framework */,
-				F3F758FF22AC5EC7001D97F2 /* Metal.framework */,
-				FABA34D71D8B5E7700915323 /* AVFoundation.framework */,
-				FABA34D31D8B5E5600915323 /* AVFoundation.framework */,
-				FAE0E9691BAF96A00098DFA4 /* GameController.framework */,
-				FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */,
-				FDF0D7220E12D31800247964 /* AudioToolbox.framework */,
-				FDB96EDF0DEFC9DC00FAF19F /* QuartzCore.framework */,
-				FDB96ED30DEFC9C700FAF19F /* OpenGLES.framework */,
-				1D3623EB0D0F72F000981E51 /* CoreGraphics.framework */,
-				1DF5F4DF0D08C38300B7A737 /* UIKit.framework */,
-				1D30AB110D05D00D00671497 /* Foundation.framework */,
-				FDF0D71D0E12D2AB00247964 /* CoreAudio.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
 		F3A495812555ED0400E92A8B /* Products */ = {
 		F3A495812555ED0400E92A8B /* Products */ = {
 			isa = PBXGroup;
 			isa = PBXGroup;
 			children = (
 			children = (
 				F3A495912555ED0500E92A8B /* SDL2.framework */,
 				F3A495912555ED0500E92A8B /* SDL2.framework */,
 				F3A495932555ED0500E92A8B /* SDL2.framework */,
 				F3A495932555ED0500E92A8B /* SDL2.framework */,
 				F3A495952555ED0500E92A8B /* SDL2.framework */,
 				F3A495952555ED0500E92A8B /* SDL2.framework */,
+				F3C17D9228E4355900E1A26D /* SDL2.framework */,
 				F3A495972555ED0500E92A8B /* libSDL2.a */,
 				F3A495972555ED0500E92A8B /* libSDL2.a */,
 				F3A495992555ED0500E92A8B /* libSDL2.a */,
 				F3A495992555ED0500E92A8B /* libSDL2.a */,
 				F3A4959B2555ED0500E92A8B /* libSDL2.a */,
 				F3A4959B2555ED0500E92A8B /* libSDL2.a */,
@@ -546,9 +303,6 @@
 				F3A4959F2555ED0500E92A8B /* libSDL2.dylib */,
 				F3A4959F2555ED0500E92A8B /* libSDL2.dylib */,
 				F3A495A12555ED0500E92A8B /* libSDL2.dylib */,
 				F3A495A12555ED0500E92A8B /* libSDL2.dylib */,
 				F3A495A32555ED0500E92A8B /* SDL2 */,
 				F3A495A32555ED0500E92A8B /* SDL2 */,
-				F3A495A52555ED0500E92A8B /* hidapi.framework */,
-				F3A495A72555ED0500E92A8B /* hidapi.framework */,
-				F3A495A92555ED0500E92A8B /* hidapi.framework */,
 			);
 			);
 			name = Products;
 			name = Products;
 			sourceTree = "<group>";
 			sourceTree = "<group>";
@@ -881,25 +635,11 @@
 			remoteRef = F3A495A22555ED0500E92A8B /* PBXContainerItemProxy */;
 			remoteRef = F3A495A22555ED0500E92A8B /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
 		};
-		F3A495A52555ED0500E92A8B /* hidapi.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = hidapi.framework;
-			remoteRef = F3A495A42555ED0500E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A495A72555ED0500E92A8B /* hidapi.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = hidapi.framework;
-			remoteRef = F3A495A62555ED0500E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A495A92555ED0500E92A8B /* hidapi.framework */ = {
+		F3C17D9228E4355900E1A26D /* SDL2.framework */ = {
 			isa = PBXReferenceProxy;
 			isa = PBXReferenceProxy;
 			fileType = wrapper.framework;
 			fileType = wrapper.framework;
-			path = hidapi.framework;
-			remoteRef = F3A495A82555ED0500E92A8B /* PBXContainerItemProxy */;
+			path = SDL2.framework;
+			remoteRef = F3C17D9128E4355900E1A26D /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};
 		};
 /* End PBXReferenceProxy section */
 /* End PBXReferenceProxy section */
@@ -1077,8 +817,6 @@
 		1D6058940D05DD3E006BFB54 /* Debug */ = {
 		1D6058940D05DD3E006BFB54 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
 				PRODUCT_NAME = Rectangles;
 				PRODUCT_NAME = Rectangles;
 			};
 			};
 			name = Debug;
 			name = Debug;
@@ -1086,76 +824,56 @@
 		1D6058950D05DD3E006BFB54 /* Release */ = {
 		1D6058950D05DD3E006BFB54 /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
 				PRODUCT_NAME = Rectangles;
 				PRODUCT_NAME = Rectangles;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
 		C01FCF4F08A954540054247B /* Debug */ = {
 		C01FCF4F08A954540054247B /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = F3C17D9F28E437C300E1A26D /* config.xcconfig */;
 			buildSettings = {
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				CURRENT_PROJECT_VERSION = 1;
+				DEBUG_INFORMATION_FORMAT = dwarf;
 				GCC_OPTIMIZATION_LEVEL = 0;
 				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+				GENERATE_INFOPLIST_FILE = YES;
 				HEADER_SEARCH_PATHS = ../../include;
 				HEADER_SEARCH_PATHS = ../../include;
+				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
+				MARKETING_VERSION = 1.0;
 				ONLY_ACTIVE_ARCH = YES;
 				ONLY_ACTIVE_ARCH = YES;
-				PRELINK_LIBS = "";
+				OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
+				PRODUCT_BUNDLE_IDENTIFIER = "org.libsdl.$(PRODUCT_NAME)";
 				SDKROOT = iphoneos;
 				SDKROOT = iphoneos;
-				TARGETED_DEVICE_FAMILY = "1,2";
+				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
 		C01FCF5008A954540054247B /* Release */ = {
 		C01FCF5008A954540054247B /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
+			baseConfigurationReference = F3C17D9F28E437C300E1A26D /* config.xcconfig */;
 			buildSettings = {
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
 				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				CURRENT_PROJECT_VERSION = 1;
+				GCC_SYMBOLS_PRIVATE_EXTERN = YES;
+				GENERATE_INFOPLIST_FILE = YES;
 				HEADER_SEARCH_PATHS = ../../include;
 				HEADER_SEARCH_PATHS = ../../include;
-				PRELINK_LIBS = "";
+				INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 9.0;
+				LD_RUNPATH_SEARCH_PATHS = "@executable_path/Frameworks";
+				MARKETING_VERSION = 1.0;
+				OTHER_LDFLAGS = "$(CONFIG_FRAMEWORK_LDFLAGS)";
+				PRODUCT_BUNDLE_IDENTIFIER = "org.libsdl.$(PRODUCT_NAME)";
 				SDKROOT = iphoneos;
 				SDKROOT = iphoneos;
-				TARGETED_DEVICE_FAMILY = "1,2";
+				TVOS_DEPLOYMENT_TARGET = 9.0;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
 		FA30DEA71BBF59D9009C397F /* Debug */ = {
 		FA30DEA71BBF59D9009C397F /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				ENABLE_TESTABILITY = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				INFOPLIST_FILE = Info.plist;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.Happy-TV";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = appletvos;
 				SDKROOT = appletvos;
 				TARGETED_DEVICE_FAMILY = 3;
 				TARGETED_DEVICE_FAMILY = 3;
@@ -1166,164 +884,94 @@
 		FA30DEA81BBF59D9009C397F /* Release */ = {
 		FA30DEA81BBF59D9009C397F /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				INFOPLIST_FILE = Info.plist;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				PRODUCT_BUNDLE_IDENTIFIER = "com.yourcompany.Happy-TV";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SDKROOT = appletvos;
 				SDKROOT = appletvos;
 				TARGETED_DEVICE_FAMILY = 3;
 				TARGETED_DEVICE_FAMILY = 3;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
 				TVOS_DEPLOYMENT_TARGET = 9.0;
-				VALIDATE_PRODUCT = YES;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
 		FD15FCB50E086866003BDF25 /* Debug */ = {
 		FD15FCB50E086866003BDF25 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				GCC_DYNAMIC_NO_PIC = NO;
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
 				PRODUCT_NAME = Happy;
 				PRODUCT_NAME = Happy;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
 		FD15FCB60E086866003BDF25 /* Release */ = {
 		FD15FCB60E086866003BDF25 /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
 				PRODUCT_NAME = Happy;
 				PRODUCT_NAME = Happy;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
 		FD5F9BE70E0DEBEB008E885B /* Debug */ = {
 		FD5F9BE70E0DEBEB008E885B /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
 				PRODUCT_NAME = Accel;
 				PRODUCT_NAME = Accel;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
 		FD5F9BE80E0DEBEB008E885B /* Release */ = {
 		FD5F9BE80E0DEBEB008E885B /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
 				PRODUCT_NAME = Accel;
 				PRODUCT_NAME = Accel;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
 		FDB6520A0E43D1F300F688B5 /* Debug */ = {
 		FDB6520A0E43D1F300F688B5 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
 				PRODUCT_NAME = Keyboard;
 				PRODUCT_NAME = Keyboard;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
 		FDB6520B0E43D1F300F688B5 /* Release */ = {
 		FDB6520B0E43D1F300F688B5 /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
 				PRODUCT_NAME = Keyboard;
 				PRODUCT_NAME = Keyboard;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
 		FDC202EC0E107B1200ABAC90 /* Debug */ = {
 		FDC202EC0E107B1200ABAC90 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
 				PRODUCT_NAME = Touch;
 				PRODUCT_NAME = Touch;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
 		FDC202ED0E107B1200ABAC90 /* Release */ = {
 		FDC202ED0E107B1200ABAC90 /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
 				PRODUCT_NAME = Touch;
 				PRODUCT_NAME = Touch;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
 		FDC52EDC0E2843D6008D768C /* Debug */ = {
 		FDC52EDC0E2843D6008D768C /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Fireworks;
 				PRODUCT_NAME = Fireworks;
 				PRODUCT_NAME = Fireworks;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
 		FDC52EDD0E2843D6008D768C /* Release */ = {
 		FDC52EDD0E2843D6008D768C /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Fireworks;
 				PRODUCT_NAME = Fireworks;
 				PRODUCT_NAME = Fireworks;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};
 		FDF0D6A20E12D05400247964 /* Debug */ = {
 		FDF0D6A20E12D05400247964 /* Debug */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
 				PRODUCT_NAME = Mixer;
 				PRODUCT_NAME = Mixer;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Debug;
 			name = Debug;
 		};
 		};
 		FDF0D6A30E12D05400247964 /* Release */ = {
 		FDF0D6A30E12D05400247964 /* Release */ = {
 			isa = XCBuildConfiguration;
 			isa = XCBuildConfiguration;
 			buildSettings = {
 			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
 				PRODUCT_NAME = Mixer;
 				PRODUCT_NAME = Mixer;
-				SDKROOT = iphoneos;
 			};
 			};
 			name = Release;
 			name = Release;
 		};
 		};

+ 14 - 0
Engine/lib/sdl/Xcode-iOS/Demos/config.xcconfig

@@ -0,0 +1,14 @@
+//
+//  config.xcconfig
+//  SDL tests
+//
+
+// Configuration settings file format documentation can be found at:
+// https://help.apple.com/xcode/#/dev745c5c974
+
+// Include any optional config for this build
+#include? "build.xcconfig"
+
+CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL2 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
+CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
+CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit

+ 2 - 2
Engine/lib/sdl/Xcode-iOS/Demos/src/accelerometer.c

@@ -127,7 +127,7 @@ initializeTextures(SDL_Renderer *renderer)
 
 
     /* create ship texture from surface */
     /* create ship texture from surface */
     ship = SDL_CreateTextureFromSurface(renderer, bmp_surface);
     ship = SDL_CreateTextureFromSurface(renderer, bmp_surface);
-    if (ship == 0) {
+    if (!ship) {
         fatalError("could not create ship texture");
         fatalError("could not create ship texture");
     }
     }
     SDL_SetTextureBlendMode(ship, SDL_BLENDMODE_BLEND);
     SDL_SetTextureBlendMode(ship, SDL_BLENDMODE_BLEND);
@@ -145,7 +145,7 @@ initializeTextures(SDL_Renderer *renderer)
     }
     }
     /* create space texture from surface */
     /* create space texture from surface */
     space = SDL_CreateTextureFromSurface(renderer, bmp_surface);
     space = SDL_CreateTextureFromSurface(renderer, bmp_surface);
-    if (space == 0) {
+    if (!space) {
         fatalError("could not create space texture");
         fatalError("could not create space texture");
     }
     }
     SDL_FreeSurface(bmp_surface);
     SDL_FreeSurface(bmp_surface);

+ 1 - 1
Engine/lib/sdl/Xcode-iOS/Demos/src/happy.c

@@ -117,7 +117,7 @@ initializeTexture(SDL_Renderer *renderer)
 
 
     /* convert RGBA surface to texture */
     /* convert RGBA surface to texture */
     texture = SDL_CreateTextureFromSurface(renderer, bmp_surface);
     texture = SDL_CreateTextureFromSurface(renderer, bmp_surface);
-    if (texture == 0) {
+    if (!texture) {
         fatalError("could not create texture");
         fatalError("could not create texture");
     }
     }
     SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);
     SDL_SetTextureBlendMode(texture, SDL_BLENDMODE_BLEND);

+ 1 - 1
Engine/lib/sdl/Xcode-iOS/Demos/src/keyboard.c

@@ -183,7 +183,7 @@ loadFont(void)
         SDL_BlitSurface(surface, NULL, converted, NULL);
         SDL_BlitSurface(surface, NULL, converted, NULL);
         /* create our texture */
         /* create our texture */
         texture = SDL_CreateTextureFromSurface(renderer, converted);
         texture = SDL_CreateTextureFromSurface(renderer, converted);
-        if (texture == 0) {
+        if (!texture) {
             printf("texture creation failed: %s\n", SDL_GetError());
             printf("texture creation failed: %s\n", SDL_GetError());
         } else {
         } else {
             /* set blend mode for our texture */
             /* set blend mode for our texture */

+ 1 - 1
Engine/lib/sdl/Xcode-iOS/Demos/src/rectangles.c

@@ -58,7 +58,7 @@ main(int argc, char *argv[])
 
 
     /* create window and renderer */
     /* create window and renderer */
     window = SDL_CreateWindow(NULL, 0, 0, 320, 480, SDL_WINDOW_ALLOW_HIGHDPI);
     window = SDL_CreateWindow(NULL, 0, 0, 320, 480, SDL_WINDOW_ALLOW_HIGHDPI);
-    if (window == 0) {
+    if (!window) {
         fatalError("Could not initialize Window");
         fatalError("Could not initialize Window");
     }
     }
     renderer = SDL_CreateRenderer(window, -1, 0);
     renderer = SDL_CreateRenderer(window, -1, 0);

+ 1 - 1
Engine/lib/sdl/Xcode-iOS/Demos/src/touch.c

@@ -63,7 +63,7 @@ initializeTexture(SDL_Renderer *renderer)
     brush =
     brush =
         SDL_CreateTextureFromSurface(renderer, bmp_surface);
         SDL_CreateTextureFromSurface(renderer, bmp_surface);
     SDL_FreeSurface(bmp_surface);
     SDL_FreeSurface(bmp_surface);
-    if (brush == 0) {
+    if (!brush) {
         fatalError("could not create brush texture");
         fatalError("could not create brush texture");
     }
     }
     /* additive blending -- laying strokes on top of eachother makes them brighter */
     /* additive blending -- laying strokes on top of eachother makes them brighter */

+ 0 - 422
Engine/lib/sdl/Xcode-iOS/SDLtest/SDL2test.xcodeproj/project.pbxproj

@@ -1,422 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		AA1EE462176059AB0029C7A5 /* SDL_test_common.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE454176059AB0029C7A5 /* SDL_test_common.c */; };
-		AA1EE463176059AB0029C7A5 /* SDL_test_compare.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */; };
-		AA1EE464176059AB0029C7A5 /* SDL_test_crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */; };
-		AA1EE465176059AB0029C7A5 /* SDL_test_font.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE457176059AB0029C7A5 /* SDL_test_font.c */; };
-		AA1EE466176059AB0029C7A5 /* SDL_test_fuzzer.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */; };
-		AA1EE467176059AB0029C7A5 /* SDL_test_harness.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */; };
-		AA1EE468176059AB0029C7A5 /* SDL_test_imageBlit.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */; };
-		AA1EE469176059AB0029C7A5 /* SDL_test_imageBlitBlend.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */; };
-		AA1EE46A176059AB0029C7A5 /* SDL_test_imageFace.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */; };
-		AA1EE46B176059AB0029C7A5 /* SDL_test_imagePrimitives.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */; };
-		AA1EE46C176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */; };
-		AA1EE46D176059AB0029C7A5 /* SDL_test_log.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */; };
-		AA1EE46E176059AB0029C7A5 /* SDL_test_md5.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */; };
-		AA1EE46F176059AB0029C7A5 /* SDL_test_random.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE461176059AB0029C7A5 /* SDL_test_random.c */; };
-		AAF030011F9009B100B9A9FB /* SDL_test_memory.c in Sources */ = {isa = PBXBuildFile; fileRef = AAF02FFF1F9009B100B9A9FB /* SDL_test_memory.c */; };
-		AAF030021F9009B100B9A9FB /* SDL_test_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = AAF030001F9009B100B9A9FB /* SDL_test_assert.c */; };
-		FA3D99011BC4E5BC002C96C8 /* SDL_test_common.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE454176059AB0029C7A5 /* SDL_test_common.c */; };
-		FA3D99021BC4E5BC002C96C8 /* SDL_test_compare.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */; };
-		FA3D99031BC4E5BC002C96C8 /* SDL_test_crc32.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */; };
-		FA3D99041BC4E5BC002C96C8 /* SDL_test_font.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE457176059AB0029C7A5 /* SDL_test_font.c */; };
-		FA3D99051BC4E5BC002C96C8 /* SDL_test_fuzzer.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */; };
-		FA3D99061BC4E5BC002C96C8 /* SDL_test_harness.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */; };
-		FA3D99071BC4E5BC002C96C8 /* SDL_test_imageBlit.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */; };
-		FA3D99081BC4E5BC002C96C8 /* SDL_test_imageBlitBlend.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */; };
-		FA3D99091BC4E5BC002C96C8 /* SDL_test_imageFace.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */; };
-		FA3D990A1BC4E5BC002C96C8 /* SDL_test_imagePrimitives.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */; };
-		FA3D990B1BC4E5BC002C96C8 /* SDL_test_imagePrimitivesBlend.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */; };
-		FA3D990C1BC4E5BC002C96C8 /* SDL_test_log.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */; };
-		FA3D990D1BC4E5BC002C96C8 /* SDL_test_md5.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */; };
-		FA3D990E1BC4E5BC002C96C8 /* SDL_test_random.c in Sources */ = {isa = PBXBuildFile; fileRef = AA1EE461176059AB0029C7A5 /* SDL_test_random.c */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		FA3D98F61BC4E5A2002C96C8 /* CopyFiles */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "include/$(PRODUCT_NAME)";
-			dstSubfolderSpec = 16;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		AA1EE4461760589B0029C7A5 /* libSDL2test.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2test.a; sourceTree = BUILT_PRODUCTS_DIR; };
-		AA1EE454176059AB0029C7A5 /* SDL_test_common.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_common.c; sourceTree = "<group>"; };
-		AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_compare.c; sourceTree = "<group>"; };
-		AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_crc32.c; sourceTree = "<group>"; };
-		AA1EE457176059AB0029C7A5 /* SDL_test_font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_font.c; sourceTree = "<group>"; };
-		AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_fuzzer.c; sourceTree = "<group>"; };
-		AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_harness.c; sourceTree = "<group>"; };
-		AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlit.c; sourceTree = "<group>"; };
-		AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageBlitBlend.c; sourceTree = "<group>"; };
-		AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imageFace.c; sourceTree = "<group>"; };
-		AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitives.c; sourceTree = "<group>"; };
-		AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_imagePrimitivesBlend.c; sourceTree = "<group>"; };
-		AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_log.c; sourceTree = "<group>"; };
-		AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_md5.c; sourceTree = "<group>"; };
-		AA1EE461176059AB0029C7A5 /* SDL_test_random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_random.c; sourceTree = "<group>"; };
-		AAF02FFF1F9009B100B9A9FB /* SDL_test_memory.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_memory.c; sourceTree = "<group>"; };
-		AAF030001F9009B100B9A9FB /* SDL_test_assert.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_test_assert.c; sourceTree = "<group>"; };
-		FA3D98F81BC4E5A2002C96C8 /* libSDL2test-TV.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libSDL2test-TV.a"; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		AA1EE4431760589B0029C7A5 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FA3D98F51BC4E5A2002C96C8 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		AA1EE43D1760589B0029C7A5 = {
-			isa = PBXGroup;
-			children = (
-				AA1EE453176059770029C7A5 /* Library Source */,
-				AA1EE4471760589B0029C7A5 /* Products */,
-			);
-			sourceTree = "<group>";
-		};
-		AA1EE4471760589B0029C7A5 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				AA1EE4461760589B0029C7A5 /* libSDL2test.a */,
-				FA3D98F81BC4E5A2002C96C8 /* libSDL2test-TV.a */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		AA1EE453176059770029C7A5 /* Library Source */ = {
-			isa = PBXGroup;
-			children = (
-				AAF030001F9009B100B9A9FB /* SDL_test_assert.c */,
-				AA1EE454176059AB0029C7A5 /* SDL_test_common.c */,
-				AA1EE455176059AB0029C7A5 /* SDL_test_compare.c */,
-				AA1EE456176059AB0029C7A5 /* SDL_test_crc32.c */,
-				AA1EE457176059AB0029C7A5 /* SDL_test_font.c */,
-				AA1EE458176059AB0029C7A5 /* SDL_test_fuzzer.c */,
-				AA1EE459176059AB0029C7A5 /* SDL_test_harness.c */,
-				AA1EE45A176059AB0029C7A5 /* SDL_test_imageBlit.c */,
-				AA1EE45B176059AB0029C7A5 /* SDL_test_imageBlitBlend.c */,
-				AA1EE45C176059AB0029C7A5 /* SDL_test_imageFace.c */,
-				AA1EE45D176059AB0029C7A5 /* SDL_test_imagePrimitives.c */,
-				AA1EE45E176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c */,
-				AA1EE45F176059AB0029C7A5 /* SDL_test_log.c */,
-				AA1EE460176059AB0029C7A5 /* SDL_test_md5.c */,
-				AAF02FFF1F9009B100B9A9FB /* SDL_test_memory.c */,
-				AA1EE461176059AB0029C7A5 /* SDL_test_random.c */,
-			);
-			name = "Library Source";
-			path = ../../src/test;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
-		AA1EE4441760589B0029C7A5 /* Headers */ = {
-			isa = PBXHeadersBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
-		AA1EE4451760589B0029C7A5 /* SDL2test */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = AA1EE44A1760589B0029C7A5 /* Build configuration list for PBXNativeTarget "SDL2test" */;
-			buildPhases = (
-				AA1EE4421760589B0029C7A5 /* Sources */,
-				AA1EE4431760589B0029C7A5 /* Frameworks */,
-				AA1EE4441760589B0029C7A5 /* Headers */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = SDL2test;
-			productName = SDL2test;
-			productReference = AA1EE4461760589B0029C7A5 /* libSDL2test.a */;
-			productType = "com.apple.product-type.library.static";
-		};
-		FA3D98F71BC4E5A2002C96C8 /* SDL2test-TV */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FA3D99001BC4E5A3002C96C8 /* Build configuration list for PBXNativeTarget "SDL2test-TV" */;
-			buildPhases = (
-				FA3D98F41BC4E5A2002C96C8 /* Sources */,
-				FA3D98F51BC4E5A2002C96C8 /* Frameworks */,
-				FA3D98F61BC4E5A2002C96C8 /* CopyFiles */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "SDL2test-TV";
-			productName = "SDL2test-TV";
-			productReference = FA3D98F81BC4E5A2002C96C8 /* libSDL2test-TV.a */;
-			productType = "com.apple.product-type.library.static";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		AA1EE43E1760589B0029C7A5 /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0460;
-				ORGANIZATIONNAME = "Sam Lantinga";
-				TargetAttributes = {
-					FA3D98F71BC4E5A2002C96C8 = {
-						CreatedOnToolsVersion = 7.1;
-					};
-				};
-			};
-			buildConfigurationList = AA1EE4411760589B0029C7A5 /* Build configuration list for PBXProject "SDL2test" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 0;
-			knownRegions = (
-				en,
-			);
-			mainGroup = AA1EE43D1760589B0029C7A5;
-			productRefGroup = AA1EE4471760589B0029C7A5 /* Products */;
-			projectDirPath = "";
-			projectRoot = "";
-			targets = (
-				AA1EE4451760589B0029C7A5 /* SDL2test */,
-				FA3D98F71BC4E5A2002C96C8 /* SDL2test-TV */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXSourcesBuildPhase section */
-		AA1EE4421760589B0029C7A5 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AA1EE462176059AB0029C7A5 /* SDL_test_common.c in Sources */,
-				AA1EE463176059AB0029C7A5 /* SDL_test_compare.c in Sources */,
-				AA1EE464176059AB0029C7A5 /* SDL_test_crc32.c in Sources */,
-				AA1EE465176059AB0029C7A5 /* SDL_test_font.c in Sources */,
-				AA1EE466176059AB0029C7A5 /* SDL_test_fuzzer.c in Sources */,
-				AAF030021F9009B100B9A9FB /* SDL_test_assert.c in Sources */,
-				AA1EE467176059AB0029C7A5 /* SDL_test_harness.c in Sources */,
-				AA1EE468176059AB0029C7A5 /* SDL_test_imageBlit.c in Sources */,
-				AA1EE469176059AB0029C7A5 /* SDL_test_imageBlitBlend.c in Sources */,
-				AA1EE46A176059AB0029C7A5 /* SDL_test_imageFace.c in Sources */,
-				AA1EE46B176059AB0029C7A5 /* SDL_test_imagePrimitives.c in Sources */,
-				AA1EE46C176059AB0029C7A5 /* SDL_test_imagePrimitivesBlend.c in Sources */,
-				AAF030011F9009B100B9A9FB /* SDL_test_memory.c in Sources */,
-				AA1EE46D176059AB0029C7A5 /* SDL_test_log.c in Sources */,
-				AA1EE46E176059AB0029C7A5 /* SDL_test_md5.c in Sources */,
-				AA1EE46F176059AB0029C7A5 /* SDL_test_random.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FA3D98F41BC4E5A2002C96C8 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FA3D99011BC4E5BC002C96C8 /* SDL_test_common.c in Sources */,
-				FA3D99021BC4E5BC002C96C8 /* SDL_test_compare.c in Sources */,
-				FA3D99031BC4E5BC002C96C8 /* SDL_test_crc32.c in Sources */,
-				FA3D99041BC4E5BC002C96C8 /* SDL_test_font.c in Sources */,
-				FA3D99051BC4E5BC002C96C8 /* SDL_test_fuzzer.c in Sources */,
-				FA3D99061BC4E5BC002C96C8 /* SDL_test_harness.c in Sources */,
-				FA3D99071BC4E5BC002C96C8 /* SDL_test_imageBlit.c in Sources */,
-				FA3D99081BC4E5BC002C96C8 /* SDL_test_imageBlitBlend.c in Sources */,
-				FA3D99091BC4E5BC002C96C8 /* SDL_test_imageFace.c in Sources */,
-				FA3D990A1BC4E5BC002C96C8 /* SDL_test_imagePrimitives.c in Sources */,
-				FA3D990B1BC4E5BC002C96C8 /* SDL_test_imagePrimitivesBlend.c in Sources */,
-				FA3D990C1BC4E5BC002C96C8 /* SDL_test_log.c in Sources */,
-				FA3D990D1BC4E5BC002C96C8 /* SDL_test_md5.c in Sources */,
-				FA3D990E1BC4E5BC002C96C8 /* SDL_test_random.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		AA1EE4481760589B0029C7A5 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = ../../include;
-				MACOSX_DEPLOYMENT_TARGET = 10.8;
-				ONLY_ACTIVE_ARCH = YES;
-				SDKROOT = iphoneos;
-			};
-			name = Debug;
-		};
-		AA1EE4491760589B0029C7A5 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = YES;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				HEADER_SEARCH_PATHS = ../../include;
-				MACOSX_DEPLOYMENT_TARGET = 10.8;
-				SDKROOT = iphoneos;
-			};
-			name = Release;
-		};
-		AA1EE44B1760589B0029C7A5 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				EXECUTABLE_PREFIX = lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		AA1EE44C1760589B0029C7A5 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				EXECUTABLE_PREFIX = lib;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		FA3D98FE1BC4E5A3002C96C8 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				ENABLE_TESTABILITY = YES;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				MTL_ENABLE_DEBUG_INFO = YES;
-				OTHER_LDFLAGS = "-ObjC";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = appletvos;
-				SKIP_INSTALL = YES;
-				TVOS_DEPLOYMENT_TARGET = 9.0;
-			};
-			name = Debug;
-		};
-		FA3D98FF1BC4E5A3002C96C8 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				COPY_PHASE_STRIP = NO;
-				ENABLE_NS_ASSERTIONS = NO;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				MTL_ENABLE_DEBUG_INFO = NO;
-				OTHER_LDFLAGS = "-ObjC";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = appletvos;
-				SKIP_INSTALL = YES;
-				TVOS_DEPLOYMENT_TARGET = 9.0;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		AA1EE4411760589B0029C7A5 /* Build configuration list for PBXProject "SDL2test" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				AA1EE4481760589B0029C7A5 /* Debug */,
-				AA1EE4491760589B0029C7A5 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		AA1EE44A1760589B0029C7A5 /* Build configuration list for PBXNativeTarget "SDL2test" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				AA1EE44B1760589B0029C7A5 /* Debug */,
-				AA1EE44C1760589B0029C7A5 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FA3D99001BC4E5A3002C96C8 /* Build configuration list for PBXNativeTarget "SDL2test-TV" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FA3D98FE1BC4E5A3002C96C8 /* Debug */,
-				FA3D98FF1BC4E5A3002C96C8 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = AA1EE43E1760589B0029C7A5 /* Project object */;
-}

+ 0 - 34
Engine/lib/sdl/Xcode-iOS/Test/Info.plist

@@ -1,34 +0,0 @@
-<?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>en</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
-	<key>CFBundleIdentifier</key>
-	<string>com.yourcompany.${PRODUCT_NAME}</string>
-	<key>CFBundleInfoDictionaryVersion</key>
-	<string>6.0</string>
-	<key>CFBundleName</key>
-	<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/>
-	<key>NSBluetoothAlwaysUsageDescription</key>
-	<string>Steam Link would like to use Bluetooth controllers for input.</string>
-	<key>NSBluetoothPeripheralUsageDescription</key>
-	<string>Steam Link would like to use Bluetooth controllers for input.</string>
-</dict>
-</plist>

+ 0 - 11
Engine/lib/sdl/Xcode-iOS/Test/README

@@ -1,11 +0,0 @@
-TestiPhoneOS.xcodeproj contains targets to compile many of the SDL test programs for iPhone OS.  Most of these test programs work fine, with the following exceptions:
-
-testthread:
-	SIGTERM kills the process immediately without executing the 'kill' function.  The posix standard says this shouldn't happen.  Apple seems intent on having iPhone apps exit promptly when the user requests it, so maybe that's why(?)
-
-testlock:
-	Locks appear to work, but there doesn't appear to be a simple way to send the process SIGINT.
-
-testsprite2: 
-	SDL_CreateTextureFromSurface requests an ARGB pixel format, but iPhone's SDL video driver only supports ABGR.
-

+ 0 - 3703
Engine/lib/sdl/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj

@@ -1,3703 +0,0 @@
-// !$*UTF8*$!
-{
-	archiveVersion = 1;
-	classes = {
-	};
-	objectVersion = 46;
-	objects = {
-
-/* Begin PBXBuildFile section */
-		046CEF7713254F23007AD51D /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		046CEF7C13254F23007AD51D /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		046CEF7D13254F23007AD51D /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		046CEF7E13254F23007AD51D /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		046CEF7F13254F23007AD51D /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		046CEF8013254F23007AD51D /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		046CEF8113254F23007AD51D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		046CEF8213254F23007AD51D /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		046CEF8A13254F63007AD51D /* testgesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 046CEF8913254F63007AD51D /* testgesture.c */; };
-		047A63E313285C3200CD7973 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		047A63E413285C3200CD7973 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		047A63E513285C3200CD7973 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		047A63E613285C3200CD7973 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		047A63E713285C3200CD7973 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		047A63E813285C3200CD7973 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		047A63E913285C3200CD7973 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		047A63F113285CD100CD7973 /* checkkeys.c in Sources */ = {isa = PBXBuildFile; fileRef = 047A63F013285CD100CD7973 /* checkkeys.c */; };
-		56ED04FE118A8FE400A56AA6 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		56ED0503118A8FE400A56AA6 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		56ED0504118A8FE400A56AA6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		56ED0505118A8FE400A56AA6 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		56ED0506118A8FE400A56AA6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		56ED0507118A8FE400A56AA6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		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 */; };
-		AA13B3171FB8AEBC00D9FEE6 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		AA13B3181FB8AEBC00D9FEE6 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		AA13B31A1FB8AEBC00D9FEE6 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		AA13B31B1FB8AEBC00D9FEE6 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		AA13B31C1FB8AEBC00D9FEE6 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		AA13B31D1FB8AEBC00D9FEE6 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		AA13B31E1FB8AEBC00D9FEE6 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		AA13B31F1FB8AEBC00D9FEE6 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		AA13B3201FB8AEBC00D9FEE6 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		AA13B3211FB8AEBC00D9FEE6 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		AA13B3221FB8AEBC00D9FEE6 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		AA13B32F1FB8AF0C00D9FEE6 /* testyuv.bmp in Resources */ = {isa = PBXBuildFile; fileRef = AA13B32E1FB8AF0C00D9FEE6 /* testyuv.bmp */; };
-		AA13B3301FB8AF2300D9FEE6 /* testyuv.bmp in Resources */ = {isa = PBXBuildFile; fileRef = AA13B32E1FB8AF0C00D9FEE6 /* testyuv.bmp */; };
-		AA13B35D1FB8B4E200D9FEE6 /* testyuv.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B35B1FB8B4D600D9FEE6 /* testyuv.c */; };
-		AA13B3611FB8B52500D9FEE6 /* testyuv_cvt.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B35E1FB8B50D00D9FEE6 /* testyuv_cvt.c */; };
-		AA1EE470176059D00029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		AA1EE47117605A7F0029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		AA1EE47417605B5C0029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		AA1EE47517605B930029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		AA1EE47617605B9E0029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		AA1EE47717605BAB0029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		AA1EE47817605BF60029C7A5 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		AA2F57AA1FDB544800832AD7 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		AA2F57AB1FDB5A0900832AD7 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		AA2F57AC1FDB5AB600832AD7 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		AAE7DEDC14CBB1E100DF1A0E /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		AAE7DEE314CBB1E100DF1A0E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		AAE7DEE414CBB1E100DF1A0E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		AAE7DEE514CBB1E100DF1A0E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		AAE7DEE614CBB1E100DF1A0E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		AAE7DEE714CBB1E100DF1A0E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		AAE7DEE814CBB1E100DF1A0E /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		AAE7DF4614CBB43900DF1A0E /* testscale.c in Sources */ = {isa = PBXBuildFile; fileRef = AAE7DF4514CBB43900DF1A0E /* testscale.c */; };
-		AAE7DF4714CBB45000DF1A0E /* sample.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AADE0E2D33C100EA573E /* sample.bmp */; };
-		AAE7DFA014CBB54E00DF1A0E /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		AAE7DFA114CBB54E00DF1A0E /* sample.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AADE0E2D33C100EA573E /* sample.bmp */; };
-		AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		AAE7DFA814CBB54E00DF1A0E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		AAE7DFA914CBB54E00DF1A0E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		AAE7DFAA14CBB54E00DF1A0E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		AAE7DFAB14CBB54E00DF1A0E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		AAE7DFAC14CBB54E00DF1A0E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		AAE7DFB514CBB5F700DF1A0E /* testrendertarget.c in Sources */ = {isa = PBXBuildFile; fileRef = AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */; };
-		F395BF862564186400942BFF /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		F395BF8A2564186400942BFF /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F395BF8B2564186400942BFF /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		F395BF8C2564186400942BFF /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		F395BF8D2564186400942BFF /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		F395BF8E2564186400942BFF /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		F395BF8F2564186400942BFF /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395BF902564186400942BFF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		F395BF912564186400942BFF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		F395BF922564186400942BFF /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		F395BF932564186400942BFF /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F395BF942564186400942BFF /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		F395BF952564186400942BFF /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		F395BF962564186400942BFF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		F395BFE2256418A700942BFF /* testsensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F395BFE1256418A600942BFF /* testsensor.c */; };
-		F395C04F256419A500942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C0C825644AFE00942BFF /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F395C0C925644B0400942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C0E525644B3900942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C0E625644B5200942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F52555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C0E725644B6200942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C0E825644B6D00942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C0E925644B7700942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C0EA25644B8100942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; };
-		F395C10625644BDC00942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10725644BE900942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10825644BF600942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10925644BFF00942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10A25644C0A00942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10B25644C1700942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10C25644C2100942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10D25644C2900942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10E25644C3200942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C10F25644C3C00942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11025644C4500942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11125644C4E00942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11225644C5900942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11325644C6300942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11425644C6D00942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11525644C7600942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11625644C7E00942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11725644C8800942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F395C11825644C9100942BFF /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4938E2555E2D500E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A493AC2555E30000E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494022555E37A00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4941F2555E39600E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A494202555E39E00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494212555E3AE00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A494222555E3B700E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494232555E3C900E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E72555E1F100E92A8B /* libSDL2.a */; };
-		F3A494252555E3D100E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A494242555E3D100E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494692555E42B00E92A8B /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A494682555E42B00E92A8B /* Metal.framework */; };
-		F3A494D12555E75200E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A494D22555E75B00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494D32555E76E00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A494D42555E77400E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494F12555E7B300E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A494F22555E7B900E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494F32555E7D000E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A494F42555E7D800E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494F52555E7F800E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E72555E1F100E92A8B /* libSDL2.a */; };
-		F3A494F62555E7FE00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A494242555E3D100E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494F72555E80E00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A494FD2555E89700E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A494FE2555E8AA00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A494FF2555E8B300E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495002555E8C000E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495012555E8D200E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495022555E9BF00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495032555E9C600E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495042555E9D900E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495052555E9E000E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495062555E9F100E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495072555E9F700E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495082555EA0300E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495092555EA1200E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4950A2555EA1D00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A4950B2555EA2300E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4950C2555EA3700E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A4950D2555EA3D00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4950E2555EA5E00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A4950F2555EA6400E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495102555EA7600E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495112555EA7B00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495122555EA8700E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495132555EA8C00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495142555EA9B00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495152555EAA100E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495162555EAB000E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495172555EABB00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A495182555EAC500E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A495192555EACB00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4951A2555EADC00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A4951B2555EAE200E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4951C2555EB0E00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A4951D2555EB1300E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4951E2555EB2600E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A4951F2555EB2D00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A4953D2555EB8100E92A8B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A4953C2555EB8100E92A8B /* AVFoundation.framework */; };
-		F3A4955A2555EB9500E92A8B /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A494682555E42B00E92A8B /* Metal.framework */; };
-		F3A498732556005300E92A8B /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A498742556005300E92A8B /* hidapi.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3A498762556005D00E92A8B /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F52555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A498772556005D00E92A8B /* hidapi.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F52555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3A499B9255618AF00E92A8B /* controllermap.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */; };
-		F3A499BA255618AF00E92A8B /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		F3A499BB255618AF00E92A8B /* axis.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF2281BAF4487000E07A6 /* axis.bmp */; };
-		F3A499BC255618AF00E92A8B /* button.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF2291BAF4487000E07A6 /* button.bmp */; };
-		F3A499C0255618AF00E92A8B /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492E52555E1F100E92A8B /* libSDL2.a */; };
-		F3A499C1255618AF00E92A8B /* hidapi.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A499C2255618AF00E92A8B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		F3A499C3255618AF00E92A8B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		F3A499C4255618AF00E92A8B /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		F3A499C5255618AF00E92A8B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		F3A499C6255618AF00E92A8B /* CoreHaptics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F3A493AB2555E30000E92A8B /* CoreHaptics.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
-		F3A499C7255618AF00E92A8B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		F3A499C8255618AF00E92A8B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		F3A499C9255618AF00E92A8B /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		F3A499CA255618AF00E92A8B /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3A499CB255618AF00E92A8B /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		F3A499CC255618AF00E92A8B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		F3A499CD255618AF00E92A8B /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		F3A499CF255618AF00E92A8B /* hidapi.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = F3A492F32555E1F100E92A8B /* hidapi.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
-		F3A49A822556190000E92A8B /* controllermap.c in Sources */ = {isa = PBXBuildFile; fileRef = F3A49A4C255618DD00E92A8B /* controllermap.c */; };
-		F3A49AFE2556A47500E92A8B /* controllermap_back.bmp in Resources */ = {isa = PBXBuildFile; fileRef = F3A49AFD2556A47500E92A8B /* controllermap_back.bmp */; };
-		F3A49AFF2556A47500E92A8B /* controllermap_back.bmp in Resources */ = {isa = PBXBuildFile; fileRef = F3A49AFD2556A47500E92A8B /* controllermap_back.bmp */; };
-		F3A49B002556A47500E92A8B /* controllermap_back.bmp in Resources */ = {isa = PBXBuildFile; fileRef = F3A49AFD2556A47500E92A8B /* controllermap_back.bmp */; };
-		F3F758D322AC561A001D97F2 /* libSDL2test.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AA1EE452176059230029C7A5 /* libSDL2test.a */; };
-		F3F758D422AC575F001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758D522AC57D8001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758D622AC5811001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758DA22AC59A5001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758DB22AC5A1B001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758DC22AC5A46001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758DD22AC5A6C001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758DE22AC5ABB001D97F2 /* testgamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */; };
-		F3F758DF22AC5B94001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E022AC5BB6001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E122AC5BE9001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E222AC5C12001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E322AC5C34001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E422AC5C83001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E522AC5CA5001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E622AC5CC5001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E722AC5CFE001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E822AC5D1B001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758E922AC5D51001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758EA22AC5D6B001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758EB22AC5D8B001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758EC22AC5DA6001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758ED22AC5DC5001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		F3F758EE22AC5DE1001D97F2 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AA2F57A91FDB544800832AD7 /* Metal.framework */; };
-		FA0EF22E1BAF4654000E07A6 /* testjoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A74E0E2D0F1600EA573E /* testjoystick.c */; };
-		FA3D99481BC4E6AD002C96C8 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA3D994A1BC4E6AD002C96C8 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FA3D994B1BC4E6AD002C96C8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FA3D994C1BC4E6AD002C96C8 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FA3D994D1BC4E6AD002C96C8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FA3D994E1BC4E6AD002C96C8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FA3D994F1BC4E6AD002C96C8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FA3D99501BC4E6AD002C96C8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FA3D99521BC4E70C002C96C8 /* controllermap.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */; };
-		FA3D99531BC4E70E002C96C8 /* axis.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF2281BAF4487000E07A6 /* axis.bmp */; };
-		FA3D99541BC4E70F002C96C8 /* button.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF2291BAF4487000E07A6 /* button.bmp */; };
-		FA3D99551BC4E712002C96C8 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		FA684F7B1BAF1A4400DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F7F1BAF1A4D00DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F801BAF1A5000DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F811BAF1A5300DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F821BAF1A5700DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F831BAF1A5A00DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F841BAF1A5C00DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F851BAF1A6000DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F861BAF1A6200DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F871BAF1A6500DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F881BAF1A6800DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F891BAF1A6A00DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F8A1BAF1A6D00DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F8B1BAF1A7100DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F8C1BAF1A7400DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F8D1BAF1A7800DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F8E1BAF1A7B00DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F8F1BAF1A7E00DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F901BAF1A8100DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F911BAF1A8400DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F921BAF1A8700DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F931BAF1A8A00DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA684F941BAF1A9400DCFD1A /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FA8B4BAD1967076F00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BC9196766BC00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BCD196766BF00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BCE196766C100F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BCF196766C400F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD0196766C600F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD1196766C900F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD2196766CB00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD3196766CE00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD4196766D100F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD5196766D400F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD6196766D700F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD7196766DA00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD8196766DD00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BD9196766E000F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BDA196766E200F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BDB196766E500F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BDC196766E800F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BDD196766EB00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BDE196766EE00F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BDF196766F100F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BE0196766F400F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FA8B4BE1196766F600F8EB7C /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FABA34771D8B4EAD00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34831D8B575200915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34851D8B575200915323 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FABA34861D8B575200915323 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FABA34871D8B575200915323 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FABA34881D8B575200915323 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FABA34891D8B575200915323 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FABA348A1D8B575200915323 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FABA348B1D8B575200915323 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FABA348C1D8B575200915323 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FABA348D1D8B575200915323 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FABA34951D8B578600915323 /* testaudiocapture.c in Sources */ = {isa = PBXBuildFile; fileRef = FABA34931D8B578200915323 /* testaudiocapture.c */; };
-		FABA34981D8B582100915323 /* sample.wav in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAE20E2D33C600EA573E /* sample.wav */; };
-		FABA349A1D8B582100915323 /* loopwave.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A78B0E2D0F3D00EA573E /* loopwave.c */; };
-		FABA349C1D8B582100915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA349E1D8B582100915323 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FABA34A01D8B582100915323 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FABA34A11D8B582100915323 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FABA34A21D8B582100915323 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FABA34A31D8B582100915323 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FABA34A41D8B582100915323 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FABA34A51D8B582100915323 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FABA34A61D8B582100915323 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FABA34AE1D8B58B200915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B01D8B5B6400915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B11D8B5B6C00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B21D8B5B7300915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B31D8B5B7800915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B41D8B5B7C00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B51D8B5B8400915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B61D8B5B8900915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B71D8B5B8D00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B81D8B5B9200915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34B91D8B5B9600915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34BA1D8B5B9B00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34BB1D8B5BA100915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34BC1D8B5BA600915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34BD1D8B5BAB00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34BE1D8B5BB000915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34BF1D8B5BB500915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34C01D8B5BBA00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34C11D8B5BBE00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34C21D8B5BC200915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34C31D8B5BC600915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34C41D8B5BCB00915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FABA34C51D8B5BD000915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34761D8B4EAD00915323 /* AVFoundation.framework */; };
-		FAE0E9821BAF9B230098DFA4 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		FAE0E9871BAF9B230098DFA4 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
-		FAE0E9881BAF9B230098DFA4 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */; };
-		FAE0E9891BAF9B230098DFA4 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FAE0E98A1BAF9B230098DFA4 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FAE0E98B1BAF9B230098DFA4 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FAE0E98C1BAF9B230098DFA4 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FAE0E98D1BAF9B230098DFA4 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FAE0E98E1BAF9B230098DFA4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FAE0E98F1BAF9B230098DFA4 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FAE0E9951BAF9B510098DFA4 /* testgamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */; };
-		FAE0E9961BAF9B650098DFA4 /* controllermap.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */; };
-		FAE0E9971BAF9B6A0098DFA4 /* button.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF2291BAF4487000E07A6 /* button.bmp */; };
-		FAE0E9981BAF9B6E0098DFA4 /* axis.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FA0EF2281BAF4487000E07A6 /* axis.bmp */; };
-		FDA8A79C0E2D0F9300EA573E /* testwm2.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A75F0E2D0F1600EA573E /* testwm2.c */; };
-		FDA8A89F0E2D111A00EA573E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDA8A8A00E2D111A00EA573E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDA8A8A10E2D111A00EA573E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDA8A8A20E2D111A00EA573E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDA8A8A30E2D111A00EA573E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDA8A8A40E2D111A00EA573E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDA8A8A50E2D111A00EA573E /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDA8AAB10E2D330F00EA573E /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDA8AAB20E2D330F00EA573E /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDA8AAB30E2D330F00EA573E /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDA8AAB40E2D330F00EA573E /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDA8AAB50E2D330F00EA573E /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDA8AAB60E2D330F00EA573E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDA8AAB70E2D330F00EA573E /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDA8AABE0E2D335C00EA573E /* loopwave.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A78B0E2D0F3D00EA573E /* loopwave.c */; };
-		FDA8AAE30E2D33C600EA573E /* sample.wav in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAE20E2D33C600EA573E /* sample.wav */; };
-		FDAAC3C30E2D47E6001DB1D8 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDAAC3C40E2D47E6001DB1D8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDAAC3C50E2D47E6001DB1D8 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDAAC3C60E2D47E6001DB1D8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDAAC3C70E2D47E6001DB1D8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDAAC3C80E2D47E6001DB1D8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDAAC3C90E2D47E6001DB1D8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDAAC3D30E2D4800001DB1D8 /* testaudioinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7410E2D0F1600EA573E /* testaudioinfo.c */; };
-		FDAAC5910E2D5429001DB1D8 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDAAC5920E2D5429001DB1D8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDAAC5930E2D5429001DB1D8 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDAAC5940E2D5429001DB1D8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDAAC5950E2D5429001DB1D8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDAAC5960E2D5429001DB1D8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDAAC5970E2D5429001DB1D8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDAAC59F0E2D54B8001DB1D8 /* testerror.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7470E2D0F1600EA573E /* testerror.c */; };
-		FDAAC5BF0E2D55B5001DB1D8 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDAAC5C00E2D55B5001DB1D8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDAAC5C10E2D55B5001DB1D8 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDAAC5C20E2D55B5001DB1D8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDAAC5C30E2D55B5001DB1D8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDAAC5C40E2D55B5001DB1D8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDAAC5C50E2D55B5001DB1D8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDAAC5CC0E2D55CA001DB1D8 /* testfile.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7480E2D0F1600EA573E /* testfile.c */; };
-		FDAAC61C0E2D5914001DB1D8 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDAAC61D0E2D5914001DB1D8 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDAAC61E0E2D5914001DB1D8 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDAAC61F0E2D5914001DB1D8 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDAAC6200E2D5914001DB1D8 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDAAC6210E2D5914001DB1D8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDAAC6220E2D5914001DB1D8 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDAAC62A0E2D5960001DB1D8 /* testgles.c in Sources */ = {isa = PBXBuildFile; fileRef = FDAAC6290E2D5960001DB1D8 /* testgles.c */; };
-		FDAAC6390E2D59BE001DB1D8 /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		FDC42FF60F0D866D009C87E1 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDC42FF70F0D866D009C87E1 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDC42FF80F0D866D009C87E1 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDC42FF90F0D866D009C87E1 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDC42FFA0F0D866D009C87E1 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDC42FFB0F0D866D009C87E1 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDC42FFC0F0D866D009C87E1 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDC4300A0F0D86BF009C87E1 /* testdraw2.c in Sources */ = {isa = PBXBuildFile; fileRef = FDC430090F0D86BF009C87E1 /* testdraw2.c */; };
-		FDD2C1000E2E4F4B00B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C1010E2E4F4B00B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C1020E2E4F4B00B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C1030E2E4F4B00B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C1040E2E4F4B00B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C1050E2E4F4B00B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C1060E2E4F4B00B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C10D0E2E4F6900B7A85F /* testthread.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A74C0E2D0F1600EA573E /* testthread.c */; };
-		FDD2C1770E2E52C000B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C1780E2E52C000B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C1790E2E52C000B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C17A0E2E52C000B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C17B0E2E52C000B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C17C0E2E52C000B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C17D0E2E52C000B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C1840E2E52D900B7A85F /* testiconv.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A74D0E2D0F1600EA573E /* testiconv.c */; };
-		FDD2C18B0E2E52FE00B7A85F /* utf8.txt in Resources */ = {isa = PBXBuildFile; fileRef = FDD2C18A0E2E52FE00B7A85F /* utf8.txt */; };
-		FDD2C19B0E2E534F00B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C19C0E2E534F00B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C19D0E2E534F00B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C19E0E2E534F00B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C19F0E2E534F00B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C1A00E2E534F00B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C1A10E2E534F00B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C4540E2E773800B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C4550E2E773800B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C4560E2E773800B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C4570E2E773800B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C4580E2E773800B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C4590E2E773800B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C45A0E2E773800B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C4610E2E777500B7A85F /* testkeys.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A74F0E2D0F1600EA573E /* testkeys.c */; };
-		FDD2C4720E2E77D700B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C4730E2E77D700B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C4740E2E77D700B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C4750E2E77D700B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C4760E2E77D700B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C4770E2E77D700B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C4780E2E77D700B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C47F0E2E77E300B7A85F /* testlock.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7510E2D0F1600EA573E /* testlock.c */; };
-		FDD2C5010E2E7F4800B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C5020E2E7F4800B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C5030E2E7F4800B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C5040E2E7F4800B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C5050E2E7F4800B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C5060E2E7F4800B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C5070E2E7F4800B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C50E0E2E7F5800B7A85F /* testplatform.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7560E2D0F1600EA573E /* testplatform.c */; };
-		FDD2C51F0E2E807600B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C5200E2E807600B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C5210E2E807600B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C5220E2E807600B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C5230E2E807600B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C5240E2E807600B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C5250E2E807600B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C52C0E2E808700B7A85F /* testsem.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7570E2D0F1600EA573E /* testsem.c */; };
-		FDD2C5440E2E80E400B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C5450E2E80E400B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C5460E2E80E400B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C5470E2E80E400B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C5480E2E80E400B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C5490E2E80E400B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C54A0E2E80E400B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C5510E2E80F400B7A85F /* testsprite2.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7590E2D0F1600EA573E /* testsprite2.c */; };
-		FDD2C5520E2E812C00B7A85F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		FDD2C5760E2E8C7400B7A85F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		FDD2C57D0E2E8C7400B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C57E0E2E8C7400B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C57F0E2E8C7400B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C5800E2E8C7400B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C5810E2E8C7400B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C5820E2E8C7400B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C5830E2E8C7400B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C58A0E2E8CB500B7A85F /* testtimer.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A75A0E2D0F1600EA573E /* testtimer.c */; };
-		FDD2C5B50E2E8CFC00B7A85F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDA8AAD90E2D33B000EA573E /* icon.bmp */; };
-		FDD2C5BB0E2E8CFC00B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C5BC0E2E8CFC00B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C5BD0E2E8CFC00B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C5BE0E2E8CFC00B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C5BF0E2E8CFC00B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C5C00E2E8CFC00B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C5C10E2E8CFC00B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C5C80E2E8D1200B7A85F /* testver.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A75B0E2D0F1600EA573E /* testver.c */; };
-		FDD2C6EA0E2E959E00B7A85F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */; };
-		FDD2C6EB0E2E959E00B7A85F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A8990E2D111A00EA573E /* QuartzCore.framework */; };
-		FDD2C6EC0E2E959E00B7A85F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */; };
-		FDD2C6ED0E2E959E00B7A85F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */; };
-		FDD2C6EE0E2E959E00B7A85F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89C0E2D111A00EA573E /* UIKit.framework */; };
-		FDD2C6EF0E2E959E00B7A85F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89D0E2D111A00EA573E /* Foundation.framework */; };
-		FDD2C6F00E2E959E00B7A85F /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */; };
-		FDD2C6F70E2E95B100B7A85F /* torturethread.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA8A7610E2D0F1600EA573E /* torturethread.c */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXContainerItemProxy section */
-		AA1EE451176059230029C7A5 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = AA1EE4461760589B0029C7A5;
-			remoteInfo = SDL2test;
-		};
-		F3A492DC2555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = BECDF66C0761BA81005FE872;
-			remoteInfo = Framework;
-		};
-		F3A492DE2555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A7D88B5423E2437C00DCD162;
-			remoteInfo = "Framework-iOS";
-		};
-		F3A492E02555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A7D88D1523E24BED00DCD162;
-			remoteInfo = "Framework-tvOS";
-		};
-		F3A492E22555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = BECDF6B30761BA81005FE872;
-			remoteInfo = "Static Library";
-		};
-		F3A492E42555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A7D88E5423E24D3B00DCD162;
-			remoteInfo = "Static Library-iOS";
-		};
-		F3A492E62555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A769B23D23E259AE00872273;
-			remoteInfo = "Static Library-tvOS";
-		};
-		F3A492E82555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = DB31407717554B71006C0E22;
-			remoteInfo = "Shared Library";
-		};
-		F3A492EA2555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A75FCEB323E25AB700529352;
-			remoteInfo = "Shared Library-iOS";
-		};
-		F3A492EC2555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A75FD06C23E25AC700529352;
-			remoteInfo = "Shared Library-tvOS";
-		};
-		F3A492EE2555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = BECDF6BE0761BA81005FE872;
-			remoteInfo = "Standard DMG";
-		};
-		F3A492F02555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A75FDB8C23E4C74400529352;
-			remoteInfo = hidapi;
-		};
-		F3A492F22555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A75FDB4923E399AC00529352;
-			remoteInfo = "hidapi-iOS";
-		};
-		F3A492F42555E1F100E92A8B /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = A75FDB6E23E3A2C900529352;
-			remoteInfo = "hidapi-tvOS";
-		};
-		FA3D992E1BC4E619002C96C8 /* PBXContainerItemProxy */ = {
-			isa = PBXContainerItemProxy;
-			containerPortal = AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */;
-			proxyType = 2;
-			remoteGlobalIDString = FA3D98F81BC4E5A2002C96C8;
-			remoteInfo = "SDL2test-TV";
-		};
-/* End PBXContainerItemProxy section */
-
-/* Begin PBXCopyFilesBuildPhase section */
-		F3A498752556005300E92A8B /* Embed Frameworks */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				F3A498742556005300E92A8B /* hidapi.framework in Embed Frameworks */,
-			);
-			name = "Embed Frameworks";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		F3A498782556005D00E92A8B /* Embed Frameworks */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				F3A498772556005D00E92A8B /* hidapi.framework in Embed Frameworks */,
-			);
-			name = "Embed Frameworks";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		F3A499CE255618AF00E92A8B /* Embed Frameworks */ = {
-			isa = PBXCopyFilesBuildPhase;
-			buildActionMask = 2147483647;
-			dstPath = "";
-			dstSubfolderSpec = 10;
-			files = (
-				F3A499CF255618AF00E92A8B /* hidapi.framework in Embed Frameworks */,
-			);
-			name = "Embed Frameworks";
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXCopyFilesBuildPhase section */
-
-/* Begin PBXFileReference section */
-		046CEF8613254F23007AD51D /* testgesture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgesture.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		046CEF8913254F63007AD51D /* testgesture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgesture.c; sourceTree = "<group>"; };
-		047A63ED13285C3200CD7973 /* checkkeys.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = checkkeys.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		047A63F013285CD100CD7973 /* checkkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = checkkeys.c; sourceTree = "<group>"; };
-		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; };
-		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>"; };
-		AA13B35E1FB8B50D00D9FEE6 /* testyuv_cvt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testyuv_cvt.c; sourceTree = "<group>"; };
-		AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL2test.xcodeproj; path = ../SDLtest/SDL2test.xcodeproj; sourceTree = "<group>"; };
-		AA2F57A91FDB544800832AD7 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
-		AAE7DEEC14CBB1E100DF1A0E /* testscale.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testscale.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		AAE7DF4514CBB43900DF1A0E /* testscale.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testscale.c; sourceTree = "<group>"; };
-		AAE7DFB114CBB54E00DF1A0E /* testrendertarget.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testrendertarget.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testrendertarget.c; sourceTree = "<group>"; };
-		F395BF9A2564186400942BFF /* testsensor.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testsensor.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		F395BF9B2564186400942BFF /* testpower copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "testpower copy-Info.plist"; path = "/Users/valve/projects/SDL/Xcode-iOS/Test/testpower copy-Info.plist"; sourceTree = "<absolute>"; };
-		F395BFE1256418A600942BFF /* testsensor.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsensor.c; sourceTree = "<group>"; };
-		F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
-		F3A493AB2555E30000E92A8B /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = System/Library/Frameworks/CoreHaptics.framework; sourceTree = SDKROOT; };
-		F3A494242555E3D100E92A8B /* CoreHaptics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreHaptics.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CoreHaptics.framework; sourceTree = DEVELOPER_DIR; };
-		F3A494682555E42B00E92A8B /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; };
-		F3A494F82555E83D00E92A8B /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/CoreBluetooth.framework; sourceTree = DEVELOPER_DIR; };
-		F3A4953C2555EB8100E92A8B /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS14.0.sdk/System/Library/Frameworks/AVFoundation.framework; sourceTree = DEVELOPER_DIR; };
-		F3A499D3255618AF00E92A8B /* controllermap.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = controllermap.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		F3A499D4255618AF00E92A8B /* testgamecontroller copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "testgamecontroller copy-Info.plist"; path = "/Users/valve/projects/SDL/Xcode-iOS/Test/testgamecontroller copy-Info.plist"; sourceTree = "<absolute>"; };
-		F3A49A4C255618DD00E92A8B /* controllermap.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; path = controllermap.c; sourceTree = "<group>"; };
-		F3A49AFD2556A47500E92A8B /* controllermap_back.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = controllermap_back.bmp; sourceTree = "<group>"; };
-		FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgamecontroller.c; sourceTree = "<group>"; };
-		FA0EF2281BAF4487000E07A6 /* axis.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = axis.bmp; sourceTree = "<group>"; };
-		FA0EF2291BAF4487000E07A6 /* button.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = button.bmp; sourceTree = "<group>"; };
-		FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = controllermap.bmp; sourceTree = "<group>"; };
-		FA3D99341BC4E644002C96C8 /* testgamecontroller-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "testgamecontroller-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-		FA684F7A1BAF1A4400DCFD1A /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
-		FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
-		FABA34761D8B4EAD00915323 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
-		FABA34911D8B575200915323 /* testaudiocapture.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testaudiocapture.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FABA34931D8B578200915323 /* testaudiocapture.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testaudiocapture.c; sourceTree = "<group>"; };
-		FABA34AA1D8B582100915323 /* loopwav-TV.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "loopwav-TV.app"; sourceTree = BUILT_PRODUCTS_DIR; };
-		FAE0E9931BAF9B230098DFA4 /* testgamecontroller.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgamecontroller.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDA8A7410E2D0F1600EA573E /* testaudioinfo.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testaudioinfo.c; sourceTree = "<group>"; };
-		FDA8A7470E2D0F1600EA573E /* testerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testerror.c; sourceTree = "<group>"; };
-		FDA8A7480E2D0F1600EA573E /* testfile.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testfile.c; sourceTree = "<group>"; };
-		FDA8A74C0E2D0F1600EA573E /* testthread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testthread.c; sourceTree = "<group>"; };
-		FDA8A74D0E2D0F1600EA573E /* testiconv.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testiconv.c; sourceTree = "<group>"; };
-		FDA8A74E0E2D0F1600EA573E /* testjoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testjoystick.c; sourceTree = "<group>"; };
-		FDA8A74F0E2D0F1600EA573E /* testkeys.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testkeys.c; sourceTree = "<group>"; };
-		FDA8A7510E2D0F1600EA573E /* testlock.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testlock.c; sourceTree = "<group>"; };
-		FDA8A7540E2D0F1600EA573E /* testoverlay2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testoverlay2.c; sourceTree = "<group>"; };
-		FDA8A7560E2D0F1600EA573E /* testplatform.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testplatform.c; sourceTree = "<group>"; };
-		FDA8A7570E2D0F1600EA573E /* testsem.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsem.c; sourceTree = "<group>"; };
-		FDA8A7590E2D0F1600EA573E /* testsprite2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testsprite2.c; sourceTree = "<group>"; };
-		FDA8A75A0E2D0F1600EA573E /* testtimer.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testtimer.c; sourceTree = "<group>"; };
-		FDA8A75B0E2D0F1600EA573E /* testver.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testver.c; sourceTree = "<group>"; };
-		FDA8A75F0E2D0F1600EA573E /* testwm2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testwm2.c; sourceTree = "<group>"; };
-		FDA8A7610E2D0F1600EA573E /* torturethread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = torturethread.c; sourceTree = "<group>"; };
-		FDA8A78B0E2D0F3D00EA573E /* loopwave.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = loopwave.c; sourceTree = "<group>"; };
-		FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
-		FDA8A8990E2D111A00EA573E /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
-		FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
-		FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
-		FDA8A89C0E2D111A00EA573E /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
-		FDA8A89D0E2D111A00EA573E /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
-		FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
-		FDA8AABB0E2D330F00EA573E /* loopwav.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = loopwav.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDA8AAD90E2D33B000EA573E /* icon.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = icon.bmp; sourceTree = "<group>"; };
-		FDA8AADA0E2D33BA00EA573E /* moose.dat */ = {isa = PBXFileReference; lastKnownFileType = file; path = moose.dat; sourceTree = "<group>"; };
-		FDA8AADB0E2D33BA00EA573E /* picture.xbm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = picture.xbm; sourceTree = "<group>"; };
-		FDA8AADE0E2D33C100EA573E /* sample.bmp */ = {isa = PBXFileReference; lastKnownFileType = image.bmp; path = sample.bmp; sourceTree = "<group>"; };
-		FDA8AAE20E2D33C600EA573E /* sample.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; path = sample.wav; sourceTree = "<group>"; };
-		FDAAC3CD0E2D47E6001DB1D8 /* testaudioinfo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testaudioinfo.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDAAC59B0E2D5429001DB1D8 /* testerror.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testerror.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDAAC5C90E2D55B5001DB1D8 /* testfile.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testfile.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDAAC6260E2D5914001DB1D8 /* testgles.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testgles.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDAAC6290E2D5960001DB1D8 /* testgles.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testgles.c; sourceTree = "<group>"; };
-		FDC430000F0D866D009C87E1 /* torturethread.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = torturethread.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDC430090F0D86BF009C87E1 /* testdraw2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = testdraw2.c; sourceTree = "<group>"; };
-		FDD2C10A0E2E4F4B00B7A85F /* testthread.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testthread.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C1810E2E52C000B7A85F /* testiconv.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testiconv.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C18A0E2E52FE00B7A85F /* utf8.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = utf8.txt; sourceTree = "<group>"; };
-		FDD2C1A50E2E534F00B7A85F /* testjoystick.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testjoystick.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C45E0E2E773800B7A85F /* testkeys.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testkeys.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C47C0E2E77D700B7A85F /* testlock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testlock.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C50B0E2E7F4800B7A85F /* testplatform.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testplatform.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C5290E2E807600B7A85F /* testsem.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testsem.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C54E0E2E80E400B7A85F /* testsprite2.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testsprite2.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C5870E2E8C7400B7A85F /* testtimer.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testtimer.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C5C50E2E8CFC00B7A85F /* testver.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = testver.app; sourceTree = BUILT_PRODUCTS_DIR; };
-		FDD2C6F40E2E959E00B7A85F /* torturethread.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = torturethread.app; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
-		046CEF7A13254F23007AD51D /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494F72555E80E00E92A8B /* libSDL2.a in Frameworks */,
-				F3F758D322AC561A001D97F2 /* libSDL2test.a in Frameworks */,
-				F395C10725644BE900942BFF /* hidapi.framework in Frameworks */,
-				046CEF7C13254F23007AD51D /* AudioToolbox.framework in Frameworks */,
-				FABA34B51D8B5B8400915323 /* AVFoundation.framework in Frameworks */,
-				046CEF8213254F23007AD51D /* CoreAudio.framework in Frameworks */,
-				046CEF7F13254F23007AD51D /* CoreGraphics.framework in Frameworks */,
-				F3A494FD2555E89700E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD1196766C900F8EB7C /* CoreMotion.framework in Frameworks */,
-				046CEF8113254F23007AD51D /* Foundation.framework in Frameworks */,
-				FA684F841BAF1A5C00DCFD1A /* GameController.framework in Frameworks */,
-				F3F758DF22AC5B94001D97F2 /* Metal.framework in Frameworks */,
-				046CEF7E13254F23007AD51D /* OpenGLES.framework in Frameworks */,
-				046CEF7D13254F23007AD51D /* QuartzCore.framework in Frameworks */,
-				046CEF8013254F23007AD51D /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		047A63E113285C3200CD7973 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F395C0C825644AFE00942BFF /* libSDL2.a in Frameworks */,
-				AA1EE470176059D00029C7A5 /* libSDL2test.a in Frameworks */,
-				F395C0C925644B0400942BFF /* hidapi.framework in Frameworks */,
-				047A63E313285C3200CD7973 /* AudioToolbox.framework in Frameworks */,
-				FABA34B01D8B5B6400915323 /* AVFoundation.framework in Frameworks */,
-				047A63E913285C3200CD7973 /* CoreAudio.framework in Frameworks */,
-				047A63E613285C3200CD7973 /* CoreGraphics.framework in Frameworks */,
-				F3A494022555E37A00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BAD1967076F00F8EB7C /* CoreMotion.framework in Frameworks */,
-				047A63E813285C3200CD7973 /* Foundation.framework in Frameworks */,
-				FA684F7B1BAF1A4400DCFD1A /* GameController.framework in Frameworks */,
-				F3F758D422AC575F001D97F2 /* Metal.framework in Frameworks */,
-				047A63E513285C3200CD7973 /* OpenGLES.framework in Frameworks */,
-				047A63E413285C3200CD7973 /* QuartzCore.framework in Frameworks */,
-				047A63E713285C3200CD7973 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		1D60588F0D05DD3D006BFB54 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A4951A2555EADC00E92A8B /* libSDL2.a in Frameworks */,
-				AA1EE47817605BF60029C7A5 /* libSDL2test.a in Frameworks */,
-				F395C11625644C7E00942BFF /* hidapi.framework in Frameworks */,
-				FDA8A89F0E2D111A00EA573E /* AudioToolbox.framework in Frameworks */,
-				FABA34C41D8B5BCB00915323 /* AVFoundation.framework in Frameworks */,
-				FDA8A8A50E2D111A00EA573E /* CoreAudio.framework in Frameworks */,
-				FDA8A8A20E2D111A00EA573E /* CoreGraphics.framework in Frameworks */,
-				F3A4951B2555EAE200E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BE0196766F400F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDA8A8A40E2D111A00EA573E /* Foundation.framework in Frameworks */,
-				FA684F931BAF1A8A00DCFD1A /* GameController.framework in Frameworks */,
-				F3F758EC22AC5DA6001D97F2 /* Metal.framework in Frameworks */,
-				FDA8A8A10E2D111A00EA573E /* OpenGLES.framework in Frameworks */,
-				FDA8A8A00E2D111A00EA573E /* QuartzCore.framework in Frameworks */,
-				FDA8A8A30E2D111A00EA573E /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		56ED0501118A8FE400A56AA6 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A4950A2555EA1D00E92A8B /* libSDL2.a in Frameworks */,
-				F395C10E25644C3200942BFF /* hidapi.framework in Frameworks */,
-				56ED0503118A8FE400A56AA6 /* AudioToolbox.framework in Frameworks */,
-				FABA34BC1D8B5BA600915323 /* AVFoundation.framework in Frameworks */,
-				56ED0509118A8FE400A56AA6 /* CoreAudio.framework in Frameworks */,
-				56ED0506118A8FE400A56AA6 /* CoreGraphics.framework in Frameworks */,
-				F3A4950B2555EA2300E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD8196766DD00F8EB7C /* CoreMotion.framework in Frameworks */,
-				56ED0508118A8FE400A56AA6 /* Foundation.framework in Frameworks */,
-				FA684F8B1BAF1A7100DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E622AC5CC5001D97F2 /* Metal.framework in Frameworks */,
-				56ED0505118A8FE400A56AA6 /* OpenGLES.framework in Frameworks */,
-				56ED0504118A8FE400A56AA6 /* QuartzCore.framework in Frameworks */,
-				56ED0507118A8FE400A56AA6 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AA13B3161FB8AEBC00D9FEE6 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A4951C2555EB0E00E92A8B /* libSDL2.a in Frameworks */,
-				AA13B3181FB8AEBC00D9FEE6 /* libSDL2test.a in Frameworks */,
-				F395C11725644C8800942BFF /* hidapi.framework in Frameworks */,
-				AA13B31C1FB8AEBC00D9FEE6 /* AudioToolbox.framework in Frameworks */,
-				AA13B3171FB8AEBC00D9FEE6 /* AVFoundation.framework in Frameworks */,
-				AA13B3221FB8AEBC00D9FEE6 /* CoreAudio.framework in Frameworks */,
-				AA13B31F1FB8AEBC00D9FEE6 /* CoreGraphics.framework in Frameworks */,
-				F3A4951D2555EB1300E92A8B /* CoreHaptics.framework in Frameworks */,
-				AA13B31B1FB8AEBC00D9FEE6 /* CoreMotion.framework in Frameworks */,
-				AA13B3211FB8AEBC00D9FEE6 /* Foundation.framework in Frameworks */,
-				AA13B31A1FB8AEBC00D9FEE6 /* GameController.framework in Frameworks */,
-				F3F758ED22AC5DC5001D97F2 /* Metal.framework in Frameworks */,
-				AA13B31E1FB8AEBC00D9FEE6 /* OpenGLES.framework in Frameworks */,
-				AA13B31D1FB8AEBC00D9FEE6 /* QuartzCore.framework in Frameworks */,
-				AA13B3201FB8AEBC00D9FEE6 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AAE7DEE014CBB1E100DF1A0E /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A4950E2555EA5E00E92A8B /* libSDL2.a in Frameworks */,
-				AA1EE47617605B9E0029C7A5 /* libSDL2test.a in Frameworks */,
-				F395C11025644C4500942BFF /* hidapi.framework in Frameworks */,
-				AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */,
-				FABA34BE1D8B5BB000915323 /* AVFoundation.framework in Frameworks */,
-				AAE7DEE814CBB1E100DF1A0E /* CoreAudio.framework in Frameworks */,
-				AAE7DEE514CBB1E100DF1A0E /* CoreGraphics.framework in Frameworks */,
-				F3A4950F2555EA6400E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BDA196766E200F8EB7C /* CoreMotion.framework in Frameworks */,
-				AAE7DEE714CBB1E100DF1A0E /* Foundation.framework in Frameworks */,
-				FA684F8D1BAF1A7800DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E722AC5CFE001D97F2 /* Metal.framework in Frameworks */,
-				AAE7DEE414CBB1E100DF1A0E /* OpenGLES.framework in Frameworks */,
-				AAE7DEE314CBB1E100DF1A0E /* QuartzCore.framework in Frameworks */,
-				AAE7DEE614CBB1E100DF1A0E /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AAE7DFA514CBB54E00DF1A0E /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A4950C2555EA3700E92A8B /* libSDL2.a in Frameworks */,
-				AA1EE47517605B930029C7A5 /* libSDL2test.a in Frameworks */,
-				F395C10F25644C3C00942BFF /* hidapi.framework in Frameworks */,
-				AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */,
-				FABA34BD1D8B5BAB00915323 /* AVFoundation.framework in Frameworks */,
-				AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */,
-				AAE7DFAA14CBB54E00DF1A0E /* CoreGraphics.framework in Frameworks */,
-				F3A4950D2555EA3D00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD9196766E000F8EB7C /* CoreMotion.framework in Frameworks */,
-				AAE7DFAC14CBB54E00DF1A0E /* Foundation.framework in Frameworks */,
-				FA684F8C1BAF1A7400DCFD1A /* GameController.framework in Frameworks */,
-				AA2F57AA1FDB544800832AD7 /* Metal.framework in Frameworks */,
-				AAE7DFA914CBB54E00DF1A0E /* OpenGLES.framework in Frameworks */,
-				AAE7DFA814CBB54E00DF1A0E /* QuartzCore.framework in Frameworks */,
-				AAE7DFAB14CBB54E00DF1A0E /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		F395BF892564186400942BFF /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F395BF8A2564186400942BFF /* libSDL2.a in Frameworks */,
-				F395C04F256419A500942BFF /* hidapi.framework in Frameworks */,
-				F395BF8B2564186400942BFF /* AudioToolbox.framework in Frameworks */,
-				F395BF8C2564186400942BFF /* AVFoundation.framework in Frameworks */,
-				F395BF8D2564186400942BFF /* CoreAudio.framework in Frameworks */,
-				F395BF8E2564186400942BFF /* CoreGraphics.framework in Frameworks */,
-				F395BF8F2564186400942BFF /* CoreHaptics.framework in Frameworks */,
-				F395BF902564186400942BFF /* CoreMotion.framework in Frameworks */,
-				F395BF912564186400942BFF /* Foundation.framework in Frameworks */,
-				F395BF922564186400942BFF /* GameController.framework in Frameworks */,
-				F395BF932564186400942BFF /* Metal.framework in Frameworks */,
-				F395BF942564186400942BFF /* OpenGLES.framework in Frameworks */,
-				F395BF952564186400942BFF /* QuartzCore.framework in Frameworks */,
-				F395BF962564186400942BFF /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		F3A499BF255618AF00E92A8B /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A499C0255618AF00E92A8B /* libSDL2.a in Frameworks */,
-				F3A499C1255618AF00E92A8B /* hidapi.framework in Frameworks */,
-				F3A499C2255618AF00E92A8B /* AudioToolbox.framework in Frameworks */,
-				F3A499C3255618AF00E92A8B /* AVFoundation.framework in Frameworks */,
-				F3A499C4255618AF00E92A8B /* CoreAudio.framework in Frameworks */,
-				F3A499C5255618AF00E92A8B /* CoreGraphics.framework in Frameworks */,
-				F3A499C6255618AF00E92A8B /* CoreHaptics.framework in Frameworks */,
-				F3A499C7255618AF00E92A8B /* CoreMotion.framework in Frameworks */,
-				F3A499C8255618AF00E92A8B /* Foundation.framework in Frameworks */,
-				F3A499C9255618AF00E92A8B /* GameController.framework in Frameworks */,
-				F3A499CA255618AF00E92A8B /* Metal.framework in Frameworks */,
-				F3A499CB255618AF00E92A8B /* OpenGLES.framework in Frameworks */,
-				F3A499CC255618AF00E92A8B /* QuartzCore.framework in Frameworks */,
-				F3A499CD255618AF00E92A8B /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FA3D99311BC4E644002C96C8 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494F52555E7F800E92A8B /* libSDL2.a in Frameworks */,
-				F3A498762556005D00E92A8B /* hidapi.framework in Frameworks */,
-				FA3D994A1BC4E6AD002C96C8 /* AudioToolbox.framework in Frameworks */,
-				F3A4953D2555EB8100E92A8B /* AVFoundation.framework in Frameworks */,
-				FA3D99501BC4E6AD002C96C8 /* CoreAudio.framework in Frameworks */,
-				FA3D994D1BC4E6AD002C96C8 /* CoreGraphics.framework in Frameworks */,
-				F3A494F62555E7FE00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA3D994F1BC4E6AD002C96C8 /* Foundation.framework in Frameworks */,
-				FA3D99481BC4E6AD002C96C8 /* GameController.framework in Frameworks */,
-				F3A4955A2555EB9500E92A8B /* Metal.framework in Frameworks */,
-				FA3D994C1BC4E6AD002C96C8 /* OpenGLES.framework in Frameworks */,
-				FA3D994B1BC4E6AD002C96C8 /* QuartzCore.framework in Frameworks */,
-				FA3D994E1BC4E6AD002C96C8 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FABA34821D8B575200915323 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A4941F2555E39600E92A8B /* libSDL2.a in Frameworks */,
-				F395C0E725644B6200942BFF /* hidapi.framework in Frameworks */,
-				FABA34871D8B575200915323 /* AudioToolbox.framework in Frameworks */,
-				FABA34831D8B575200915323 /* AVFoundation.framework in Frameworks */,
-				FABA348D1D8B575200915323 /* CoreAudio.framework in Frameworks */,
-				FABA348A1D8B575200915323 /* CoreGraphics.framework in Frameworks */,
-				F3A494202555E39E00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FABA34861D8B575200915323 /* CoreMotion.framework in Frameworks */,
-				FABA348C1D8B575200915323 /* Foundation.framework in Frameworks */,
-				FABA34851D8B575200915323 /* GameController.framework in Frameworks */,
-				F3F758D522AC57D8001D97F2 /* Metal.framework in Frameworks */,
-				FABA34891D8B575200915323 /* OpenGLES.framework in Frameworks */,
-				FABA34881D8B575200915323 /* QuartzCore.framework in Frameworks */,
-				FABA348B1D8B575200915323 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FABA349B1D8B582100915323 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494232555E3C900E92A8B /* libSDL2.a in Frameworks */,
-				F395C0E625644B5200942BFF /* hidapi.framework in Frameworks */,
-				FABA34A01D8B582100915323 /* AudioToolbox.framework in Frameworks */,
-				FABA349C1D8B582100915323 /* AVFoundation.framework in Frameworks */,
-				FABA34A61D8B582100915323 /* CoreAudio.framework in Frameworks */,
-				FABA34A31D8B582100915323 /* CoreGraphics.framework in Frameworks */,
-				F3A494252555E3D100E92A8B /* CoreHaptics.framework in Frameworks */,
-				FABA34A51D8B582100915323 /* Foundation.framework in Frameworks */,
-				FABA349E1D8B582100915323 /* GameController.framework in Frameworks */,
-				F3A494692555E42B00E92A8B /* Metal.framework in Frameworks */,
-				FABA34A21D8B582100915323 /* OpenGLES.framework in Frameworks */,
-				FABA34A11D8B582100915323 /* QuartzCore.framework in Frameworks */,
-				FABA34A41D8B582100915323 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FAE0E9851BAF9B230098DFA4 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A4938E2555E2D500E92A8B /* libSDL2.a in Frameworks */,
-				F3A498732556005300E92A8B /* hidapi.framework in Frameworks */,
-				FAE0E9891BAF9B230098DFA4 /* AudioToolbox.framework in Frameworks */,
-				FABA34AE1D8B58B200915323 /* AVFoundation.framework in Frameworks */,
-				FAE0E98F1BAF9B230098DFA4 /* CoreAudio.framework in Frameworks */,
-				FAE0E98C1BAF9B230098DFA4 /* CoreGraphics.framework in Frameworks */,
-				F3A493AC2555E30000E92A8B /* CoreHaptics.framework in Frameworks */,
-				FAE0E9881BAF9B230098DFA4 /* CoreMotion.framework in Frameworks */,
-				FAE0E98E1BAF9B230098DFA4 /* Foundation.framework in Frameworks */,
-				FAE0E9871BAF9B230098DFA4 /* GameController.framework in Frameworks */,
-				F3F758DD22AC5A6C001D97F2 /* Metal.framework in Frameworks */,
-				FAE0E98B1BAF9B230098DFA4 /* OpenGLES.framework in Frameworks */,
-				FAE0E98A1BAF9B230098DFA4 /* QuartzCore.framework in Frameworks */,
-				FAE0E98D1BAF9B230098DFA4 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDA8AAAE0E2D330F00EA573E /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494212555E3AE00E92A8B /* libSDL2.a in Frameworks */,
-				F395C0E525644B3900942BFF /* hidapi.framework in Frameworks */,
-				FDA8AAB10E2D330F00EA573E /* AudioToolbox.framework in Frameworks */,
-				FABA34771D8B4EAD00915323 /* AVFoundation.framework in Frameworks */,
-				FDA8AAB70E2D330F00EA573E /* CoreAudio.framework in Frameworks */,
-				FDA8AAB40E2D330F00EA573E /* CoreGraphics.framework in Frameworks */,
-				F3A494222555E3B700E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BC9196766BC00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDA8AAB60E2D330F00EA573E /* Foundation.framework in Frameworks */,
-				FA684F7F1BAF1A4D00DCFD1A /* GameController.framework in Frameworks */,
-				F3F758D622AC5811001D97F2 /* Metal.framework in Frameworks */,
-				FDA8AAB30E2D330F00EA573E /* OpenGLES.framework in Frameworks */,
-				FDA8AAB20E2D330F00EA573E /* QuartzCore.framework in Frameworks */,
-				FDA8AAB50E2D330F00EA573E /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC3C00E2D47E6001DB1D8 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494D12555E75200E92A8B /* libSDL2.a in Frameworks */,
-				F395C0E825644B6D00942BFF /* hidapi.framework in Frameworks */,
-				FDAAC3C30E2D47E6001DB1D8 /* AudioToolbox.framework in Frameworks */,
-				FABA34B11D8B5B6C00915323 /* AVFoundation.framework in Frameworks */,
-				FDAAC3C90E2D47E6001DB1D8 /* CoreAudio.framework in Frameworks */,
-				FDAAC3C60E2D47E6001DB1D8 /* CoreGraphics.framework in Frameworks */,
-				F3A494D22555E75B00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BCD196766BF00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDAAC3C80E2D47E6001DB1D8 /* Foundation.framework in Frameworks */,
-				FA684F801BAF1A5000DCFD1A /* GameController.framework in Frameworks */,
-				F3F758DA22AC59A5001D97F2 /* Metal.framework in Frameworks */,
-				FDAAC3C50E2D47E6001DB1D8 /* OpenGLES.framework in Frameworks */,
-				FDAAC3C40E2D47E6001DB1D8 /* QuartzCore.framework in Frameworks */,
-				FDAAC3C70E2D47E6001DB1D8 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC58E0E2D5429001DB1D8 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494F12555E7B300E92A8B /* libSDL2.a in Frameworks */,
-				F395C0EA25644B8100942BFF /* hidapi.framework in Frameworks */,
-				FDAAC5910E2D5429001DB1D8 /* AudioToolbox.framework in Frameworks */,
-				FABA34B31D8B5B7800915323 /* AVFoundation.framework in Frameworks */,
-				FDAAC5970E2D5429001DB1D8 /* CoreAudio.framework in Frameworks */,
-				FDAAC5940E2D5429001DB1D8 /* CoreGraphics.framework in Frameworks */,
-				F3A494F22555E7B900E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BCF196766C400F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDAAC5960E2D5429001DB1D8 /* Foundation.framework in Frameworks */,
-				FA684F821BAF1A5700DCFD1A /* GameController.framework in Frameworks */,
-				F3F758DB22AC5A1B001D97F2 /* Metal.framework in Frameworks */,
-				FDAAC5930E2D5429001DB1D8 /* OpenGLES.framework in Frameworks */,
-				FDAAC5920E2D5429001DB1D8 /* QuartzCore.framework in Frameworks */,
-				FDAAC5950E2D5429001DB1D8 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC5BC0E2D55B5001DB1D8 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494F32555E7D000E92A8B /* libSDL2.a in Frameworks */,
-				F395C10625644BDC00942BFF /* hidapi.framework in Frameworks */,
-				FDAAC5BF0E2D55B5001DB1D8 /* AudioToolbox.framework in Frameworks */,
-				FABA34B41D8B5B7C00915323 /* AVFoundation.framework in Frameworks */,
-				FDAAC5C50E2D55B5001DB1D8 /* CoreAudio.framework in Frameworks */,
-				FDAAC5C20E2D55B5001DB1D8 /* CoreGraphics.framework in Frameworks */,
-				F3A494F42555E7D800E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD0196766C600F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDAAC5C40E2D55B5001DB1D8 /* Foundation.framework in Frameworks */,
-				FA684F831BAF1A5A00DCFD1A /* GameController.framework in Frameworks */,
-				F3F758DC22AC5A46001D97F2 /* Metal.framework in Frameworks */,
-				FDAAC5C10E2D55B5001DB1D8 /* OpenGLES.framework in Frameworks */,
-				FDAAC5C00E2D55B5001DB1D8 /* QuartzCore.framework in Frameworks */,
-				FDAAC5C30E2D55B5001DB1D8 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC6190E2D5914001DB1D8 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494FE2555E8AA00E92A8B /* libSDL2.a in Frameworks */,
-				AA1EE47417605B5C0029C7A5 /* libSDL2test.a in Frameworks */,
-				F395C10825644BF600942BFF /* hidapi.framework in Frameworks */,
-				FDAAC61C0E2D5914001DB1D8 /* AudioToolbox.framework in Frameworks */,
-				FABA34B61D8B5B8900915323 /* AVFoundation.framework in Frameworks */,
-				FDAAC6220E2D5914001DB1D8 /* CoreAudio.framework in Frameworks */,
-				F3A494FF2555E8B300E92A8B /* CoreHaptics.framework in Frameworks */,
-				FDAAC61F0E2D5914001DB1D8 /* CoreGraphics.framework in Frameworks */,
-				FA8B4BD2196766CB00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDAAC6210E2D5914001DB1D8 /* Foundation.framework in Frameworks */,
-				FA684F851BAF1A6000DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E022AC5BB6001D97F2 /* Metal.framework in Frameworks */,
-				FDAAC61E0E2D5914001DB1D8 /* OpenGLES.framework in Frameworks */,
-				FDAAC61D0E2D5914001DB1D8 /* QuartzCore.framework in Frameworks */,
-				FDAAC6200E2D5914001DB1D8 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDC42FF30F0D866D009C87E1 /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A494D32555E76E00E92A8B /* libSDL2.a in Frameworks */,
-				AA1EE47117605A7F0029C7A5 /* libSDL2test.a in Frameworks */,
-				F395C0E925644B7700942BFF /* hidapi.framework in Frameworks */,
-				FDC42FF60F0D866D009C87E1 /* AudioToolbox.framework in Frameworks */,
-				FABA34B21D8B5B7300915323 /* AVFoundation.framework in Frameworks */,
-				FDC42FFC0F0D866D009C87E1 /* CoreAudio.framework in Frameworks */,
-				FDC42FF90F0D866D009C87E1 /* CoreGraphics.framework in Frameworks */,
-				F3A494D42555E77400E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BCE196766C100F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDC42FFB0F0D866D009C87E1 /* Foundation.framework in Frameworks */,
-				FA684F811BAF1A5300DCFD1A /* GameController.framework in Frameworks */,
-				AA2F57AB1FDB5A0900832AD7 /* Metal.framework in Frameworks */,
-				FDC42FF80F0D866D009C87E1 /* OpenGLES.framework in Frameworks */,
-				FDC42FF70F0D866D009C87E1 /* QuartzCore.framework in Frameworks */,
-				FDC42FFA0F0D866D009C87E1 /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C0FD0E2E4F4B00B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495142555EA9B00E92A8B /* libSDL2.a in Frameworks */,
-				F395C11325644C6300942BFF /* hidapi.framework in Frameworks */,
-				FDD2C1000E2E4F4B00B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34C11D8B5BBE00915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C1060E2E4F4B00B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C1030E2E4F4B00B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495152555EAA100E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BDD196766EB00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C1050E2E4F4B00B7A85F /* Foundation.framework in Frameworks */,
-				FA684F901BAF1A8100DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E922AC5D51001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C1020E2E4F4B00B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C1010E2E4F4B00B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C1040E2E4F4B00B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C1740E2E52C000B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495002555E8C000E92A8B /* libSDL2.a in Frameworks */,
-				F395C10925644BFF00942BFF /* hidapi.framework in Frameworks */,
-				FDD2C1770E2E52C000B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34B71D8B5B8D00915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C17D0E2E52C000B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C17A0E2E52C000B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495012555E8D200E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD3196766CE00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C17C0E2E52C000B7A85F /* Foundation.framework in Frameworks */,
-				FA684F861BAF1A6200DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E122AC5BE9001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C1790E2E52C000B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C1780E2E52C000B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C17B0E2E52C000B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C1980E2E534F00B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495022555E9BF00E92A8B /* libSDL2.a in Frameworks */,
-				F395C10A25644C0A00942BFF /* hidapi.framework in Frameworks */,
-				FDD2C19B0E2E534F00B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34B81D8B5B9200915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C1A10E2E534F00B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C19E0E2E534F00B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495032555E9C600E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD4196766D100F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C1A00E2E534F00B7A85F /* Foundation.framework in Frameworks */,
-				FA684F871BAF1A6500DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E222AC5C12001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C19D0E2E534F00B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C19C0E2E534F00B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C19F0E2E534F00B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C4510E2E773800B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495042555E9D900E92A8B /* libSDL2.a in Frameworks */,
-				F395C10B25644C1700942BFF /* hidapi.framework in Frameworks */,
-				FDD2C4540E2E773800B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34B91D8B5B9600915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C45A0E2E773800B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C4570E2E773800B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495052555E9E000E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD5196766D400F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C4590E2E773800B7A85F /* Foundation.framework in Frameworks */,
-				FA684F881BAF1A6800DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E322AC5C34001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C4560E2E773800B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C4550E2E773800B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C4580E2E773800B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C46F0E2E77D700B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495062555E9F100E92A8B /* libSDL2.a in Frameworks */,
-				F395C10C25644C2100942BFF /* hidapi.framework in Frameworks */,
-				FDD2C4720E2E77D700B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34BA1D8B5B9B00915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C4780E2E77D700B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C4750E2E77D700B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495072555E9F700E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD6196766D700F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C4770E2E77D700B7A85F /* Foundation.framework in Frameworks */,
-				FA684F891BAF1A6A00DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E422AC5C83001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C4740E2E77D700B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C4730E2E77D700B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C4760E2E77D700B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C4FE0E2E7F4800B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495082555EA0300E92A8B /* libSDL2.a in Frameworks */,
-				F395C10D25644C2900942BFF /* hidapi.framework in Frameworks */,
-				FDD2C5010E2E7F4800B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34BB1D8B5BA100915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C5070E2E7F4800B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C5040E2E7F4800B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495092555EA1200E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BD7196766DA00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C5060E2E7F4800B7A85F /* Foundation.framework in Frameworks */,
-				FA684F8A1BAF1A6D00DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E522AC5CA5001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C5030E2E7F4800B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C5020E2E7F4800B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C5050E2E7F4800B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C51C0E2E807600B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495102555EA7600E92A8B /* libSDL2.a in Frameworks */,
-				F395C11125644C4E00942BFF /* hidapi.framework in Frameworks */,
-				FDD2C51F0E2E807600B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34BF1D8B5BB500915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C5250E2E807600B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C5220E2E807600B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495112555EA7B00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BDB196766E500F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C5240E2E807600B7A85F /* Foundation.framework in Frameworks */,
-				FA684F8E1BAF1A7B00DCFD1A /* GameController.framework in Frameworks */,
-				F3F758E822AC5D1B001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C5210E2E807600B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C5200E2E807600B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C5230E2E807600B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C5410E2E80E400B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495122555EA8700E92A8B /* libSDL2.a in Frameworks */,
-				AA1EE47717605BAB0029C7A5 /* libSDL2test.a in Frameworks */,
-				F395C11225644C5900942BFF /* hidapi.framework in Frameworks */,
-				FDD2C5440E2E80E400B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34C01D8B5BBA00915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C54A0E2E80E400B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C5470E2E80E400B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495132555EA8C00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BDC196766E800F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C5490E2E80E400B7A85F /* Foundation.framework in Frameworks */,
-				FA684F8F1BAF1A7E00DCFD1A /* GameController.framework in Frameworks */,
-				AA2F57AC1FDB5AB600832AD7 /* Metal.framework in Frameworks */,
-				FDD2C5460E2E80E400B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C5450E2E80E400B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C5480E2E80E400B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C57A0E2E8C7400B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495162555EAB000E92A8B /* libSDL2.a in Frameworks */,
-				F395C11425644C6D00942BFF /* hidapi.framework in Frameworks */,
-				FDD2C57D0E2E8C7400B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34C21D8B5BC200915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C5830E2E8C7400B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C5800E2E8C7400B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495172555EABB00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BDE196766EE00F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C5820E2E8C7400B7A85F /* Foundation.framework in Frameworks */,
-				FA684F911BAF1A8400DCFD1A /* GameController.framework in Frameworks */,
-				F3F758EA22AC5D6B001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C57F0E2E8C7400B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C57E0E2E8C7400B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C5810E2E8C7400B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C5B80E2E8CFC00B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A495182555EAC500E92A8B /* libSDL2.a in Frameworks */,
-				F395C11525644C7600942BFF /* hidapi.framework in Frameworks */,
-				FDD2C5BB0E2E8CFC00B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34C31D8B5BC600915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C5C10E2E8CFC00B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C5BE0E2E8CFC00B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A495192555EACB00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BDF196766F100F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C5C00E2E8CFC00B7A85F /* Foundation.framework in Frameworks */,
-				FA684F921BAF1A8700DCFD1A /* GameController.framework in Frameworks */,
-				F3F758EB22AC5D8B001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C5BD0E2E8CFC00B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C5BC0E2E8CFC00B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C5BF0E2E8CFC00B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C6E70E2E959E00B7A85F /* Frameworks */ = {
-			isa = PBXFrameworksBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A4951E2555EB2600E92A8B /* libSDL2.a in Frameworks */,
-				F395C11825644C9100942BFF /* hidapi.framework in Frameworks */,
-				FDD2C6EA0E2E959E00B7A85F /* AudioToolbox.framework in Frameworks */,
-				FABA34C51D8B5BD000915323 /* AVFoundation.framework in Frameworks */,
-				FDD2C6F00E2E959E00B7A85F /* CoreAudio.framework in Frameworks */,
-				FDD2C6ED0E2E959E00B7A85F /* CoreGraphics.framework in Frameworks */,
-				F3A4951F2555EB2D00E92A8B /* CoreHaptics.framework in Frameworks */,
-				FA8B4BE1196766F600F8EB7C /* CoreMotion.framework in Frameworks */,
-				FDD2C6EF0E2E959E00B7A85F /* Foundation.framework in Frameworks */,
-				FA684F941BAF1A9400DCFD1A /* GameController.framework in Frameworks */,
-				F3F758EE22AC5DE1001D97F2 /* Metal.framework in Frameworks */,
-				FDD2C6EC0E2E959E00B7A85F /* OpenGLES.framework in Frameworks */,
-				FDD2C6EB0E2E959E00B7A85F /* QuartzCore.framework in Frameworks */,
-				FDD2C6EE0E2E959E00B7A85F /* UIKit.framework in Frameworks */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
-		19C28FACFE9D520D11CA2CBB /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				1D6058910D05DD3D006BFB54 /* testwm2.app */,
-				FDA8AABB0E2D330F00EA573E /* loopwav.app */,
-				FDAAC3CD0E2D47E6001DB1D8 /* testaudioinfo.app */,
-				FDAAC59B0E2D5429001DB1D8 /* testerror.app */,
-				FDAAC5C90E2D55B5001DB1D8 /* testfile.app */,
-				FDAAC6260E2D5914001DB1D8 /* testgles.app */,
-				FDD2C10A0E2E4F4B00B7A85F /* testthread.app */,
-				FDD2C1810E2E52C000B7A85F /* testiconv.app */,
-				FDD2C1A50E2E534F00B7A85F /* testjoystick.app */,
-				FDD2C45E0E2E773800B7A85F /* testkeys.app */,
-				FDD2C47C0E2E77D700B7A85F /* testlock.app */,
-				FDD2C50B0E2E7F4800B7A85F /* testplatform.app */,
-				FDD2C5290E2E807600B7A85F /* testsem.app */,
-				FDD2C54E0E2E80E400B7A85F /* testsprite2.app */,
-				FDD2C5870E2E8C7400B7A85F /* testtimer.app */,
-				FDD2C5C50E2E8CFC00B7A85F /* testver.app */,
-				FDD2C6F40E2E959E00B7A85F /* torturethread.app */,
-				FDC430000F0D866D009C87E1 /* torturethread.app */,
-				56ED050D118A8FE400A56AA6 /* testpower.app */,
-				046CEF8613254F23007AD51D /* testgesture.app */,
-				047A63ED13285C3200CD7973 /* checkkeys.app */,
-				AAE7DEEC14CBB1E100DF1A0E /* testscale.app */,
-				AAE7DFB114CBB54E00DF1A0E /* testrendertarget.app */,
-				FAE0E9931BAF9B230098DFA4 /* testgamecontroller.app */,
-				FA3D99341BC4E644002C96C8 /* testgamecontroller-TV.app */,
-				FABA34911D8B575200915323 /* testaudiocapture.app */,
-				FABA34AA1D8B582100915323 /* loopwav-TV.app */,
-				AA13B3261FB8AEBC00D9FEE6 /* testyuv.app */,
-				F3A499D3255618AF00E92A8B /* controllermap.app */,
-				F395BF9A2564186400942BFF /* testsensor.app */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		29B97314FDCFA39411CA2CEA /* CustomTemplate */ = {
-			isa = PBXGroup;
-			children = (
-				F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */,
-				AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */,
-				FDA8AAD60E2D339A00EA573E /* Resources */,
-				FDA8A7C30E2D10FA00EA573E /* Frameworks */,
-				FDA8A73B0E2D0F0400EA573E /* src */,
-				19C28FACFE9D520D11CA2CBB /* Products */,
-				FABA34751D8B4EAC00915323 /* Frameworks */,
-				F3A499D4255618AF00E92A8B /* testgamecontroller copy-Info.plist */,
-				F395BF9B2564186400942BFF /* testpower copy-Info.plist */,
-			);
-			name = CustomTemplate;
-			sourceTree = "<group>";
-		};
-		AA1EE44E176059220029C7A5 /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				AA1EE452176059230029C7A5 /* libSDL2test.a */,
-				FA3D992F1BC4E619002C96C8 /* libSDL2test-TV.a */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		F3A492CD2555E1F100E92A8B /* Products */ = {
-			isa = PBXGroup;
-			children = (
-				F3A492DD2555E1F100E92A8B /* SDL2.framework */,
-				F3A492DF2555E1F100E92A8B /* SDL2.framework */,
-				F3A492E12555E1F100E92A8B /* SDL2.framework */,
-				F3A492E32555E1F100E92A8B /* libSDL2.a */,
-				F3A492E52555E1F100E92A8B /* libSDL2.a */,
-				F3A492E72555E1F100E92A8B /* libSDL2.a */,
-				F3A492E92555E1F100E92A8B /* libSDL2.dylib */,
-				F3A492EB2555E1F100E92A8B /* libSDL2.dylib */,
-				F3A492ED2555E1F100E92A8B /* libSDL2.dylib */,
-				F3A492EF2555E1F100E92A8B /* SDL2 */,
-				F3A492F12555E1F100E92A8B /* hidapi.framework */,
-				F3A492F32555E1F100E92A8B /* hidapi.framework */,
-				F3A492F52555E1F100E92A8B /* hidapi.framework */,
-			);
-			name = Products;
-			sourceTree = "<group>";
-		};
-		FABA34751D8B4EAC00915323 /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				AA2F57A91FDB544800832AD7 /* Metal.framework */,
-				FABA34761D8B4EAD00915323 /* AVFoundation.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		FDA8A73B0E2D0F0400EA573E /* src */ = {
-			isa = PBXGroup;
-			children = (
-				047A63F013285CD100CD7973 /* checkkeys.c */,
-				F3A49A4C255618DD00E92A8B /* controllermap.c */,
-				FDA8A78B0E2D0F3D00EA573E /* loopwave.c */,
-				FABA34931D8B578200915323 /* testaudiocapture.c */,
-				FDA8A7410E2D0F1600EA573E /* testaudioinfo.c */,
-				FDC430090F0D86BF009C87E1 /* testdraw2.c */,
-				FDA8A7470E2D0F1600EA573E /* testerror.c */,
-				FDA8A7480E2D0F1600EA573E /* testfile.c */,
-				FA0EF2221BAF43DE000E07A6 /* testgamecontroller.c */,
-				046CEF8913254F63007AD51D /* testgesture.c */,
-				FDAAC6290E2D5960001DB1D8 /* testgles.c */,
-				FDA8A74D0E2D0F1600EA573E /* testiconv.c */,
-				FDA8A74E0E2D0F1600EA573E /* testjoystick.c */,
-				FDA8A74F0E2D0F1600EA573E /* testkeys.c */,
-				FDA8A7510E2D0F1600EA573E /* testlock.c */,
-				FDA8A7540E2D0F1600EA573E /* testoverlay2.c */,
-				FDA8A7560E2D0F1600EA573E /* testplatform.c */,
-				56ED0510118A904200A56AA6 /* testpower.c */,
-				AAE7DFB414CBB5F700DF1A0E /* testrendertarget.c */,
-				AAE7DF4514CBB43900DF1A0E /* testscale.c */,
-				FDA8A7570E2D0F1600EA573E /* testsem.c */,
-				F395BFE1256418A600942BFF /* testsensor.c */,
-				FDA8A7590E2D0F1600EA573E /* testsprite2.c */,
-				FDA8A74C0E2D0F1600EA573E /* testthread.c */,
-				FDA8A75A0E2D0F1600EA573E /* testtimer.c */,
-				FDA8A75B0E2D0F1600EA573E /* testver.c */,
-				FDA8A75F0E2D0F1600EA573E /* testwm2.c */,
-				AA13B35E1FB8B50D00D9FEE6 /* testyuv_cvt.c */,
-				AA13B35B1FB8B4D600D9FEE6 /* testyuv.c */,
-				FDA8A7610E2D0F1600EA573E /* torturethread.c */,
-			);
-			name = src;
-			path = ../../test;
-			sourceTree = "<group>";
-		};
-		FDA8A7C30E2D10FA00EA573E /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				F3A4953C2555EB8100E92A8B /* AVFoundation.framework */,
-				F3A494F82555E83D00E92A8B /* CoreBluetooth.framework */,
-				F3A494682555E42B00E92A8B /* Metal.framework */,
-				F3A493AB2555E30000E92A8B /* CoreHaptics.framework */,
-				F3A494242555E3D100E92A8B /* CoreHaptics.framework */,
-				75E09187241EACB9004729E1 /* CoreBluetooth.framework */,
-				FA684F7A1BAF1A4400DCFD1A /* GameController.framework */,
-				FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */,
-				FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */,
-				FDA8A8990E2D111A00EA573E /* QuartzCore.framework */,
-				FDA8A89A0E2D111A00EA573E /* OpenGLES.framework */,
-				FDA8A89B0E2D111A00EA573E /* CoreGraphics.framework */,
-				FDA8A89C0E2D111A00EA573E /* UIKit.framework */,
-				FDA8A89D0E2D111A00EA573E /* Foundation.framework */,
-				FDA8A89E0E2D111A00EA573E /* CoreAudio.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
-		FDA8AAD60E2D339A00EA573E /* Resources */ = {
-			isa = PBXGroup;
-			children = (
-				FA0EF2281BAF4487000E07A6 /* axis.bmp */,
-				FA0EF2291BAF4487000E07A6 /* button.bmp */,
-				FA0EF22A1BAF4487000E07A6 /* controllermap.bmp */,
-				F3A49AFD2556A47500E92A8B /* controllermap_back.bmp */,
-				FDA8AAD90E2D33B000EA573E /* icon.bmp */,
-				FDA8AADA0E2D33BA00EA573E /* moose.dat */,
-				FDA8AADB0E2D33BA00EA573E /* picture.xbm */,
-				FDA8AADE0E2D33C100EA573E /* sample.bmp */,
-				FDA8AAE20E2D33C600EA573E /* sample.wav */,
-				AA13B32E1FB8AF0C00D9FEE6 /* testyuv.bmp */,
-				FDD2C18A0E2E52FE00B7A85F /* utf8.txt */,
-			);
-			name = Resources;
-			path = ../../test;
-			sourceTree = "<group>";
-		};
-/* End PBXGroup section */
-
-/* Begin PBXNativeTarget section */
-		046CEF7513254F23007AD51D /* testgesture */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 046CEF8313254F23007AD51D /* Build configuration list for PBXNativeTarget "testgesture" */;
-			buildPhases = (
-				046CEF7613254F23007AD51D /* Resources */,
-				046CEF7813254F23007AD51D /* Sources */,
-				046CEF7A13254F23007AD51D /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testgesture;
-			productName = Test;
-			productReference = 046CEF8613254F23007AD51D /* testgesture.app */;
-			productType = "com.apple.product-type.application";
-		};
-		047A63DD13285C3200CD7973 /* checkkeys */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 047A63EA13285C3200CD7973 /* Build configuration list for PBXNativeTarget "checkkeys" */;
-			buildPhases = (
-				047A63DE13285C3200CD7973 /* Resources */,
-				047A63DF13285C3200CD7973 /* Sources */,
-				047A63E113285C3200CD7973 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = checkkeys;
-			productName = Test;
-			productReference = 047A63ED13285C3200CD7973 /* checkkeys.app */;
-			productType = "com.apple.product-type.application";
-		};
-		1D6058900D05DD3D006BFB54 /* testwm2 */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "testwm2" */;
-			buildPhases = (
-				1D60588D0D05DD3D006BFB54 /* Resources */,
-				1D60588E0D05DD3D006BFB54 /* Sources */,
-				1D60588F0D05DD3D006BFB54 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testwm2;
-			productName = Test;
-			productReference = 1D6058910D05DD3D006BFB54 /* testwm2.app */;
-			productType = "com.apple.product-type.application";
-		};
-		56ED04FC118A8FE400A56AA6 /* testpower */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = 56ED050A118A8FE400A56AA6 /* Build configuration list for PBXNativeTarget "testpower" */;
-			buildPhases = (
-				56ED04FD118A8FE400A56AA6 /* Resources */,
-				56ED04FF118A8FE400A56AA6 /* Sources */,
-				56ED0501118A8FE400A56AA6 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testpower;
-			productName = Test;
-			productReference = 56ED050D118A8FE400A56AA6 /* testpower.app */;
-			productType = "com.apple.product-type.application";
-		};
-		AA13B3111FB8AEBC00D9FEE6 /* testyuv */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = AA13B3231FB8AEBC00D9FEE6 /* Build configuration list for PBXNativeTarget "testyuv" */;
-			buildPhases = (
-				AA13B3121FB8AEBC00D9FEE6 /* Resources */,
-				AA13B3141FB8AEBC00D9FEE6 /* Sources */,
-				AA13B3161FB8AEBC00D9FEE6 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testyuv;
-			productName = Test;
-			productReference = AA13B3261FB8AEBC00D9FEE6 /* testyuv.app */;
-			productType = "com.apple.product-type.application";
-		};
-		AAE7DEDA14CBB1E100DF1A0E /* testscale */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = AAE7DEE914CBB1E100DF1A0E /* Build configuration list for PBXNativeTarget "testscale" */;
-			buildPhases = (
-				AAE7DEDB14CBB1E100DF1A0E /* Resources */,
-				AAE7DEDD14CBB1E100DF1A0E /* Sources */,
-				AAE7DEE014CBB1E100DF1A0E /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testscale;
-			productName = Test;
-			productReference = AAE7DEEC14CBB1E100DF1A0E /* testscale.app */;
-			productType = "com.apple.product-type.application";
-		};
-		AAE7DF9E14CBB54E00DF1A0E /* testrendertarget */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = AAE7DFAE14CBB54E00DF1A0E /* Build configuration list for PBXNativeTarget "testrendertarget" */;
-			buildPhases = (
-				AAE7DF9F14CBB54E00DF1A0E /* Resources */,
-				AAE7DFA214CBB54E00DF1A0E /* Sources */,
-				AAE7DFA514CBB54E00DF1A0E /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testrendertarget;
-			productName = Test;
-			productReference = AAE7DFB114CBB54E00DF1A0E /* testrendertarget.app */;
-			productType = "com.apple.product-type.application";
-		};
-		F395BF842564186400942BFF /* testsensor */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = F395BF972564186400942BFF /* Build configuration list for PBXNativeTarget "testsensor" */;
-			buildPhases = (
-				F395BF852564186400942BFF /* Resources */,
-				F395BF872564186400942BFF /* Sources */,
-				F395BF892564186400942BFF /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testsensor;
-			productName = Test;
-			productReference = F395BF9A2564186400942BFF /* testsensor.app */;
-			productType = "com.apple.product-type.application";
-		};
-		F3A499B7255618AF00E92A8B /* controllermap */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = F3A499D0255618AF00E92A8B /* Build configuration list for PBXNativeTarget "controllermap" */;
-			buildPhases = (
-				F3A499B8255618AF00E92A8B /* Resources */,
-				F3A499BD255618AF00E92A8B /* Sources */,
-				F3A499BF255618AF00E92A8B /* Frameworks */,
-				F3A499CE255618AF00E92A8B /* Embed Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = controllermap;
-			productName = Test;
-			productReference = F3A499D3255618AF00E92A8B /* controllermap.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FA3D99331BC4E644002C96C8 /* testgamecontroller-TV */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FA3D99451BC4E645002C96C8 /* Build configuration list for PBXNativeTarget "testgamecontroller-TV" */;
-			buildPhases = (
-				FA3D99301BC4E644002C96C8 /* Sources */,
-				FA3D99311BC4E644002C96C8 /* Frameworks */,
-				FA3D99321BC4E644002C96C8 /* Resources */,
-				F3A498782556005D00E92A8B /* Embed Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "testgamecontroller-TV";
-			productName = "testgamecontroller-TV";
-			productReference = FA3D99341BC4E644002C96C8 /* testgamecontroller-TV.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FABA347D1D8B575200915323 /* testaudiocapture */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FABA348E1D8B575200915323 /* Build configuration list for PBXNativeTarget "testaudiocapture" */;
-			buildPhases = (
-				FABA347E1D8B575200915323 /* Resources */,
-				FABA34801D8B575200915323 /* Sources */,
-				FABA34821D8B575200915323 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testaudiocapture;
-			productName = Test;
-			productReference = FABA34911D8B575200915323 /* testaudiocapture.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FABA34961D8B582100915323 /* loopwav-TV */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FABA34A71D8B582100915323 /* Build configuration list for PBXNativeTarget "loopwav-TV" */;
-			buildPhases = (
-				FABA34971D8B582100915323 /* Resources */,
-				FABA34991D8B582100915323 /* Sources */,
-				FABA349B1D8B582100915323 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = "loopwav-TV";
-			productName = Test;
-			productReference = FABA34AA1D8B582100915323 /* loopwav-TV.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FAE0E9801BAF9B230098DFA4 /* testgamecontroller */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FAE0E9901BAF9B230098DFA4 /* Build configuration list for PBXNativeTarget "testgamecontroller" */;
-			buildPhases = (
-				FAE0E9811BAF9B230098DFA4 /* Resources */,
-				FAE0E9831BAF9B230098DFA4 /* Sources */,
-				FAE0E9851BAF9B230098DFA4 /* Frameworks */,
-				F3A498752556005300E92A8B /* Embed Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testgamecontroller;
-			productName = Test;
-			productReference = FAE0E9931BAF9B230098DFA4 /* testgamecontroller.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDA8AAAA0E2D330F00EA573E /* loopwav */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDA8AAB80E2D330F00EA573E /* Build configuration list for PBXNativeTarget "loopwav" */;
-			buildPhases = (
-				FDA8AAAB0E2D330F00EA573E /* Resources */,
-				FDA8AAAC0E2D330F00EA573E /* Sources */,
-				FDA8AAAE0E2D330F00EA573E /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = loopwav;
-			productName = Test;
-			productReference = FDA8AABB0E2D330F00EA573E /* loopwav.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDAAC3BB0E2D47E6001DB1D8 /* testaudioinfo */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDAAC3CA0E2D47E6001DB1D8 /* Build configuration list for PBXNativeTarget "testaudioinfo" */;
-			buildPhases = (
-				FDAAC3BC0E2D47E6001DB1D8 /* Resources */,
-				FDAAC3BE0E2D47E6001DB1D8 /* Sources */,
-				FDAAC3C00E2D47E6001DB1D8 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testaudioinfo;
-			productName = Test;
-			productReference = FDAAC3CD0E2D47E6001DB1D8 /* testaudioinfo.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDAAC58A0E2D5429001DB1D8 /* testerror */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDAAC5980E2D5429001DB1D8 /* Build configuration list for PBXNativeTarget "testerror" */;
-			buildPhases = (
-				FDAAC58B0E2D5429001DB1D8 /* Resources */,
-				FDAAC58C0E2D5429001DB1D8 /* Sources */,
-				FDAAC58E0E2D5429001DB1D8 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testerror;
-			productName = Test;
-			productReference = FDAAC59B0E2D5429001DB1D8 /* testerror.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDAAC5B80E2D55B5001DB1D8 /* testfile */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDAAC5C60E2D55B5001DB1D8 /* Build configuration list for PBXNativeTarget "testfile" */;
-			buildPhases = (
-				FDAAC5B90E2D55B5001DB1D8 /* Resources */,
-				FDAAC5BA0E2D55B5001DB1D8 /* Sources */,
-				FDAAC5BC0E2D55B5001DB1D8 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testfile;
-			productName = Test;
-			productReference = FDAAC5C90E2D55B5001DB1D8 /* testfile.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDAAC6150E2D5914001DB1D8 /* testgles */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDAAC6230E2D5914001DB1D8 /* Build configuration list for PBXNativeTarget "testgles" */;
-			buildPhases = (
-				FDAAC6160E2D5914001DB1D8 /* Resources */,
-				FDAAC6170E2D5914001DB1D8 /* Sources */,
-				FDAAC6190E2D5914001DB1D8 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testgles;
-			productName = Test;
-			productReference = FDAAC6260E2D5914001DB1D8 /* testgles.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDC42FEF0F0D866D009C87E1 /* testdraw2 */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDC42FFD0F0D866D009C87E1 /* Build configuration list for PBXNativeTarget "testdraw2" */;
-			buildPhases = (
-				FDC42FF00F0D866D009C87E1 /* Resources */,
-				FDC42FF10F0D866D009C87E1 /* Sources */,
-				FDC42FF30F0D866D009C87E1 /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testdraw2;
-			productName = Test;
-			productReference = FDC430000F0D866D009C87E1 /* torturethread.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C0F90E2E4F4B00B7A85F /* testthread */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C1070E2E4F4B00B7A85F /* Build configuration list for PBXNativeTarget "testthread" */;
-			buildPhases = (
-				FDD2C0FA0E2E4F4B00B7A85F /* Resources */,
-				FDD2C0FB0E2E4F4B00B7A85F /* Sources */,
-				FDD2C0FD0E2E4F4B00B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testthread;
-			productName = Test;
-			productReference = FDD2C10A0E2E4F4B00B7A85F /* testthread.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C1700E2E52C000B7A85F /* testiconv */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C17E0E2E52C000B7A85F /* Build configuration list for PBXNativeTarget "testiconv" */;
-			buildPhases = (
-				FDD2C1710E2E52C000B7A85F /* Resources */,
-				FDD2C1720E2E52C000B7A85F /* Sources */,
-				FDD2C1740E2E52C000B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testiconv;
-			productName = Test;
-			productReference = FDD2C1810E2E52C000B7A85F /* testiconv.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C1930E2E534F00B7A85F /* testjoystick */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C1A20E2E534F00B7A85F /* Build configuration list for PBXNativeTarget "testjoystick" */;
-			buildPhases = (
-				FDD2C1940E2E534F00B7A85F /* Resources */,
-				FDD2C1960E2E534F00B7A85F /* Sources */,
-				FDD2C1980E2E534F00B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testjoystick;
-			productName = Test;
-			productReference = FDD2C1A50E2E534F00B7A85F /* testjoystick.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C44D0E2E773800B7A85F /* testkeys */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C45B0E2E773800B7A85F /* Build configuration list for PBXNativeTarget "testkeys" */;
-			buildPhases = (
-				FDD2C44E0E2E773800B7A85F /* Resources */,
-				FDD2C44F0E2E773800B7A85F /* Sources */,
-				FDD2C4510E2E773800B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testkeys;
-			productName = Test;
-			productReference = FDD2C45E0E2E773800B7A85F /* testkeys.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C46B0E2E77D700B7A85F /* testlock */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C4790E2E77D700B7A85F /* Build configuration list for PBXNativeTarget "testlock" */;
-			buildPhases = (
-				FDD2C46C0E2E77D700B7A85F /* Resources */,
-				FDD2C46D0E2E77D700B7A85F /* Sources */,
-				FDD2C46F0E2E77D700B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testlock;
-			productName = Test;
-			productReference = FDD2C47C0E2E77D700B7A85F /* testlock.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C4F90E2E7F4800B7A85F /* testplatform */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C5080E2E7F4800B7A85F /* Build configuration list for PBXNativeTarget "testplatform" */;
-			buildPhases = (
-				FDD2C4FA0E2E7F4800B7A85F /* Resources */,
-				FDD2C4FC0E2E7F4800B7A85F /* Sources */,
-				FDD2C4FE0E2E7F4800B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testplatform;
-			productName = Test;
-			productReference = FDD2C50B0E2E7F4800B7A85F /* testplatform.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C5170E2E807600B7A85F /* testsem */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C5260E2E807600B7A85F /* Build configuration list for PBXNativeTarget "testsem" */;
-			buildPhases = (
-				FDD2C5180E2E807600B7A85F /* Resources */,
-				FDD2C51A0E2E807600B7A85F /* Sources */,
-				FDD2C51C0E2E807600B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testsem;
-			productName = Test;
-			productReference = FDD2C5290E2E807600B7A85F /* testsem.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C53D0E2E80E400B7A85F /* testsprite2 */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C54B0E2E80E400B7A85F /* Build configuration list for PBXNativeTarget "testsprite2" */;
-			buildPhases = (
-				FDD2C53E0E2E80E400B7A85F /* Resources */,
-				FDD2C53F0E2E80E400B7A85F /* Sources */,
-				FDD2C5410E2E80E400B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testsprite2;
-			productName = Test;
-			productReference = FDD2C54E0E2E80E400B7A85F /* testsprite2.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C5740E2E8C7400B7A85F /* testtimer */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C5840E2E8C7400B7A85F /* Build configuration list for PBXNativeTarget "testtimer" */;
-			buildPhases = (
-				FDD2C5750E2E8C7400B7A85F /* Resources */,
-				FDD2C5770E2E8C7400B7A85F /* Sources */,
-				FDD2C57A0E2E8C7400B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testtimer;
-			productName = Test;
-			productReference = FDD2C5870E2E8C7400B7A85F /* testtimer.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C5B30E2E8CFC00B7A85F /* testver */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C5C20E2E8CFC00B7A85F /* Build configuration list for PBXNativeTarget "testver" */;
-			buildPhases = (
-				FDD2C5B40E2E8CFC00B7A85F /* Resources */,
-				FDD2C5B60E2E8CFC00B7A85F /* Sources */,
-				FDD2C5B80E2E8CFC00B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = testver;
-			productName = Test;
-			productReference = FDD2C5C50E2E8CFC00B7A85F /* testver.app */;
-			productType = "com.apple.product-type.application";
-		};
-		FDD2C6E20E2E959E00B7A85F /* torturethread */ = {
-			isa = PBXNativeTarget;
-			buildConfigurationList = FDD2C6F10E2E959E00B7A85F /* Build configuration list for PBXNativeTarget "torturethread" */;
-			buildPhases = (
-				FDD2C6E30E2E959E00B7A85F /* Resources */,
-				FDD2C6E50E2E959E00B7A85F /* Sources */,
-				FDD2C6E70E2E959E00B7A85F /* Frameworks */,
-			);
-			buildRules = (
-			);
-			dependencies = (
-			);
-			name = torturethread;
-			productName = Test;
-			productReference = FDD2C6F40E2E959E00B7A85F /* torturethread.app */;
-			productType = "com.apple.product-type.application";
-		};
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
-		29B97313FDCFA39411CA2CEA /* Project object */ = {
-			isa = PBXProject;
-			attributes = {
-				LastUpgradeCheck = 0630;
-				TargetAttributes = {
-					046CEF7513254F23007AD51D = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					047A63DD13285C3200CD7973 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					1D6058900D05DD3D006BFB54 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					56ED04FC118A8FE400A56AA6 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					AA13B3111FB8AEBC00D9FEE6 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					AAE7DEDA14CBB1E100DF1A0E = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					AAE7DF9E14CBB54E00DF1A0E = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					F395BF842564186400942BFF = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					F3A499B7255618AF00E92A8B = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FA3D99331BC4E644002C96C8 = {
-						CreatedOnToolsVersion = 7.1;
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FABA347D1D8B575200915323 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FABA34961D8B582100915323 = {
-						DevelopmentTeam = MXGJJ98X76;
-						ProvisioningStyle = Automatic;
-					};
-					FAE0E9801BAF9B230098DFA4 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDA8AAAA0E2D330F00EA573E = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDAAC3BB0E2D47E6001DB1D8 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDAAC58A0E2D5429001DB1D8 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDAAC5B80E2D55B5001DB1D8 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDAAC6150E2D5914001DB1D8 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDC42FEF0F0D866D009C87E1 = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C0F90E2E4F4B00B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C1700E2E52C000B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C1930E2E534F00B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C44D0E2E773800B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C46B0E2E77D700B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C4F90E2E7F4800B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C5170E2E807600B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C53D0E2E80E400B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C5740E2E8C7400B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C5B30E2E8CFC00B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-					FDD2C6E20E2E959E00B7A85F = {
-						DevelopmentTeam = MXGJJ98X76;
-					};
-				};
-			};
-			buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TestiPhoneOS" */;
-			compatibilityVersion = "Xcode 3.2";
-			developmentRegion = English;
-			hasScannedForEncodings = 1;
-			knownRegions = (
-				English,
-				Japanese,
-				French,
-				German,
-				Base,
-			);
-			mainGroup = 29B97314FDCFA39411CA2CEA /* CustomTemplate */;
-			projectDirPath = "";
-			projectReferences = (
-				{
-					ProductGroup = F3A492CD2555E1F100E92A8B /* Products */;
-					ProjectRef = F3A492CC2555E1F100E92A8B /* SDL.xcodeproj */;
-				},
-				{
-					ProductGroup = AA1EE44E176059220029C7A5 /* Products */;
-					ProjectRef = AA1EE44D176059220029C7A5 /* SDL2test.xcodeproj */;
-				},
-			);
-			projectRoot = "";
-			targets = (
-				047A63DD13285C3200CD7973 /* checkkeys */,
-				F3A499B7255618AF00E92A8B /* controllermap */,
-				FDA8AAAA0E2D330F00EA573E /* loopwav */,
-				FABA34961D8B582100915323 /* loopwav-TV */,
-				FABA347D1D8B575200915323 /* testaudiocapture */,
-				FDAAC3BB0E2D47E6001DB1D8 /* testaudioinfo */,
-				FDC42FEF0F0D866D009C87E1 /* testdraw2 */,
-				FDAAC58A0E2D5429001DB1D8 /* testerror */,
-				FDAAC5B80E2D55B5001DB1D8 /* testfile */,
-				FAE0E9801BAF9B230098DFA4 /* testgamecontroller */,
-				FA3D99331BC4E644002C96C8 /* testgamecontroller-TV */,
-				046CEF7513254F23007AD51D /* testgesture */,
-				FDAAC6150E2D5914001DB1D8 /* testgles */,
-				FDD2C1700E2E52C000B7A85F /* testiconv */,
-				FDD2C1930E2E534F00B7A85F /* testjoystick */,
-				FDD2C44D0E2E773800B7A85F /* testkeys */,
-				FDD2C46B0E2E77D700B7A85F /* testlock */,
-				FDD2C4F90E2E7F4800B7A85F /* testplatform */,
-				56ED04FC118A8FE400A56AA6 /* testpower */,
-				AAE7DF9E14CBB54E00DF1A0E /* testrendertarget */,
-				AAE7DEDA14CBB1E100DF1A0E /* testscale */,
-				FDD2C5170E2E807600B7A85F /* testsem */,
-				F395BF842564186400942BFF /* testsensor */,
-				FDD2C53D0E2E80E400B7A85F /* testsprite2 */,
-				FDD2C0F90E2E4F4B00B7A85F /* testthread */,
-				FDD2C5740E2E8C7400B7A85F /* testtimer */,
-				FDD2C5B30E2E8CFC00B7A85F /* testver */,
-				1D6058900D05DD3D006BFB54 /* testwm2 */,
-				AA13B3111FB8AEBC00D9FEE6 /* testyuv */,
-				FDD2C6E20E2E959E00B7A85F /* torturethread */,
-			);
-		};
-/* End PBXProject section */
-
-/* Begin PBXReferenceProxy section */
-		AA1EE452176059230029C7A5 /* libSDL2test.a */ = {
-			isa = PBXReferenceProxy;
-			fileType = archive.ar;
-			path = libSDL2test.a;
-			remoteRef = AA1EE451176059230029C7A5 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492DD2555E1F100E92A8B /* SDL2.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = SDL2.framework;
-			remoteRef = F3A492DC2555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492DF2555E1F100E92A8B /* SDL2.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = SDL2.framework;
-			remoteRef = F3A492DE2555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492E12555E1F100E92A8B /* SDL2.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = SDL2.framework;
-			remoteRef = F3A492E02555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492E32555E1F100E92A8B /* libSDL2.a */ = {
-			isa = PBXReferenceProxy;
-			fileType = archive.ar;
-			path = libSDL2.a;
-			remoteRef = F3A492E22555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492E52555E1F100E92A8B /* libSDL2.a */ = {
-			isa = PBXReferenceProxy;
-			fileType = archive.ar;
-			path = libSDL2.a;
-			remoteRef = F3A492E42555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492E72555E1F100E92A8B /* libSDL2.a */ = {
-			isa = PBXReferenceProxy;
-			fileType = archive.ar;
-			path = libSDL2.a;
-			remoteRef = F3A492E62555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492E92555E1F100E92A8B /* libSDL2.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
-			remoteRef = F3A492E82555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492EB2555E1F100E92A8B /* libSDL2.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
-			remoteRef = F3A492EA2555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492ED2555E1F100E92A8B /* libSDL2.dylib */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.dylib";
-			path = libSDL2.dylib;
-			remoteRef = F3A492EC2555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492EF2555E1F100E92A8B /* SDL2 */ = {
-			isa = PBXReferenceProxy;
-			fileType = "compiled.mach-o.executable";
-			path = SDL2;
-			remoteRef = F3A492EE2555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492F12555E1F100E92A8B /* hidapi.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = hidapi.framework;
-			remoteRef = F3A492F02555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492F32555E1F100E92A8B /* hidapi.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = hidapi.framework;
-			remoteRef = F3A492F22555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		F3A492F52555E1F100E92A8B /* hidapi.framework */ = {
-			isa = PBXReferenceProxy;
-			fileType = wrapper.framework;
-			path = hidapi.framework;
-			remoteRef = F3A492F42555E1F100E92A8B /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-		FA3D992F1BC4E619002C96C8 /* libSDL2test-TV.a */ = {
-			isa = PBXReferenceProxy;
-			fileType = archive.ar;
-			path = "libSDL2test-TV.a";
-			remoteRef = FA3D992E1BC4E619002C96C8 /* PBXContainerItemProxy */;
-			sourceTree = BUILT_PRODUCTS_DIR;
-		};
-/* End PBXReferenceProxy section */
-
-/* Begin PBXResourcesBuildPhase section */
-		046CEF7613254F23007AD51D /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				046CEF7713254F23007AD51D /* icon.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		047A63DE13285C3200CD7973 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AA13B32F1FB8AF0C00D9FEE6 /* testyuv.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		1D60588D0D05DD3D006BFB54 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		56ED04FD118A8FE400A56AA6 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				56ED04FE118A8FE400A56AA6 /* icon.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AA13B3121FB8AEBC00D9FEE6 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AA13B3301FB8AF2300D9FEE6 /* testyuv.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AAE7DEDB14CBB1E100DF1A0E /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AAE7DEDC14CBB1E100DF1A0E /* icon.bmp in Resources */,
-				AAE7DF4714CBB45000DF1A0E /* sample.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AAE7DF9F14CBB54E00DF1A0E /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AAE7DFA014CBB54E00DF1A0E /* icon.bmp in Resources */,
-				AAE7DFA114CBB54E00DF1A0E /* sample.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		F395BF852564186400942BFF /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F395BF862564186400942BFF /* icon.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		F3A499B8255618AF00E92A8B /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A499B9255618AF00E92A8B /* controllermap.bmp in Resources */,
-				F3A49AFE2556A47500E92A8B /* controllermap_back.bmp in Resources */,
-				F3A499BA255618AF00E92A8B /* icon.bmp in Resources */,
-				F3A499BB255618AF00E92A8B /* axis.bmp in Resources */,
-				F3A499BC255618AF00E92A8B /* button.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FA3D99321BC4E644002C96C8 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FA3D99521BC4E70C002C96C8 /* controllermap.bmp in Resources */,
-				F3A49B002556A47500E92A8B /* controllermap_back.bmp in Resources */,
-				FA3D99541BC4E70F002C96C8 /* button.bmp in Resources */,
-				FA3D99531BC4E70E002C96C8 /* axis.bmp in Resources */,
-				FA3D99551BC4E712002C96C8 /* icon.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FABA347E1D8B575200915323 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FABA34971D8B582100915323 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FABA34981D8B582100915323 /* sample.wav in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FAE0E9811BAF9B230098DFA4 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FAE0E9961BAF9B650098DFA4 /* controllermap.bmp in Resources */,
-				F3A49AFF2556A47500E92A8B /* controllermap_back.bmp in Resources */,
-				FAE0E9821BAF9B230098DFA4 /* icon.bmp in Resources */,
-				FAE0E9981BAF9B6E0098DFA4 /* axis.bmp in Resources */,
-				FAE0E9971BAF9B6A0098DFA4 /* button.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDA8AAAB0E2D330F00EA573E /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDA8AAE30E2D33C600EA573E /* sample.wav in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC3BC0E2D47E6001DB1D8 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC58B0E2D5429001DB1D8 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC5B90E2D55B5001DB1D8 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC6160E2D5914001DB1D8 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDAAC6390E2D59BE001DB1D8 /* icon.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDC42FF00F0D866D009C87E1 /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C0FA0E2E4F4B00B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C1710E2E52C000B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C18B0E2E52FE00B7A85F /* utf8.txt in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C1940E2E534F00B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C44E0E2E773800B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C46C0E2E77D700B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C4FA0E2E7F4800B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C5180E2E807600B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C53E0E2E80E400B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C5520E2E812C00B7A85F /* icon.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C5750E2E8C7400B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C5760E2E8C7400B7A85F /* icon.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C5B40E2E8CFC00B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C5B50E2E8CFC00B7A85F /* icon.bmp in Resources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C6E30E2E959E00B7A85F /* Resources */ = {
-			isa = PBXResourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
-		046CEF7813254F23007AD51D /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				046CEF8A13254F63007AD51D /* testgesture.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		047A63DF13285C3200CD7973 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				047A63F113285CD100CD7973 /* checkkeys.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		1D60588E0D05DD3D006BFB54 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDA8A79C0E2D0F9300EA573E /* testwm2.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		56ED04FF118A8FE400A56AA6 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				56ED0511118A904200A56AA6 /* testpower.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AA13B3141FB8AEBC00D9FEE6 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AA13B3611FB8B52500D9FEE6 /* testyuv_cvt.c in Sources */,
-				AA13B35D1FB8B4E200D9FEE6 /* testyuv.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AAE7DEDD14CBB1E100DF1A0E /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AAE7DF4614CBB43900DF1A0E /* testscale.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		AAE7DFA214CBB54E00DF1A0E /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				AAE7DFB514CBB5F700DF1A0E /* testrendertarget.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		F395BF872564186400942BFF /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F395BFE2256418A700942BFF /* testsensor.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		F3A499BD255618AF00E92A8B /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3A49A822556190000E92A8B /* controllermap.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FA3D99301BC4E644002C96C8 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				F3F758DE22AC5ABB001D97F2 /* testgamecontroller.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FABA34801D8B575200915323 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FABA34951D8B578600915323 /* testaudiocapture.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FABA34991D8B582100915323 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FABA349A1D8B582100915323 /* loopwave.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FAE0E9831BAF9B230098DFA4 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FAE0E9951BAF9B510098DFA4 /* testgamecontroller.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDA8AAAC0E2D330F00EA573E /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDA8AABE0E2D335C00EA573E /* loopwave.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC3BE0E2D47E6001DB1D8 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDAAC3D30E2D4800001DB1D8 /* testaudioinfo.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC58C0E2D5429001DB1D8 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDAAC59F0E2D54B8001DB1D8 /* testerror.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC5BA0E2D55B5001DB1D8 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDAAC5CC0E2D55CA001DB1D8 /* testfile.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDAAC6170E2D5914001DB1D8 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDAAC62A0E2D5960001DB1D8 /* testgles.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDC42FF10F0D866D009C87E1 /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDC4300A0F0D86BF009C87E1 /* testdraw2.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C0FB0E2E4F4B00B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C10D0E2E4F6900B7A85F /* testthread.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C1720E2E52C000B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C1840E2E52D900B7A85F /* testiconv.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C1960E2E534F00B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FA0EF22E1BAF4654000E07A6 /* testjoystick.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C44F0E2E773800B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C4610E2E777500B7A85F /* testkeys.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C46D0E2E77D700B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C47F0E2E77E300B7A85F /* testlock.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C4FC0E2E7F4800B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C50E0E2E7F5800B7A85F /* testplatform.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C51A0E2E807600B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C52C0E2E808700B7A85F /* testsem.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C53F0E2E80E400B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C5510E2E80F400B7A85F /* testsprite2.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C5770E2E8C7400B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C58A0E2E8CB500B7A85F /* testtimer.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C5B60E2E8CFC00B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C5C80E2E8D1200B7A85F /* testver.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-		FDD2C6E50E2E959E00B7A85F /* Sources */ = {
-			isa = PBXSourcesBuildPhase;
-			buildActionMask = 2147483647;
-			files = (
-				FDD2C6F70E2E95B100B7A85F /* torturethread.c in Sources */,
-			);
-			runOnlyForDeploymentPostprocessing = 0;
-		};
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
-		046CEF8413254F23007AD51D /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testgesture;
-			};
-			name = Debug;
-		};
-		046CEF8513254F23007AD51D /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testgesture;
-			};
-			name = Release;
-		};
-		047A63EB13285C3200CD7973 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = checkkeys;
-			};
-			name = Debug;
-		};
-		047A63EC13285C3200CD7973 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = checkkeys;
-			};
-			name = Release;
-		};
-		1D6058940D05DD3E006BFB54 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testwm2;
-			};
-			name = Debug;
-		};
-		1D6058950D05DD3E006BFB54 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testwm2;
-			};
-			name = Release;
-		};
-		56ED050B118A8FE400A56AA6 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testpower;
-			};
-			name = Debug;
-		};
-		56ED050C118A8FE400A56AA6 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testpower;
-			};
-			name = Release;
-		};
-		AA13B3241FB8AEBC00D9FEE6 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		AA13B3251FB8AEBC00D9FEE6 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		AAE7DEEA14CBB1E100DF1A0E /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testscale;
-			};
-			name = Debug;
-		};
-		AAE7DEEB14CBB1E100DF1A0E /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testscale;
-			};
-			name = Release;
-		};
-		AAE7DFAF14CBB54E00DF1A0E /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testrendertarget;
-			};
-			name = Debug;
-		};
-		AAE7DFB014CBB54E00DF1A0E /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testrendertarget;
-			};
-			name = Release;
-		};
-		C01FCF4F08A954540054247B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				ENABLE_BITCODE = NO;
-				GCC_OPTIMIZATION_LEVEL = 0;
-				HEADER_SEARCH_PATHS = ../../include;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
-				ONLY_ACTIVE_ARCH = YES;
-				OTHER_LDFLAGS = "-ObjC";
-				"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
-				SDKROOT = iphoneos;
-				TARGETED_DEVICE_FAMILY = "1,2";
-			};
-			name = Debug;
-		};
-		C01FCF5008A954540054247B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
-				ENABLE_BITCODE = NO;
-				HEADER_SEARCH_PATHS = ../../include;
-				IPHONEOS_DEPLOYMENT_TARGET = 8.0;
-				OTHER_LDFLAGS = "-ObjC";
-				"PROVISIONING_PROFILE[sdk=iphoneos*]" = "";
-				SDKROOT = iphoneos;
-				TARGETED_DEVICE_FAMILY = "1,2";
-			};
-			name = Release;
-		};
-		F395BF982564186400942BFF /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = "testpower copy-Info.plist";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		F395BF992564186400942BFF /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = "testpower copy-Info.plist";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		F3A499D1255618AF00E92A8B /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = "testgamecontroller copy-Info.plist";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		F3A499D2255618AF00E92A8B /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = "testgamecontroller copy-Info.plist";
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		FA3D99461BC4E645002C96C8 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = dwarf;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				ENABLE_TESTABILITY = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_DYNAMIC_NO_PIC = NO;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_PREPROCESSOR_DEFINITIONS = (
-					"DEBUG=1",
-					"$(inherited)",
-				);
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				INFOPLIST_FILE = Info.plist;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				MTL_ENABLE_DEBUG_INFO = YES;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = appletvos;
-				TARGETED_DEVICE_FAMILY = 3;
-				TVOS_DEPLOYMENT_TARGET = 9.0;
-			};
-			name = Debug;
-		};
-		FA3D99471BC4E645002C96C8 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				ALWAYS_SEARCH_USER_PATHS = NO;
-				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
-				CLANG_CXX_LIBRARY = "libc++";
-				CLANG_ENABLE_MODULES = YES;
-				CLANG_ENABLE_OBJC_ARC = YES;
-				CLANG_WARN_BOOL_CONVERSION = YES;
-				CLANG_WARN_CONSTANT_CONVERSION = YES;
-				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
-				CLANG_WARN_EMPTY_BODY = YES;
-				CLANG_WARN_ENUM_CONVERSION = YES;
-				CLANG_WARN_INT_CONVERSION = YES;
-				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
-				CLANG_WARN_UNREACHABLE_CODE = YES;
-				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
-				COPY_PHASE_STRIP = NO;
-				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
-				ENABLE_NS_ASSERTIONS = NO;
-				ENABLE_STRICT_OBJC_MSGSEND = YES;
-				GCC_C_LANGUAGE_STANDARD = gnu99;
-				GCC_NO_COMMON_BLOCKS = YES;
-				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
-				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
-				GCC_WARN_UNDECLARED_SELECTOR = YES;
-				GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
-				GCC_WARN_UNUSED_FUNCTION = YES;
-				GCC_WARN_UNUSED_VARIABLE = YES;
-				INFOPLIST_FILE = Info.plist;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				MTL_ENABLE_DEBUG_INFO = NO;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = appletvos;
-				TARGETED_DEVICE_FAMILY = 3;
-				TVOS_DEPLOYMENT_TARGET = 9.0;
-				VALIDATE_PRODUCT = YES;
-			};
-			name = Release;
-		};
-		FABA348F1D8B575200915323 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		FABA34901D8B575200915323 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		FABA34A81D8B582100915323 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = appletvos;
-				SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
-				TVOS_DEPLOYMENT_TARGET = 9.0;
-			};
-			name = Debug;
-		};
-		FABA34A91D8B582100915323 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = "$(TARGET_NAME)";
-				SDKROOT = appletvos;
-				SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
-				TVOS_DEPLOYMENT_TARGET = 9.0;
-			};
-			name = Release;
-		};
-		FAE0E9911BAF9B230098DFA4 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Debug;
-		};
-		FAE0E9921BAF9B230098DFA4 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
-				PRODUCT_NAME = "$(TARGET_NAME)";
-			};
-			name = Release;
-		};
-		FDA8AAB90E2D330F00EA573E /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = loopwav;
-			};
-			name = Debug;
-		};
-		FDA8AABA0E2D330F00EA573E /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = loopwav;
-			};
-			name = Release;
-		};
-		FDAAC3CB0E2D47E6001DB1D8 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testaudioinfo;
-			};
-			name = Debug;
-		};
-		FDAAC3CC0E2D47E6001DB1D8 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testaudioinfo;
-			};
-			name = Release;
-		};
-		FDAAC5990E2D5429001DB1D8 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testerror;
-			};
-			name = Debug;
-		};
-		FDAAC59A0E2D5429001DB1D8 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testerror;
-			};
-			name = Release;
-		};
-		FDAAC5C70E2D55B5001DB1D8 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testfile;
-			};
-			name = Debug;
-		};
-		FDAAC5C80E2D55B5001DB1D8 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testfile;
-			};
-			name = Release;
-		};
-		FDAAC6240E2D5914001DB1D8 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testgles;
-			};
-			name = Debug;
-		};
-		FDAAC6250E2D5914001DB1D8 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testgles;
-			};
-			name = Release;
-		};
-		FDC42FFE0F0D866D009C87E1 /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = torturethread;
-			};
-			name = Debug;
-		};
-		FDC42FFF0F0D866D009C87E1 /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = torturethread;
-			};
-			name = Release;
-		};
-		FDD2C1080E2E4F4B00B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testthread;
-			};
-			name = Debug;
-		};
-		FDD2C1090E2E4F4B00B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testthread;
-			};
-			name = Release;
-		};
-		FDD2C17F0E2E52C000B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testiconv;
-			};
-			name = Debug;
-		};
-		FDD2C1800E2E52C000B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testiconv;
-			};
-			name = Release;
-		};
-		FDD2C1A30E2E534F00B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testjoystick;
-			};
-			name = Debug;
-		};
-		FDD2C1A40E2E534F00B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testjoystick;
-			};
-			name = Release;
-		};
-		FDD2C45C0E2E773800B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testkeys;
-			};
-			name = Debug;
-		};
-		FDD2C45D0E2E773800B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testkeys;
-			};
-			name = Release;
-		};
-		FDD2C47A0E2E77D700B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testlock;
-			};
-			name = Debug;
-		};
-		FDD2C47B0E2E77D700B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testlock;
-			};
-			name = Release;
-		};
-		FDD2C5090E2E7F4800B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testplatform;
-			};
-			name = Debug;
-		};
-		FDD2C50A0E2E7F4800B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testplatform;
-			};
-			name = Release;
-		};
-		FDD2C5270E2E807600B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testsem;
-			};
-			name = Debug;
-		};
-		FDD2C5280E2E807600B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testsem;
-			};
-			name = Release;
-		};
-		FDD2C54C0E2E80E400B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testsprite2;
-			};
-			name = Debug;
-		};
-		FDD2C54D0E2E80E400B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testsprite2;
-			};
-			name = Release;
-		};
-		FDD2C5850E2E8C7400B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testtimer;
-			};
-			name = Debug;
-		};
-		FDD2C5860E2E8C7400B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testtimer;
-			};
-			name = Release;
-		};
-		FDD2C5C30E2E8CFC00B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testver;
-			};
-			name = Debug;
-		};
-		FDD2C5C40E2E8CFC00B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = testver;
-			};
-			name = Release;
-		};
-		FDD2C6F20E2E959E00B7A85F /* Debug */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = torturethread;
-			};
-			name = Debug;
-		};
-		FDD2C6F30E2E959E00B7A85F /* Release */ = {
-			isa = XCBuildConfiguration;
-			buildSettings = {
-				INFOPLIST_FILE = Info.plist;
-				PRODUCT_NAME = torturethread;
-			};
-			name = Release;
-		};
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
-		046CEF8313254F23007AD51D /* Build configuration list for PBXNativeTarget "testgesture" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				046CEF8413254F23007AD51D /* Debug */,
-				046CEF8513254F23007AD51D /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		047A63EA13285C3200CD7973 /* Build configuration list for PBXNativeTarget "checkkeys" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				047A63EB13285C3200CD7973 /* Debug */,
-				047A63EC13285C3200CD7973 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		1D6058960D05DD3E006BFB54 /* Build configuration list for PBXNativeTarget "testwm2" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				1D6058940D05DD3E006BFB54 /* Debug */,
-				1D6058950D05DD3E006BFB54 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		56ED050A118A8FE400A56AA6 /* Build configuration list for PBXNativeTarget "testpower" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				56ED050B118A8FE400A56AA6 /* Debug */,
-				56ED050C118A8FE400A56AA6 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		AA13B3231FB8AEBC00D9FEE6 /* Build configuration list for PBXNativeTarget "testyuv" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				AA13B3241FB8AEBC00D9FEE6 /* Debug */,
-				AA13B3251FB8AEBC00D9FEE6 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		AAE7DEE914CBB1E100DF1A0E /* Build configuration list for PBXNativeTarget "testscale" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				AAE7DEEA14CBB1E100DF1A0E /* Debug */,
-				AAE7DEEB14CBB1E100DF1A0E /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		AAE7DFAE14CBB54E00DF1A0E /* Build configuration list for PBXNativeTarget "testrendertarget" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				AAE7DFAF14CBB54E00DF1A0E /* Debug */,
-				AAE7DFB014CBB54E00DF1A0E /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		C01FCF4E08A954540054247B /* Build configuration list for PBXProject "TestiPhoneOS" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				C01FCF4F08A954540054247B /* Debug */,
-				C01FCF5008A954540054247B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		F395BF972564186400942BFF /* Build configuration list for PBXNativeTarget "testsensor" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				F395BF982564186400942BFF /* Debug */,
-				F395BF992564186400942BFF /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		F3A499D0255618AF00E92A8B /* Build configuration list for PBXNativeTarget "controllermap" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				F3A499D1255618AF00E92A8B /* Debug */,
-				F3A499D2255618AF00E92A8B /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FA3D99451BC4E645002C96C8 /* Build configuration list for PBXNativeTarget "testgamecontroller-TV" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FA3D99461BC4E645002C96C8 /* Debug */,
-				FA3D99471BC4E645002C96C8 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FABA348E1D8B575200915323 /* Build configuration list for PBXNativeTarget "testaudiocapture" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FABA348F1D8B575200915323 /* Debug */,
-				FABA34901D8B575200915323 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FABA34A71D8B582100915323 /* Build configuration list for PBXNativeTarget "loopwav-TV" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FABA34A81D8B582100915323 /* Debug */,
-				FABA34A91D8B582100915323 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FAE0E9901BAF9B230098DFA4 /* Build configuration list for PBXNativeTarget "testgamecontroller" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FAE0E9911BAF9B230098DFA4 /* Debug */,
-				FAE0E9921BAF9B230098DFA4 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDA8AAB80E2D330F00EA573E /* Build configuration list for PBXNativeTarget "loopwav" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDA8AAB90E2D330F00EA573E /* Debug */,
-				FDA8AABA0E2D330F00EA573E /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDAAC3CA0E2D47E6001DB1D8 /* Build configuration list for PBXNativeTarget "testaudioinfo" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDAAC3CB0E2D47E6001DB1D8 /* Debug */,
-				FDAAC3CC0E2D47E6001DB1D8 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDAAC5980E2D5429001DB1D8 /* Build configuration list for PBXNativeTarget "testerror" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDAAC5990E2D5429001DB1D8 /* Debug */,
-				FDAAC59A0E2D5429001DB1D8 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDAAC5C60E2D55B5001DB1D8 /* Build configuration list for PBXNativeTarget "testfile" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDAAC5C70E2D55B5001DB1D8 /* Debug */,
-				FDAAC5C80E2D55B5001DB1D8 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDAAC6230E2D5914001DB1D8 /* Build configuration list for PBXNativeTarget "testgles" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDAAC6240E2D5914001DB1D8 /* Debug */,
-				FDAAC6250E2D5914001DB1D8 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDC42FFD0F0D866D009C87E1 /* Build configuration list for PBXNativeTarget "testdraw2" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDC42FFE0F0D866D009C87E1 /* Debug */,
-				FDC42FFF0F0D866D009C87E1 /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C1070E2E4F4B00B7A85F /* Build configuration list for PBXNativeTarget "testthread" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C1080E2E4F4B00B7A85F /* Debug */,
-				FDD2C1090E2E4F4B00B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C17E0E2E52C000B7A85F /* Build configuration list for PBXNativeTarget "testiconv" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C17F0E2E52C000B7A85F /* Debug */,
-				FDD2C1800E2E52C000B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C1A20E2E534F00B7A85F /* Build configuration list for PBXNativeTarget "testjoystick" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C1A30E2E534F00B7A85F /* Debug */,
-				FDD2C1A40E2E534F00B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C45B0E2E773800B7A85F /* Build configuration list for PBXNativeTarget "testkeys" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C45C0E2E773800B7A85F /* Debug */,
-				FDD2C45D0E2E773800B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C4790E2E77D700B7A85F /* Build configuration list for PBXNativeTarget "testlock" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C47A0E2E77D700B7A85F /* Debug */,
-				FDD2C47B0E2E77D700B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C5080E2E7F4800B7A85F /* Build configuration list for PBXNativeTarget "testplatform" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C5090E2E7F4800B7A85F /* Debug */,
-				FDD2C50A0E2E7F4800B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C5260E2E807600B7A85F /* Build configuration list for PBXNativeTarget "testsem" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C5270E2E807600B7A85F /* Debug */,
-				FDD2C5280E2E807600B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C54B0E2E80E400B7A85F /* Build configuration list for PBXNativeTarget "testsprite2" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C54C0E2E80E400B7A85F /* Debug */,
-				FDD2C54D0E2E80E400B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C5840E2E8C7400B7A85F /* Build configuration list for PBXNativeTarget "testtimer" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C5850E2E8C7400B7A85F /* Debug */,
-				FDD2C5860E2E8C7400B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C5C20E2E8CFC00B7A85F /* Build configuration list for PBXNativeTarget "testver" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C5C30E2E8CFC00B7A85F /* Debug */,
-				FDD2C5C40E2E8CFC00B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-		FDD2C6F10E2E959E00B7A85F /* Build configuration list for PBXNativeTarget "torturethread" */ = {
-			isa = XCConfigurationList;
-			buildConfigurations = (
-				FDD2C6F20E2E959E00B7A85F /* Debug */,
-				FDD2C6F30E2E959E00B7A85F /* Release */,
-			);
-			defaultConfigurationIsVisible = 0;
-			defaultConfigurationName = Release;
-		};
-/* End XCConfigurationList section */
-	};
-	rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
-}

+ 2 - 2
Engine/lib/sdl/Xcode/SDL/Info-Framework.plist

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

File diff suppressed because it is too large
+ 256 - 52
Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/project.pbxproj


+ 67 - 0
Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/Framework-iOS.xcscheme

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1240"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "A7D88A1423E2437C00DCD162"
+               BuildableName = "SDL2.framework"
+               BlueprintName = "Framework-iOS"
+               ReferencedContainer = "container:SDL.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "A7D88A1423E2437C00DCD162"
+            BuildableName = "SDL2.framework"
+            BlueprintName = "Framework-iOS"
+            ReferencedContainer = "container:SDL.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 67 - 0
Engine/lib/sdl/Xcode/SDL/SDL.xcodeproj/xcshareddata/xcschemes/xcFramework-iOS.xcscheme

@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+   LastUpgradeVersion = "1240"
+   version = "1.3">
+   <BuildAction
+      parallelizeBuildables = "YES"
+      buildImplicitDependencies = "YES">
+      <BuildActionEntries>
+         <BuildActionEntry
+            buildForTesting = "YES"
+            buildForRunning = "YES"
+            buildForProfiling = "YES"
+            buildForArchiving = "YES"
+            buildForAnalyzing = "YES">
+            <BuildableReference
+               BuildableIdentifier = "primary"
+               BlueprintIdentifier = "E2D187CE28A5673500D2B4F1"
+               BuildableName = "SDL2.framework"
+               BlueprintName = "xcFramework-iOS"
+               ReferencedContainer = "container:SDL.xcodeproj">
+            </BuildableReference>
+         </BuildActionEntry>
+      </BuildActionEntries>
+   </BuildAction>
+   <TestAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      shouldUseLaunchSchemeArgsEnv = "YES">
+      <Testables>
+      </Testables>
+   </TestAction>
+   <LaunchAction
+      buildConfiguration = "Debug"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+      launchStyle = "0"
+      useCustomWorkingDirectory = "NO"
+      ignoresPersistentStateOnLaunch = "NO"
+      debugDocumentVersioning = "YES"
+      debugServiceExtension = "internal"
+      allowLocationSimulation = "YES">
+   </LaunchAction>
+   <ProfileAction
+      buildConfiguration = "Release"
+      shouldUseLaunchSchemeArgsEnv = "YES"
+      savedToolIdentifier = ""
+      useCustomWorkingDirectory = "NO"
+      debugDocumentVersioning = "YES">
+      <MacroExpansion>
+         <BuildableReference
+            BuildableIdentifier = "primary"
+            BlueprintIdentifier = "E2D187CE28A5673500D2B4F1"
+            BuildableName = "SDL2.framework"
+            BlueprintName = "xcFramework-iOS"
+            ReferencedContainer = "container:SDL.xcodeproj">
+         </BuildableReference>
+      </MacroExpansion>
+   </ProfileAction>
+   <AnalyzeAction
+      buildConfiguration = "Debug">
+   </AnalyzeAction>
+   <ArchiveAction
+      buildConfiguration = "Release"
+      revealArchiveInOrganizer = "YES">
+   </ArchiveAction>
+</Scheme>

+ 7 - 21
Engine/lib/sdl/Xcode-iOS/Demos/Info.plist → Engine/lib/sdl/Xcode/SDL/SDL2/Info.plist

@@ -3,34 +3,20 @@
 <plist version="1.0">
 <plist version="1.0">
 <dict>
 <dict>
 	<key>CFBundleDevelopmentRegion</key>
 	<key>CFBundleDevelopmentRegion</key>
-	<string>en</string>
-	<key>CFBundleDisplayName</key>
-	<string>${PRODUCT_NAME}</string>
+	<string>$(DEVELOPMENT_LANGUAGE)</string>
 	<key>CFBundleExecutable</key>
 	<key>CFBundleExecutable</key>
-	<string>${EXECUTABLE_NAME}</string>
-	<key>CFBundleIconFile</key>
-	<string></string>
+	<string>$(EXECUTABLE_NAME)</string>
 	<key>CFBundleIdentifier</key>
 	<key>CFBundleIdentifier</key>
 	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 	<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<string>6.0</string>
 	<key>CFBundleName</key>
 	<key>CFBundleName</key>
-	<string>${PRODUCT_NAME}</string>
-	<key>CFBundleShortVersionString</key>
-	<string>1.0.0</string>
+	<string>$(PRODUCT_NAME)</string>
 	<key>CFBundlePackageType</key>
 	<key>CFBundlePackageType</key>
-	<string>APPL</string>
-	<key>CFBundleSignature</key>
-	<string>????</string>
-	<key>CFBundleVersion</key>
+	<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
+	<key>CFBundleShortVersionString</key>
 	<string>1.0</string>
 	<string>1.0</string>
-	<key>NSMainNibFile</key>
-	<string></string>
-	<key>UILaunchStoryboardName</key>
-	<string>iOS Launch Screen</string>
-	<key>UISupportedInterfaceOrientations</key>
-	<array/>
-	<key>UIApplicationSupportsIndirectInputEvents</key>
-	<true/>
+	<key>CFBundleVersion</key>
+	<string>$(CURRENT_PROJECT_VERSION)</string>
 </dict>
 </dict>
 </plist>
 </plist>

+ 1 - 1
Engine/lib/sdl/Xcode/SDL/pkg-support/resources/License.txt

@@ -1,6 +1,6 @@
 
 
 Simple DirectMedia Layer
 Simple DirectMedia Layer
-Copyright (C) 1997-2022 Sam Lantinga <[email protected]>
+Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
   
   
 This software is provided 'as-is', without any express or implied
 This software is provided 'as-is', without any express or implied
 warranty.  In no event will the authors be held liable for any damages
 warranty.  In no event will the authors be held liable for any damages

+ 13 - 1
Engine/lib/sdl/Xcode/SDL/pkg-support/resources/ReadMe.txt

@@ -18,7 +18,19 @@ To Install:
 Copy the SDL2.framework to /Library/Frameworks
 Copy the SDL2.framework to /Library/Frameworks
 
 
 You may alternatively install it in <Your home directory>/Library/Frameworks 
 You may alternatively install it in <Your home directory>/Library/Frameworks 
-if your access privileges are not high enough. 
+if your access privileges are not high enough.
+
+
+Use in CMake projects:
+SDL2.framework can be used in CMake projects using the following pattern:
+```
+find_package(SDL2 REQUIRED COMPONENTS SDL2)
+add_executable(my_game ${MY_SOURCES})
+target_link_libraries(my_game PRIVATE SDL2::SDL2)
+```
+If SDL2.framework is installed in a non-standard location,
+please refer to the following link for ways to configure CMake:
+https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure
 
 
 
 
 Additional References:
 Additional References:

File diff suppressed because it is too large
+ 184 - 602
Engine/lib/sdl/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj


+ 14 - 0
Engine/lib/sdl/Xcode/SDLTest/config.xcconfig

@@ -0,0 +1,14 @@
+//
+//  config.xcconfig
+//  SDL tests
+//
+
+// Configuration settings file format documentation can be found at:
+// https://help.apple.com/xcode/#/dev745c5c974
+
+// Include any optional config for this build
+#include? "build.xcconfig"
+
+CONFIG_FRAMEWORK_LDFLAGS[sdk=macos*] = $(inherited) -framework SDL2 -framework AudioToolbox -framework Carbon -framework Cocoa -framework CoreAudio -framework CoreHaptics -framework CoreVideo -framework ForceFeedback -framework GameController -framework IOKit -framework Metal
+CONFIG_FRAMEWORK_LDFLAGS[sdk=iphone*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework CoreMotion -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit
+CONFIG_FRAMEWORK_LDFLAGS[sdk=appletv*] = $(inherited) -framework SDL2 -framework AVFoundation -framework AudioToolbox -framework CoreGraphics -framework CoreHaptics -framework Foundation -framework GameController -framework Metal -framework OpenGLES -framework QuartzCore -framework UIKit

+ 173 - 0
Engine/lib/sdl/acinclude/ax_compute_relative_paths.m4

@@ -0,0 +1,173 @@
+# ==============================================================================
+#  https://www.gnu.org/software/autoconf-archive/ax_compute_relative_paths.html
+# ==============================================================================
+#
+# SYNOPSIS
+#
+#   AX_COMPUTE_RELATIVE_PATHS(PATH_LIST)
+#
+# DESCRIPTION
+#
+#   PATH_LIST is a space-separated list of colon-separated triplets of the
+#   form 'FROM:TO:RESULT'. This function iterates over these triplets and
+#   set $RESULT to the relative path from $FROM to $TO. Note that $FROM and
+#   $TO needs to be absolute filenames for this macro to success.
+#
+#   For instance,
+#
+#     first=/usr/local/bin
+#     second=/usr/local/share
+#     AX_COMPUTE_RELATIVE_PATHS([first:second:fs second:first:sf])
+#     # $fs is set to ../share
+#     # $sf is set to ../bin
+#
+#   $FROM and $TO are both eval'ed recursively and normalized, this means
+#   that you can call this macro with autoconf's dirnames like `prefix' or
+#   `datadir'. For example:
+#
+#     AX_COMPUTE_RELATIVE_PATHS([bindir:datadir:bin_to_data])
+#
+#   AX_COMPUTE_RELATIVE_PATHS should also works with DOS filenames.
+#
+#   You may want to use this macro in order to make your package
+#   relocatable. Instead of hardcoding $datadir into your programs just
+#   encode $bin_to_data and try to determine $bindir at run-time.
+#
+#   This macro requires AX_NORMALIZE_PATH and AX_RECURSIVE_EVAL.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Alexandre Duret-Lutz <[email protected]>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 12
+
+AU_ALIAS([ADL_COMPUTE_RELATIVE_PATHS], [AX_COMPUTE_RELATIVE_PATHS])
+AC_DEFUN([AX_COMPUTE_RELATIVE_PATHS],
+[for _lcl_i in $1; do
+  _lcl_from=\[$]`echo "[$]_lcl_i" | sed 's,:.*$,,'`
+  _lcl_to=\[$]`echo "[$]_lcl_i" | sed 's,^[[^:]]*:,,' | sed 's,:[[^:]]*$,,'`
+  _lcl_result_var=`echo "[$]_lcl_i" | sed 's,^.*:,,'`
+  AX_RECURSIVE_EVAL([[$]_lcl_from], [_lcl_from])
+  AX_RECURSIVE_EVAL([[$]_lcl_to], [_lcl_to])
+  _lcl_notation="$_lcl_from$_lcl_to"
+  AX_NORMALIZE_PATH([_lcl_from],['/'])
+  AX_NORMALIZE_PATH([_lcl_to],['/'])
+  AX_COMPUTE_RELATIVE_PATH([_lcl_from], [_lcl_to], [_lcl_result_tmp])
+  AX_NORMALIZE_PATH([_lcl_result_tmp],["[$]_lcl_notation"])
+  eval $_lcl_result_var='[$]_lcl_result_tmp'
+done])
+
+## Note:
+## *****
+## The following helper macros are too fragile to be used out
+## of AX_COMPUTE_RELATIVE_PATHS (mainly because they assume that
+## paths are normalized), that's why I'm keeping them in the same file.
+## Still, some of them maybe worth to reuse.
+
+dnl AX_COMPUTE_RELATIVE_PATH(FROM, TO, RESULT)
+dnl ===========================================
+dnl Compute the relative path to go from $FROM to $TO and set the value
+dnl of $RESULT to that value.  This function work on raw filenames
+dnl (for instead it will considerate /usr//local and /usr/local as
+dnl two distinct paths), you should really use AX_COMPUTE_RELATIVE_PATHS
+dnl instead to have the paths sanitized automatically.
+dnl
+dnl For instance:
+dnl    first_dir=/somewhere/on/my/disk/bin
+dnl    second_dir=/somewhere/on/another/disk/share
+dnl    AX_COMPUTE_RELATIVE_PATH(first_dir, second_dir, first_to_second)
+dnl will set $first_to_second to '../../../another/disk/share'.
+AC_DEFUN([AX_COMPUTE_RELATIVE_PATH],
+[AX_COMPUTE_COMMON_PATH([$1], [$2], [_lcl_common_prefix])
+AX_COMPUTE_BACK_PATH([$1], [_lcl_common_prefix], [_lcl_first_rel])
+AX_COMPUTE_SUFFIX_PATH([$2], [_lcl_common_prefix], [_lcl_second_suffix])
+$3="[$]_lcl_first_rel[$]_lcl_second_suffix"])
+
+dnl AX_COMPUTE_COMMON_PATH(LEFT, RIGHT, RESULT)
+dnl ============================================
+dnl Compute the common path to $LEFT and $RIGHT and set the result to $RESULT.
+dnl
+dnl For instance:
+dnl    first_path=/somewhere/on/my/disk/bin
+dnl    second_path=/somewhere/on/another/disk/share
+dnl    AX_COMPUTE_COMMON_PATH(first_path, second_path, common_path)
+dnl will set $common_path to '/somewhere/on'.
+AC_DEFUN([AX_COMPUTE_COMMON_PATH],
+[$3=''
+_lcl_second_prefix_match=''
+while test "[$]_lcl_second_prefix_match" != 0; do
+  _lcl_first_prefix=`expr "x[$]$1" : "x\([$]$3/*[[^/]]*\)"`
+  _lcl_second_prefix_match=`expr "x[$]$2" : "x[$]_lcl_first_prefix"`
+  if test "[$]_lcl_second_prefix_match" != 0; then
+    if test "[$]_lcl_first_prefix" != "[$]$3"; then
+      $3="[$]_lcl_first_prefix"
+    else
+      _lcl_second_prefix_match=0
+    fi
+  fi
+done])
+
+dnl AX_COMPUTE_SUFFIX_PATH(PATH, SUBPATH, RESULT)
+dnl ==============================================
+dnl Subtract $SUBPATH from $PATH, and set the resulting suffix
+dnl (or the empty string if $SUBPATH is not a subpath of $PATH)
+dnl to $RESULT.
+dnl
+dnl For instance:
+dnl    first_path=/somewhere/on/my/disk/bin
+dnl    second_path=/somewhere/on
+dnl    AX_COMPUTE_SUFFIX_PATH(first_path, second_path, common_path)
+dnl will set $common_path to '/my/disk/bin'.
+AC_DEFUN([AX_COMPUTE_SUFFIX_PATH],
+[$3=`expr "x[$]$1" : "x[$]$2/*\(.*\)"`])
+
+dnl AX_COMPUTE_BACK_PATH(PATH, SUBPATH, RESULT)
+dnl ============================================
+dnl Compute the relative path to go from $PATH to $SUBPATH, knowing that
+dnl $SUBPATH is a subpath of $PATH (any other words, only repeated '../'
+dnl should be needed to move from $PATH to $SUBPATH) and set the value
+dnl of $RESULT to that value.  If $SUBPATH is not a subpath of PATH,
+dnl set $RESULT to the empty string.
+dnl
+dnl For instance:
+dnl    first_path=/somewhere/on/my/disk/bin
+dnl    second_path=/somewhere/on
+dnl    AX_COMPUTE_BACK_PATH(first_path, second_path, back_path)
+dnl will set $back_path to '../../../'.
+AC_DEFUN([AX_COMPUTE_BACK_PATH],
+[AX_COMPUTE_SUFFIX_PATH([$1], [$2], [_lcl_first_suffix])
+$3=''
+_lcl_tmp='xxx'
+while test "[$]_lcl_tmp" != ''; do
+  _lcl_tmp=`expr "x[$]_lcl_first_suffix" : "x[[^/]]*/*\(.*\)"`
+  if test "[$]_lcl_first_suffix" != ''; then
+     _lcl_first_suffix="[$]_lcl_tmp"
+     $3="../[$]$3"
+  fi
+done])

+ 115 - 0
Engine/lib/sdl/acinclude/ax_normalize_path.m4

@@ -0,0 +1,115 @@
+# ===========================================================================
+#    https://www.gnu.org/software/autoconf-archive/ax_normalize_path.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_NORMALIZE_PATH(VARNAME, [REFERENCE_STRING])
+#
+# DESCRIPTION
+#
+#   Perform some cleanups on the value of $VARNAME (interpreted as a path):
+#
+#     - empty paths are changed to '.'
+#     - trailing slashes are removed
+#     - repeated slashes are squeezed except a leading doubled slash '//'
+#       (which might indicate a networked disk on some OS).
+#
+#   REFERENCE_STRING is used to turn '/' into '\' and vice-versa: if
+#   REFERENCE_STRING contains some backslashes, all slashes and backslashes
+#   are turned into backslashes, otherwise they are all turned into slashes.
+#
+#   This makes processing of DOS filenames quite easier, because you can
+#   turn a filename to the Unix notation, make your processing, and turn it
+#   back to original notation.
+#
+#     filename='A:\FOO\\BAR\'
+#     old_filename="$filename"
+#     # Switch to the unix notation
+#     AX_NORMALIZE_PATH([filename], ["/"])
+#     # now we have $filename = 'A:/FOO/BAR' and we can process it as if
+#     # it was a Unix path.  For instance let's say that you want
+#     # to append '/subpath':
+#     filename="$filename/subpath"
+#     # finally switch back to the original notation
+#     AX_NORMALIZE_PATH([filename], ["$old_filename"])
+#     # now $filename equals to 'A:\FOO\BAR\subpath'
+#
+#   One good reason to make all path processing with the unix convention is
+#   that backslashes have a special meaning in many cases. For instance
+#
+#     expr 'A:\FOO' : 'A:\Foo'
+#
+#   will return 0 because the second argument is a regex in which
+#   backslashes have to be backslashed. In other words, to have the two
+#   strings to match you should write this instead:
+#
+#     expr 'A:\Foo' : 'A:\\Foo'
+#
+#   Such behavior makes DOS filenames extremely unpleasant to work with. So
+#   temporary turn your paths to the Unix notation, and revert them to the
+#   original notation after the processing. See the macro
+#   AX_COMPUTE_RELATIVE_PATHS for a concrete example of this.
+#
+#   REFERENCE_STRING defaults to $VARIABLE, this means that slashes will be
+#   converted to backslashes if $VARIABLE already contains some backslashes
+#   (see $thirddir below).
+#
+#     firstdir='/usr/local//share'
+#     seconddir='C:\Program Files\\'
+#     thirddir='C:\home/usr/'
+#     AX_NORMALIZE_PATH([firstdir])
+#     AX_NORMALIZE_PATH([seconddir])
+#     AX_NORMALIZE_PATH([thirddir])
+#     # $firstdir = '/usr/local/share'
+#     # $seconddir = 'C:\Program Files'
+#     # $thirddir = 'C:\home\usr'
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Alexandre Duret-Lutz <[email protected]>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 8
+
+AU_ALIAS([ADL_NORMALIZE_PATH], [AX_NORMALIZE_PATH])
+AC_DEFUN([AX_NORMALIZE_PATH],
+[case ":[$]$1:" in
+# change empty paths to '.'
+  ::) $1='.' ;;
+# strip trailing slashes
+  :*[[\\/]]:) $1=`echo "[$]$1" | sed 's,[[\\/]]*[$],,'` ;;
+  :*:) ;;
+esac
+# squeeze repeated slashes
+case ifelse($2,,"[$]$1",$2) in
+# if the path contains any backslashes, turn slashes into backslashes
+ *\\*) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1\\\\,g'` ;;
+# if the path contains slashes, also turn backslashes into slashes
+ *) $1=`echo "[$]$1" | sed 's,\(.\)[[\\/]][[\\/]]*,\1/,g'` ;;
+esac])

+ 56 - 0
Engine/lib/sdl/acinclude/ax_recursive_eval.m4

@@ -0,0 +1,56 @@
+# ===========================================================================
+#    https://www.gnu.org/software/autoconf-archive/ax_recursive_eval.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+#   AX_RECURSIVE_EVAL(VALUE, RESULT)
+#
+# DESCRIPTION
+#
+#   Interpolate the VALUE in loop until it doesn't change, and set the
+#   result to $RESULT. WARNING: It's easy to get an infinite loop with some
+#   unsane input.
+#
+# LICENSE
+#
+#   Copyright (c) 2008 Alexandre Duret-Lutz <[email protected]>
+#
+#   This program is free software; you can redistribute it and/or modify it
+#   under the terms of the GNU General Public License as published by the
+#   Free Software Foundation; either version 2 of the License, or (at your
+#   option) any later version.
+#
+#   This program is distributed in the hope that it will be useful, but
+#   WITHOUT ANY WARRANTY; without even the implied warranty of
+#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
+#   Public License for more details.
+#
+#   You should have received a copy of the GNU General Public License along
+#   with this program. If not, see <https://www.gnu.org/licenses/>.
+#
+#   As a special exception, the respective Autoconf Macro's copyright owner
+#   gives unlimited permission to copy, distribute and modify the configure
+#   scripts that are the output of Autoconf when processing the Macro. You
+#   need not follow the terms of the GNU General Public License when using
+#   or distributing such scripts, even though portions of the text of the
+#   Macro appear in them. The GNU General Public License (GPL) does govern
+#   all other use of the material that constitutes the Autoconf Macro.
+#
+#   This special exception to the GPL applies to versions of the Autoconf
+#   Macro released by the Autoconf Archive. When you make and distribute a
+#   modified version of the Autoconf Macro, you may extend this special
+#   exception to the GPL to apply to your modified version as well.
+
+#serial 1
+
+AC_DEFUN([AX_RECURSIVE_EVAL],
+[_lcl_receval="$1"
+$2=`(test "x$prefix" = xNONE && prefix="$ac_default_prefix"
+     test "x$exec_prefix" = xNONE && exec_prefix="${prefix}"
+     _lcl_receval_old=''
+     while test "[$]_lcl_receval_old" != "[$]_lcl_receval"; do
+       _lcl_receval_old="[$]_lcl_receval"
+       eval _lcl_receval="\"[$]_lcl_receval\""
+     done
+     echo "[$]_lcl_receval")`])

+ 5 - 4
Engine/lib/sdl/acinclude/esd.m4

@@ -104,10 +104,11 @@ int main (void)
   else
   else
      AC_MSG_RESULT(no)
      AC_MSG_RESULT(no)
      if test "$ESD_CONFIG" = "no" ; then
      if test "$ESD_CONFIG" = "no" ; then
-       echo "*** The esd-config script installed by ESD could not be found"
-       echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
-       echo "*** your path, or set the ESD_CONFIG environment variable to the"
-       echo "*** full path to esd-config."
+dnl       echo "*** The esd-config script installed by ESD could not be found"
+dnl       echo "*** If ESD was installed in PREFIX, make sure PREFIX/bin is in"
+dnl       echo "*** your path, or set the ESD_CONFIG environment variable to the"
+dnl       echo "*** full path to esd-config."
+      :
      else
      else
        if test -f conf.esdtest ; then
        if test -f conf.esdtest ; then
         :
         :

+ 4 - 0
Engine/lib/sdl/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java

@@ -248,7 +248,9 @@ public class HIDDeviceManager {
             0x1689, // Razer Onza
             0x1689, // Razer Onza
             0x1949, // Lab126, Inc.
             0x1949, // Lab126, Inc.
             0x1bad, // Harmonix
             0x1bad, // Harmonix
+            0x20d6, // PowerA
             0x24c6, // PowerA
             0x24c6, // PowerA
+            0x2c22, // Qanba
         };
         };
 
 
         if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
         if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
@@ -274,7 +276,9 @@ public class HIDDeviceManager {
             0x0e6f, // PDP
             0x0e6f, // PDP
             0x0f0d, // Hori
             0x0f0d, // Hori
             0x1532, // Razer Wildcat
             0x1532, // Razer Wildcat
+            0x20d6, // PowerA
             0x24c6, // PowerA
             0x24c6, // PowerA
+            0x2dc8, /* 8BitDo */
             0x2e24, // Hyperkin
             0x2e24, // Hyperkin
         };
         };
 
 

+ 186 - 525
Engine/lib/sdl/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

@@ -15,19 +15,17 @@ import android.content.pm.PackageManager;
 import android.content.res.Configuration;
 import android.content.res.Configuration;
 import android.graphics.Bitmap;
 import android.graphics.Bitmap;
 import android.graphics.Color;
 import android.graphics.Color;
-import android.graphics.PixelFormat;
 import android.graphics.PorterDuff;
 import android.graphics.PorterDuff;
 import android.graphics.drawable.Drawable;
 import android.graphics.drawable.Drawable;
 import android.hardware.Sensor;
 import android.hardware.Sensor;
-import android.hardware.SensorEvent;
-import android.hardware.SensorEventListener;
-import android.hardware.SensorManager;
 import android.net.Uri;
 import android.net.Uri;
 import android.os.Build;
 import android.os.Build;
 import android.os.Bundle;
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Handler;
 import android.os.Message;
 import android.os.Message;
+import android.text.Editable;
 import android.text.InputType;
 import android.text.InputType;
+import android.text.Selection;
 import android.util.DisplayMetrics;
 import android.util.DisplayMetrics;
 import android.util.Log;
 import android.util.Log;
 import android.util.SparseArray;
 import android.util.SparseArray;
@@ -35,11 +33,8 @@ import android.view.Display;
 import android.view.Gravity;
 import android.view.Gravity;
 import android.view.InputDevice;
 import android.view.InputDevice;
 import android.view.KeyEvent;
 import android.view.KeyEvent;
-import android.view.MotionEvent;
 import android.view.PointerIcon;
 import android.view.PointerIcon;
 import android.view.Surface;
 import android.view.Surface;
-import android.view.SurfaceHolder;
-import android.view.SurfaceView;
 import android.view.View;
 import android.view.View;
 import android.view.ViewGroup;
 import android.view.ViewGroup;
 import android.view.Window;
 import android.view.Window;
@@ -49,6 +44,7 @@ import android.view.inputmethod.EditorInfo;
 import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputConnection;
 import android.view.inputmethod.InputMethodManager;
 import android.view.inputmethod.InputMethodManager;
 import android.widget.Button;
 import android.widget.Button;
+import android.widget.EditText;
 import android.widget.LinearLayout;
 import android.widget.LinearLayout;
 import android.widget.RelativeLayout;
 import android.widget.RelativeLayout;
 import android.widget.TextView;
 import android.widget.TextView;
@@ -63,6 +59,9 @@ import java.util.Locale;
 */
 */
 public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
 public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
     private static final String TAG = "SDL";
     private static final String TAG = "SDL";
+    private static final int SDL_MAJOR_VERSION = 2;
+    private static final int SDL_MINOR_VERSION = 26;
+    private static final int SDL_MICRO_VERSION = 5;
 /*
 /*
     // Display InputType.SOURCE/CLASS of events and devices
     // Display InputType.SOURCE/CLASS of events and devices
     //
     //
@@ -84,7 +83,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
 
 
 
 
         int s2 = s_copy & ~InputDevice.SOURCE_ANY; // keep class bits
         int s2 = s_copy & ~InputDevice.SOURCE_ANY; // keep class bits
-        s2 &= ~(  InputDevice.SOURCE_CLASS_BUTTON 
+        s2 &= ~(  InputDevice.SOURCE_CLASS_BUTTON
                 | InputDevice.SOURCE_CLASS_JOYSTICK
                 | InputDevice.SOURCE_CLASS_JOYSTICK
                 | InputDevice.SOURCE_CLASS_POINTER
                 | InputDevice.SOURCE_CLASS_POINTER
                 | InputDevice.SOURCE_CLASS_POSITION
                 | InputDevice.SOURCE_CLASS_POSITION
@@ -94,9 +93,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
 
 
         s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
         s2 = s_copy & InputDevice.SOURCE_ANY; // keep source only, no class;
 
 
-        tst = InputDevice.SOURCE_BLUETOOTH_STYLUS;
-        if ((s & tst) == tst) src += " BLUETOOTH_STYLUS";
-        s2 &= ~tst;
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+            tst = InputDevice.SOURCE_BLUETOOTH_STYLUS;
+            if ((s & tst) == tst) src += " BLUETOOTH_STYLUS";
+            s2 &= ~tst;
+        }
 
 
         tst = InputDevice.SOURCE_DPAD;
         tst = InputDevice.SOURCE_DPAD;
         if ((s & tst) == tst) src += " DPAD";
         if ((s & tst) == tst) src += " DPAD";
@@ -106,9 +107,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         if ((s & tst) == tst) src += " GAMEPAD";
         if ((s & tst) == tst) src += " GAMEPAD";
         s2 &= ~tst;
         s2 &= ~tst;
 
 
-        tst = InputDevice.SOURCE_HDMI;
-        if ((s & tst) == tst) src += " HDMI";
-        s2 &= ~tst;
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
+            tst = InputDevice.SOURCE_HDMI;
+            if ((s & tst) == tst) src += " HDMI";
+            s2 &= ~tst;
+        }
 
 
         tst = InputDevice.SOURCE_JOYSTICK;
         tst = InputDevice.SOURCE_JOYSTICK;
         if ((s & tst) == tst) src += " JOYSTICK";
         if ((s & tst) == tst) src += " JOYSTICK";
@@ -143,9 +146,11 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         if ((s & tst) == tst) src += " TOUCHSCREEN";
         if ((s & tst) == tst) src += " TOUCHSCREEN";
         s2 &= ~tst;
         s2 &= ~tst;
 
 
-        tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
-        if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
-        s2 &= ~tst;
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
+            tst = InputDevice.SOURCE_TOUCH_NAVIGATION;
+            if ((s & tst) == tst) src += " TOUCH_NAVIGATION";
+            s2 &= ~tst;
+        }
 
 
         tst = InputDevice.SOURCE_TRACKBALL;
         tst = InputDevice.SOURCE_TRACKBALL;
         if ((s & tst) == tst) src += " TRACKBALL";
         if ((s & tst) == tst) src += " TRACKBALL";
@@ -205,7 +210,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
     // Main components
     // Main components
     protected static SDLActivity mSingleton;
     protected static SDLActivity mSingleton;
     protected static SDLSurface mSurface;
     protected static SDLSurface mSurface;
-    protected static View mTextEdit;
+    protected static DummyEdit mTextEdit;
     protected static boolean mScreenKeyboardShown;
     protected static boolean mScreenKeyboardShown;
     protected static ViewGroup mLayout;
     protected static ViewGroup mLayout;
     protected static SDLClipboardHandler mClipboardHandler;
     protected static SDLClipboardHandler mClipboardHandler;
@@ -306,6 +311,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         mNextNativeState = NativeState.INIT;
         mNextNativeState = NativeState.INIT;
         mCurrentNativeState = NativeState.INIT;
         mCurrentNativeState = NativeState.INIT;
     }
     }
+    
+    protected SDLSurface createSDLSurface(Context context) {
+        return new SDLSurface(context);
+    }
 
 
     // Setup
     // Setup
     @Override
     @Override
@@ -336,8 +345,18 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
             errorMsgBrokenLib = e.getMessage();
             errorMsgBrokenLib = e.getMessage();
         }
         }
 
 
-        if (mBrokenLibraries)
-        {
+        if (!mBrokenLibraries) {
+            String expected_version = String.valueOf(SDL_MAJOR_VERSION) + "." +
+                                      String.valueOf(SDL_MINOR_VERSION) + "." +
+                                      String.valueOf(SDL_MICRO_VERSION);
+            String version = nativeGetVersion();
+            if (!version.equals(expected_version)) {
+                mBrokenLibraries = true;
+                errorMsgBrokenLib = "SDL C/Java version mismatch (expected " + expected_version + ", got " + version + ")";
+            }
+        }
+
+        if (mBrokenLibraries) {
             mSingleton = this;
             mSingleton = this;
             AlertDialog.Builder dlgAlert  = new AlertDialog.Builder(this);
             AlertDialog.Builder dlgAlert  = new AlertDialog.Builder(this);
             dlgAlert.setMessage("An error occurred while trying to start the application. Please try again and/or reinstall."
             dlgAlert.setMessage("An error occurred while trying to start the application. Please try again and/or reinstall."
@@ -374,7 +393,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         mHIDDeviceManager = HIDDeviceManager.acquire(this);
         mHIDDeviceManager = HIDDeviceManager.acquire(this);
 
 
         // Set up the surface
         // Set up the surface
-        mSurface = new SDLSurface(getApplication());
+        mSurface = createSDLSurface(getApplication());
 
 
         mLayout = new RelativeLayout(this);
         mLayout = new RelativeLayout(this);
         mLayout.addView(mSurface);
         mLayout.addView(mSurface);
@@ -878,6 +897,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
     }
     }
 
 
     // C functions we call
     // C functions we call
+    public static native String nativeGetVersion();
     public static native int nativeSetupJNI();
     public static native int nativeSetupJNI();
     public static native int nativeRunMain(String library, String function, Object arguments);
     public static native int nativeRunMain(String library, String function, Object arguments);
     public static native void nativeLowMemory();
     public static native void nativeLowMemory();
@@ -1212,8 +1232,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
     }
     }
 
 
     // This method is called by SDLControllerManager's API 26 Generic Motion Handler.
     // This method is called by SDLControllerManager's API 26 Generic Motion Handler.
-    public static View getContentView()
-    {
+    public static View getContentView() {
         return mLayout;
         return mLayout;
     }
     }
 
 
@@ -1284,6 +1303,77 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         return event.isPrintingKey() || event.getKeyCode() == KeyEvent.KEYCODE_SPACE;
         return event.isPrintingKey() || event.getKeyCode() == KeyEvent.KEYCODE_SPACE;
     }
     }
 
 
+    public static boolean handleKeyEvent(View v, int keyCode, KeyEvent event, InputConnection ic) {
+        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
+        //
+        // Furthermore, it's possible a game controller has SOURCE_KEYBOARD and
+        // SOURCE_JOYSTICK, while its key events arrive from the keyboard source
+        // So, retrieve the device itself and check all of its sources
+        if (SDLControllerManager.isDeviceSDLJoystick(deviceId)) {
+            // Note that we process events with specific key codes here
+            if (event.getAction() == KeyEvent.ACTION_DOWN) {
+                if (SDLControllerManager.onNativePadDown(deviceId, keyCode) == 0) {
+                    return true;
+                }
+            } else if (event.getAction() == KeyEvent.ACTION_UP) {
+                if (SDLControllerManager.onNativePadUp(deviceId, keyCode) == 0) {
+                    return true;
+                }
+            }
+        }
+
+        if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
+            if (event.getAction() == KeyEvent.ACTION_DOWN) {
+                if (isTextInputEvent(event)) {
+                    if (ic != null) {
+                        ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
+                    } else {
+                        SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
+                    }
+                }
+                onNativeKeyDown(keyCode);
+                return true;
+            } else if (event.getAction() == KeyEvent.ACTION_UP) {
+                onNativeKeyUp(keyCode);
+                return true;
+            }
+        }
+
+        if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
+            // on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
+            // they are ignored here because sending them as mouse input to SDL is messy
+            if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {
+                switch (event.getAction()) {
+                case KeyEvent.ACTION_DOWN:
+                case KeyEvent.ACTION_UP:
+                    // mark the event as handled or it will be handled by system
+                    // handling KEYCODE_BACK by system will call onBackPressed()
+                    return true;
+                }
+            }
+        }
+
+        return false;
+    }
+
     /**
     /**
      * This method is called by SDL using JNI.
      * This method is called by SDL using JNI.
      */
      */
@@ -1801,455 +1891,6 @@ class SDLMain implements Runnable {
     }
     }
 }
 }
 
 
-
-/**
-    SDLSurface. This is what we draw on, so we need to know when it's created
-    in order to do anything useful.
-
-    Because of this, that's where we set up the SDL thread
-*/
-class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
-    View.OnKeyListener, View.OnTouchListener, SensorEventListener  {
-
-    // Sensors
-    protected SensorManager mSensorManager;
-    protected Display mDisplay;
-
-    // Keep track of the surface size to normalize touch events
-    protected float mWidth, mHeight;
-
-    // Is SurfaceView ready for rendering
-    public boolean mIsSurfaceReady;
-
-    // Startup
-    public SDLSurface(Context context) {
-        super(context);
-        getHolder().addCallback(this);
-
-        setFocusable(true);
-        setFocusableInTouchMode(true);
-        requestFocus();
-        setOnKeyListener(this);
-        setOnTouchListener(this);
-
-        mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
-        mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
-
-        setOnGenericMotionListener(SDLActivity.getMotionListener());
-
-        // Some arbitrary defaults to avoid a potential division by zero
-        mWidth = 1.0f;
-        mHeight = 1.0f;
-
-        mIsSurfaceReady = false;
-    }
-
-    public void handlePause() {
-        enableSensor(Sensor.TYPE_ACCELEROMETER, false);
-    }
-
-    public void handleResume() {
-        setFocusable(true);
-        setFocusableInTouchMode(true);
-        requestFocus();
-        setOnKeyListener(this);
-        setOnTouchListener(this);
-        enableSensor(Sensor.TYPE_ACCELEROMETER, true);
-    }
-
-    public Surface getNativeSurface() {
-        return getHolder().getSurface();
-    }
-
-    // Called when we have a valid drawing surface
-    @Override
-    public void surfaceCreated(SurfaceHolder holder) {
-        Log.v("SDL", "surfaceCreated()");
-        SDLActivity.onNativeSurfaceCreated();
-    }
-
-    // Called when we lose the surface
-    @Override
-    public void surfaceDestroyed(SurfaceHolder holder) {
-        Log.v("SDL", "surfaceDestroyed()");
-
-        // Transition to pause, if needed
-        SDLActivity.mNextNativeState = SDLActivity.NativeState.PAUSED;
-        SDLActivity.handleNativeState();
-
-        mIsSurfaceReady = false;
-        SDLActivity.onNativeSurfaceDestroyed();
-    }
-
-    // Called when the surface is resized
-    @Override
-    public void surfaceChanged(SurfaceHolder holder,
-                               int format, int width, int height) {
-        Log.v("SDL", "surfaceChanged()");
-
-        if (SDLActivity.mSingleton == null) {
-            return;
-        }
-
-        mWidth = width;
-        mHeight = height;
-        int nDeviceWidth = width;
-        int nDeviceHeight = height;
-        try
-        {
-            if (Build.VERSION.SDK_INT >= 17) {
-                DisplayMetrics realMetrics = new DisplayMetrics();
-                mDisplay.getRealMetrics( realMetrics );
-                nDeviceWidth = realMetrics.widthPixels;
-                nDeviceHeight = realMetrics.heightPixels;
-            }
-        } catch(Exception ignored) {
-        }
-
-        synchronized(SDLActivity.getContext()) {
-            // In case we're waiting on a size change after going fullscreen, send a notification.
-            SDLActivity.getContext().notifyAll();
-        }
-
-        Log.v("SDL", "Window size: " + width + "x" + height);
-        Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight);
-        SDLActivity.nativeSetScreenResolution(width, height, nDeviceWidth, nDeviceHeight, mDisplay.getRefreshRate());
-        SDLActivity.onNativeResize();
-
-        // Prevent a screen distortion glitch,
-        // for instance when the device is in Landscape and a Portrait App is resumed.
-        boolean skip = false;
-        int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation();
-
-        if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) {
-            if (mWidth > mHeight) {
-               skip = true;
-            }
-        } else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE) {
-            if (mWidth < mHeight) {
-               skip = true;
-            }
-        }
-
-        // Special Patch for Square Resolution: Black Berry Passport
-        if (skip) {
-           double min = Math.min(mWidth, mHeight);
-           double max = Math.max(mWidth, mHeight);
-
-           if (max / min < 1.20) {
-              Log.v("SDL", "Don't skip on such aspect-ratio. Could be a square resolution.");
-              skip = false;
-           }
-        }
-
-        // Don't skip in MultiWindow.
-        if (skip) {
-            if (Build.VERSION.SDK_INT >= 24) {
-                if (SDLActivity.mSingleton.isInMultiWindowMode()) {
-                    Log.v("SDL", "Don't skip in Multi-Window");
-                    skip = false;
-                }
-            }
-        }
-
-        if (skip) {
-           Log.v("SDL", "Skip .. Surface is not ready.");
-           mIsSurfaceReady = false;
-           return;
-        }
-
-        /* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */
-        SDLActivity.onNativeSurfaceChanged();
-
-        /* Surface is ready */
-        mIsSurfaceReady = true;
-
-        SDLActivity.mNextNativeState = SDLActivity.NativeState.RESUMED;
-        SDLActivity.handleNativeState();
-    }
-
-    // Key events
-    @Override
-    public boolean onKey(View  v, int keyCode, KeyEvent event) {
-
-        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
-        //
-        // Furthermore, it's possible a game controller has SOURCE_KEYBOARD and
-        // SOURCE_JOYSTICK, while its key events arrive from the keyboard source
-        // So, retrieve the device itself and check all of its sources
-        if (SDLControllerManager.isDeviceSDLJoystick(deviceId)) {
-            // Note that we process events with specific key codes here
-            if (event.getAction() == KeyEvent.ACTION_DOWN) {
-                if (SDLControllerManager.onNativePadDown(deviceId, keyCode) == 0) {
-                    return true;
-                }
-            } else if (event.getAction() == KeyEvent.ACTION_UP) {
-                if (SDLControllerManager.onNativePadUp(deviceId, keyCode) == 0) {
-                    return true;
-                }
-            }
-        }
-
-        if ((source & InputDevice.SOURCE_KEYBOARD) == InputDevice.SOURCE_KEYBOARD) {
-            if (event.getAction() == KeyEvent.ACTION_DOWN) {
-                if (SDLActivity.isTextInputEvent(event)) {
-                    SDLInputConnection.nativeCommitText(String.valueOf((char) event.getUnicodeChar()), 1);
-                }
-                SDLActivity.onNativeKeyDown(keyCode);
-                return true;
-            } else if (event.getAction() == KeyEvent.ACTION_UP) {
-                SDLActivity.onNativeKeyUp(keyCode);
-                return true;
-            }
-        }
-
-        if ((source & InputDevice.SOURCE_MOUSE) == InputDevice.SOURCE_MOUSE) {
-            // on some devices key events are sent for mouse BUTTON_BACK/FORWARD presses
-            // they are ignored here because sending them as mouse input to SDL is messy
-            if ((keyCode == KeyEvent.KEYCODE_BACK) || (keyCode == KeyEvent.KEYCODE_FORWARD)) {
-                switch (event.getAction()) {
-                case KeyEvent.ACTION_DOWN:
-                case KeyEvent.ACTION_UP:
-                    // mark the event as handled or it will be handled by system
-                    // handling KEYCODE_BACK by system will call onBackPressed()
-                    return true;
-                }
-            }
-        }
-
-        return false;
-    }
-
-    // Touch events
-    @Override
-    public boolean onTouch(View v, MotionEvent event) {
-        /* Ref: http://developer.android.com/training/gestures/multi.html */
-        int touchDevId = event.getDeviceId();
-        final int pointerCount = event.getPointerCount();
-        int action = event.getActionMasked();
-        int pointerFingerId;
-        int i = -1;
-        float x,y,p;
-
-        /*
-         * Prevent id to be -1, since it's used in SDL internal for synthetic events
-         * Appears when using Android emulator, eg:
-         *  adb shell input mouse tap 100 100
-         *  adb shell input touchscreen tap 100 100
-         */
-        if (touchDevId < 0) {
-            touchDevId -= 1;
-        }
-
-        // 12290 = Samsung DeX mode desktop mouse
-        // 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN
-        // 0x2   = SOURCE_CLASS_POINTER
-        if (event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN)) {
-            int mouseButton = 1;
-            try {
-                Object object = event.getClass().getMethod("getButtonState").invoke(event);
-                if (object != null) {
-                    mouseButton = (Integer) object;
-                }
-            } catch(Exception ignored) {
-            }
-
-            // We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
-            // if we are.  We'll leverage our existing mouse motion listener
-            SDLGenericMotionListener_API12 motionListener = SDLActivity.getMotionListener();
-            x = motionListener.getEventX(event);
-            y = motionListener.getEventY(event);
-
-            SDLActivity.onNativeMouse(mouseButton, action, x, y, motionListener.inRelativeMode());
-        } else {
-            switch(action) {
-                case MotionEvent.ACTION_MOVE:
-                    for (i = 0; i < pointerCount; i++) {
-                        pointerFingerId = event.getPointerId(i);
-                        x = event.getX(i) / mWidth;
-                        y = event.getY(i) / mHeight;
-                        p = event.getPressure(i);
-                        if (p > 1.0f) {
-                            // may be larger than 1.0f on some devices
-                            // see the documentation of getPressure(i)
-                            p = 1.0f;
-                        }
-                        SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
-                    }
-                    break;
-
-                case MotionEvent.ACTION_UP:
-                case MotionEvent.ACTION_DOWN:
-                    // Primary pointer up/down, the index is always zero
-                    i = 0;
-                    /* fallthrough */
-                case MotionEvent.ACTION_POINTER_UP:
-                case MotionEvent.ACTION_POINTER_DOWN:
-                    // Non primary pointer up/down
-                    if (i == -1) {
-                        i = event.getActionIndex();
-                    }
-
-                    pointerFingerId = event.getPointerId(i);
-                    x = event.getX(i) / mWidth;
-                    y = event.getY(i) / mHeight;
-                    p = event.getPressure(i);
-                    if (p > 1.0f) {
-                        // may be larger than 1.0f on some devices
-                        // see the documentation of getPressure(i)
-                        p = 1.0f;
-                    }
-                    SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
-                    break;
-
-                case MotionEvent.ACTION_CANCEL:
-                    for (i = 0; i < pointerCount; i++) {
-                        pointerFingerId = event.getPointerId(i);
-                        x = event.getX(i) / mWidth;
-                        y = event.getY(i) / mHeight;
-                        p = event.getPressure(i);
-                        if (p > 1.0f) {
-                            // may be larger than 1.0f on some devices
-                            // see the documentation of getPressure(i)
-                            p = 1.0f;
-                        }
-                        SDLActivity.onNativeTouch(touchDevId, pointerFingerId, MotionEvent.ACTION_UP, x, y, p);
-                    }
-                    break;
-
-                default:
-                    break;
-            }
-        }
-
-        return true;
-   }
-
-    // Sensor events
-    public void enableSensor(int sensortype, boolean enabled) {
-        // TODO: This uses getDefaultSensor - what if we have >1 accels?
-        if (enabled) {
-            mSensorManager.registerListener(this,
-                            mSensorManager.getDefaultSensor(sensortype),
-                            SensorManager.SENSOR_DELAY_GAME, null);
-        } else {
-            mSensorManager.unregisterListener(this,
-                            mSensorManager.getDefaultSensor(sensortype));
-        }
-    }
-
-    @Override
-    public void onAccuracyChanged(Sensor sensor, int accuracy) {
-        // TODO
-    }
-
-    @Override
-    public void onSensorChanged(SensorEvent event) {
-        if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
-
-            // Since we may have an orientation set, we won't receive onConfigurationChanged events.
-            // We thus should check here.
-            int newOrientation;
-
-            float x, y;
-            switch (mDisplay.getRotation()) {
-                case Surface.ROTATION_90:
-                    x = -event.values[1];
-                    y = event.values[0];
-                    newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE;
-                    break;
-                case Surface.ROTATION_270:
-                    x = event.values[1];
-                    y = -event.values[0];
-                    newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
-                    break;
-                case Surface.ROTATION_180:
-                    x = -event.values[0];
-                    y = -event.values[1];
-                    newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
-                    break;
-                case Surface.ROTATION_0:
-                default:
-                    x = event.values[0];
-                    y = event.values[1];
-                    newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT;
-                    break;
-            }
-
-            if (newOrientation != SDLActivity.mCurrentOrientation) {
-                SDLActivity.mCurrentOrientation = newOrientation;
-                SDLActivity.onNativeOrientationChanged(newOrientation);
-            }
-
-            SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
-                                      y / SensorManager.GRAVITY_EARTH,
-                                      event.values[2] / SensorManager.GRAVITY_EARTH);
-
-
-        }
-    }
-
-    // Captured pointer events for API 26.
-    public boolean onCapturedPointerEvent(MotionEvent event)
-    {
-        int action = event.getActionMasked();
-
-        float x, y;
-        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:
-            case MotionEvent.ACTION_MOVE:
-                x = event.getX(0);
-                y = event.getY(0);
-                SDLActivity.onNativeMouse(0, action, x, y, true);
-                return true;
-
-            case MotionEvent.ACTION_BUTTON_PRESS:
-            case MotionEvent.ACTION_BUTTON_RELEASE:
-
-                // Change our action value to what SDL's code expects.
-                if (action == MotionEvent.ACTION_BUTTON_PRESS) {
-                    action = MotionEvent.ACTION_DOWN;
-                } else { /* MotionEvent.ACTION_BUTTON_RELEASE */
-                    action = MotionEvent.ACTION_UP;
-                }
-
-                x = event.getX(0);
-                y = event.getY(0);
-                int button = event.getButtonState();
-
-                SDLActivity.onNativeMouse(button, action, x, y, true);
-                return true;
-        }
-
-        return false;
-    }
-
-}
-
 /* This is a fake invisible editor view that receives the input and defines the
 /* This is a fake invisible editor view that receives the input and defines the
  * pan&scan region
  * pan&scan region
  */
  */
@@ -2270,21 +1911,7 @@ class DummyEdit extends View implements View.OnKeyListener {
 
 
     @Override
     @Override
     public boolean onKey(View v, int keyCode, KeyEvent event) {
     public boolean onKey(View v, int keyCode, KeyEvent event) {
-        /*
-         * This handles the hardware keyboard input
-         */
-        if (event.getAction() == KeyEvent.ACTION_DOWN) {
-            if (SDLActivity.isTextInputEvent(event)) {
-                ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
-                return true;
-            }
-            SDLActivity.onNativeKeyDown(keyCode);
-            return true;
-        } else if (event.getAction() == KeyEvent.ACTION_UP) {
-            SDLActivity.onNativeKeyUp(keyCode);
-            return true;
-        }
-        return false;
+        return SDLActivity.handleKeyEvent(v, keyCode, event, ic);
     }
     }
 
 
     //
     //
@@ -2308,9 +1935,10 @@ class DummyEdit extends View implements View.OnKeyListener {
     public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
     public InputConnection onCreateInputConnection(EditorInfo outAttrs) {
         ic = new SDLInputConnection(this, true);
         ic = new SDLInputConnection(this, true);
 
 
-        outAttrs.inputType = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD;
-        outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI
-                | EditorInfo.IME_FLAG_NO_FULLSCREEN /* API 11 */;
+        outAttrs.inputType = InputType.TYPE_CLASS_TEXT |
+                             InputType.TYPE_TEXT_FLAG_MULTI_LINE;
+        outAttrs.imeOptions = EditorInfo.IME_FLAG_NO_EXTRACT_UI |
+                              EditorInfo.IME_FLAG_NO_FULLSCREEN /* API 11 */;
 
 
         return ic;
         return ic;
     }
     }
@@ -2318,9 +1946,17 @@ class DummyEdit extends View implements View.OnKeyListener {
 
 
 class SDLInputConnection extends BaseInputConnection {
 class SDLInputConnection extends BaseInputConnection {
 
 
+    protected EditText mEditText;
+    protected String mCommittedText = "";
+
     public SDLInputConnection(View targetView, boolean fullEditor) {
     public SDLInputConnection(View targetView, boolean fullEditor) {
         super(targetView, fullEditor);
         super(targetView, fullEditor);
+        mEditText = new EditText(SDL.getContext());
+    }
 
 
+    @Override
+    public Editable getEditable() {
+        return mEditText.getEditableText();
     }
     }
 
 
     @Override
     @Override
@@ -2343,59 +1979,84 @@ class SDLInputConnection extends BaseInputConnection {
             }
             }
         }
         }
 
 
-
         return super.sendKeyEvent(event);
         return super.sendKeyEvent(event);
     }
     }
 
 
     @Override
     @Override
     public boolean commitText(CharSequence text, int newCursorPosition) {
     public boolean commitText(CharSequence text, int newCursorPosition) {
-
-        for (int i = 0; i < text.length(); i++) {
-            char c = text.charAt(i);
-            if (c == '\n') {
-                if (SDLActivity.onNativeSoftReturnKey()) {
-                    return true;
-                }
-            }
-            nativeGenerateScancodeForUnichar(c);
+        if (!super.commitText(text, newCursorPosition)) {
+            return false;
         }
         }
-
-        SDLInputConnection.nativeCommitText(text.toString(), newCursorPosition);
-
-        return super.commitText(text, newCursorPosition);
+        updateText();
+        return true;
     }
     }
 
 
     @Override
     @Override
     public boolean setComposingText(CharSequence text, int newCursorPosition) {
     public boolean setComposingText(CharSequence text, int newCursorPosition) {
-
-        nativeSetComposingText(text.toString(), newCursorPosition);
-
-        return super.setComposingText(text, newCursorPosition);
+        if (!super.setComposingText(text, newCursorPosition)) {
+            return false;
+        }
+        updateText();
+        return true;
     }
     }
 
 
-    public static native void nativeCommitText(String text, int newCursorPosition);
+    @Override
+    public boolean deleteSurroundingText(int beforeLength, int afterLength) {
+        if (!super.deleteSurroundingText(beforeLength, afterLength)) {
+            return false;
+        }
+        updateText();
+        return true;
+    }
 
 
-    public native void nativeGenerateScancodeForUnichar(char c);
+    protected void updateText() {
+        final Editable content = getEditable();
+        if (content == null) {
+            return;
+        }
 
 
-    public native void nativeSetComposingText(String text, int newCursorPosition);
+        String text = content.toString();
+        int compareLength = Math.min(text.length(), mCommittedText.length());
+        int matchLength, offset;
 
 
-    @Override
-    public boolean deleteSurroundingText(int beforeLength, int afterLength) {
-        // Workaround to capture backspace key. Ref: http://stackoverflow.com/questions/14560344/android-backspace-in-webview-baseinputconnection
-        // and https://bugzilla.libsdl.org/show_bug.cgi?id=2265
-        if (beforeLength > 0 && afterLength == 0) {
-            boolean ret = true;
-            // backspace(s)
-            while (beforeLength-- > 0) {
-               boolean ret_key = sendKeyEvent(new KeyEvent(KeyEvent.ACTION_DOWN, KeyEvent.KEYCODE_DEL))
-                              && sendKeyEvent(new KeyEvent(KeyEvent.ACTION_UP, KeyEvent.KEYCODE_DEL));
-               ret = ret && ret_key;
+        /* Backspace over characters that are no longer in the string */
+        for (matchLength = 0; matchLength < compareLength; ) {
+            int codePoint = mCommittedText.codePointAt(matchLength);
+            if (codePoint != text.codePointAt(matchLength)) {
+                break;
+            }
+            matchLength += Character.charCount(codePoint);
+        }
+        /* FIXME: This doesn't handle graphemes, like '🌬️' */
+        for (offset = matchLength; offset < mCommittedText.length(); ) {
+            int codePoint = mCommittedText.codePointAt(offset);
+            nativeGenerateScancodeForUnichar('\b');
+            offset += Character.charCount(codePoint);
+        }
+
+        if (matchLength < text.length()) {
+            String pendingText = text.subSequence(matchLength, text.length()).toString();
+            for (offset = 0; offset < pendingText.length(); ) {
+                int codePoint = pendingText.codePointAt(offset);
+                if (codePoint == '\n') {
+                    if (SDLActivity.onNativeSoftReturnKey()) {
+                        return;
+                    }
+                }
+                /* Higher code points don't generate simulated scancodes */
+                if (codePoint < 128) {
+                    nativeGenerateScancodeForUnichar((char)codePoint);
+                }
+                offset += Character.charCount(codePoint);
             }
             }
-            return ret;
+            SDLInputConnection.nativeCommitText(pendingText, 0);
         }
         }
-
-        return super.deleteSurroundingText(beforeLength, afterLength);
+        mCommittedText = text;
     }
     }
+
+    public static native void nativeCommitText(String text, int newCursorPosition);
+
+    public static native void nativeGenerateScancodeForUnichar(char c);
 }
 }
 
 
 class SDLClipboardHandler implements
 class SDLClipboardHandler implements

+ 26 - 0
Engine/lib/sdl/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java

@@ -168,6 +168,32 @@ class SDLJoystickHandler_API16 extends SDLJoystickHandler {
                 arg1Axis = MotionEvent.AXIS_GAS;
                 arg1Axis = MotionEvent.AXIS_GAS;
             }
             }
 
 
+            // Make sure the AXIS_Z is sorted between AXIS_RY and AXIS_RZ.
+            // This is because the usual pairing are:
+            // - AXIS_X + AXIS_Y (left stick).
+            // - AXIS_RX, AXIS_RY (sometimes the right stick, sometimes triggers).
+            // - AXIS_Z, AXIS_RZ (sometimes the right stick, sometimes triggers).
+            // This sorts the axes in the above order, which tends to be correct
+            // for Xbox-ish game pads that have the right stick on RX/RY and the
+            // triggers on Z/RZ.
+            //
+            // Gamepads that don't have AXIS_Z/AXIS_RZ but use
+            // AXIS_LTRIGGER/AXIS_RTRIGGER are unaffected by this.
+            //
+            // References:
+            // - https://developer.android.com/develop/ui/views/touch-and-input/game-controllers/controller-input
+            // - https://www.kernel.org/doc/html/latest/input/gamepad.html
+            if (arg0Axis == MotionEvent.AXIS_Z) {
+                arg0Axis = MotionEvent.AXIS_RZ - 1;
+            } else if (arg0Axis > MotionEvent.AXIS_Z && arg0Axis < MotionEvent.AXIS_RZ) {
+                --arg0Axis;
+            }
+            if (arg1Axis == MotionEvent.AXIS_Z) {
+                arg1Axis = MotionEvent.AXIS_RZ - 1;
+            } else if (arg1Axis > MotionEvent.AXIS_Z && arg1Axis < MotionEvent.AXIS_RZ) {
+                --arg1Axis;
+            }
+
             return arg0Axis - arg1Axis;
             return arg0Axis - arg1Axis;
         }
         }
     }
     }

+ 405 - 0
Engine/lib/sdl/android-project/app/src/main/java/org/libsdl/app/SDLSurface.java

@@ -0,0 +1,405 @@
+package org.libsdl.app;
+
+
+import android.content.Context;
+import android.content.pm.ActivityInfo;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener;
+import android.hardware.SensorManager;
+import android.os.Build;
+import android.util.DisplayMetrics;
+import android.util.Log;
+import android.view.Display;
+import android.view.InputDevice;
+import android.view.KeyEvent;
+import android.view.MotionEvent;
+import android.view.Surface;
+import android.view.SurfaceHolder;
+import android.view.SurfaceView;
+import android.view.View;
+import android.view.WindowManager;
+
+
+/**
+    SDLSurface. This is what we draw on, so we need to know when it's created
+    in order to do anything useful.
+
+    Because of this, that's where we set up the SDL thread
+*/
+public class SDLSurface extends SurfaceView implements SurfaceHolder.Callback,
+    View.OnKeyListener, View.OnTouchListener, SensorEventListener  {
+
+    // Sensors
+    protected SensorManager mSensorManager;
+    protected Display mDisplay;
+
+    // Keep track of the surface size to normalize touch events
+    protected float mWidth, mHeight;
+
+    // Is SurfaceView ready for rendering
+    public boolean mIsSurfaceReady;
+
+    // Startup
+    public SDLSurface(Context context) {
+        super(context);
+        getHolder().addCallback(this);
+
+        setFocusable(true);
+        setFocusableInTouchMode(true);
+        requestFocus();
+        setOnKeyListener(this);
+        setOnTouchListener(this);
+
+        mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
+        mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
+
+        setOnGenericMotionListener(SDLActivity.getMotionListener());
+
+        // Some arbitrary defaults to avoid a potential division by zero
+        mWidth = 1.0f;
+        mHeight = 1.0f;
+
+        mIsSurfaceReady = false;
+    }
+
+    public void handlePause() {
+        enableSensor(Sensor.TYPE_ACCELEROMETER, false);
+    }
+
+    public void handleResume() {
+        setFocusable(true);
+        setFocusableInTouchMode(true);
+        requestFocus();
+        setOnKeyListener(this);
+        setOnTouchListener(this);
+        enableSensor(Sensor.TYPE_ACCELEROMETER, true);
+    }
+
+    public Surface getNativeSurface() {
+        return getHolder().getSurface();
+    }
+
+    // Called when we have a valid drawing surface
+    @Override
+    public void surfaceCreated(SurfaceHolder holder) {
+        Log.v("SDL", "surfaceCreated()");
+        SDLActivity.onNativeSurfaceCreated();
+    }
+
+    // Called when we lose the surface
+    @Override
+    public void surfaceDestroyed(SurfaceHolder holder) {
+        Log.v("SDL", "surfaceDestroyed()");
+
+        // Transition to pause, if needed
+        SDLActivity.mNextNativeState = SDLActivity.NativeState.PAUSED;
+        SDLActivity.handleNativeState();
+
+        mIsSurfaceReady = false;
+        SDLActivity.onNativeSurfaceDestroyed();
+    }
+
+    // Called when the surface is resized
+    @Override
+    public void surfaceChanged(SurfaceHolder holder,
+                               int format, int width, int height) {
+        Log.v("SDL", "surfaceChanged()");
+
+        if (SDLActivity.mSingleton == null) {
+            return;
+        }
+
+        mWidth = width;
+        mHeight = height;
+        int nDeviceWidth = width;
+        int nDeviceHeight = height;
+        try
+        {
+            if (Build.VERSION.SDK_INT >= 17) {
+                DisplayMetrics realMetrics = new DisplayMetrics();
+                mDisplay.getRealMetrics( realMetrics );
+                nDeviceWidth = realMetrics.widthPixels;
+                nDeviceHeight = realMetrics.heightPixels;
+            }
+        } catch(Exception ignored) {
+        }
+
+        synchronized(SDLActivity.getContext()) {
+            // In case we're waiting on a size change after going fullscreen, send a notification.
+            SDLActivity.getContext().notifyAll();
+        }
+
+        Log.v("SDL", "Window size: " + width + "x" + height);
+        Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight);
+        SDLActivity.nativeSetScreenResolution(width, height, nDeviceWidth, nDeviceHeight, mDisplay.getRefreshRate());
+        SDLActivity.onNativeResize();
+
+        // Prevent a screen distortion glitch,
+        // for instance when the device is in Landscape and a Portrait App is resumed.
+        boolean skip = false;
+        int requestedOrientation = SDLActivity.mSingleton.getRequestedOrientation();
+
+        if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_PORTRAIT || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT) {
+            if (mWidth > mHeight) {
+               skip = true;
+            }
+        } else if (requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE || requestedOrientation == ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE) {
+            if (mWidth < mHeight) {
+               skip = true;
+            }
+        }
+
+        // Special Patch for Square Resolution: Black Berry Passport
+        if (skip) {
+           double min = Math.min(mWidth, mHeight);
+           double max = Math.max(mWidth, mHeight);
+
+           if (max / min < 1.20) {
+              Log.v("SDL", "Don't skip on such aspect-ratio. Could be a square resolution.");
+              skip = false;
+           }
+        }
+
+        // Don't skip in MultiWindow.
+        if (skip) {
+            if (Build.VERSION.SDK_INT >= 24) {
+                if (SDLActivity.mSingleton.isInMultiWindowMode()) {
+                    Log.v("SDL", "Don't skip in Multi-Window");
+                    skip = false;
+                }
+            }
+        }
+
+        if (skip) {
+           Log.v("SDL", "Skip .. Surface is not ready.");
+           mIsSurfaceReady = false;
+           return;
+        }
+
+        /* If the surface has been previously destroyed by onNativeSurfaceDestroyed, recreate it here */
+        SDLActivity.onNativeSurfaceChanged();
+
+        /* Surface is ready */
+        mIsSurfaceReady = true;
+
+        SDLActivity.mNextNativeState = SDLActivity.NativeState.RESUMED;
+        SDLActivity.handleNativeState();
+    }
+
+    // Key events
+    @Override
+    public boolean onKey(View v, int keyCode, KeyEvent event) {
+        return SDLActivity.handleKeyEvent(v, keyCode, event, null);
+    }
+
+    // Touch events
+    @Override
+    public boolean onTouch(View v, MotionEvent event) {
+        /* Ref: http://developer.android.com/training/gestures/multi.html */
+        int touchDevId = event.getDeviceId();
+        final int pointerCount = event.getPointerCount();
+        int action = event.getActionMasked();
+        int pointerFingerId;
+        int i = -1;
+        float x,y,p;
+
+        /*
+         * Prevent id to be -1, since it's used in SDL internal for synthetic events
+         * Appears when using Android emulator, eg:
+         *  adb shell input mouse tap 100 100
+         *  adb shell input touchscreen tap 100 100
+         */
+        if (touchDevId < 0) {
+            touchDevId -= 1;
+        }
+
+        // 12290 = Samsung DeX mode desktop mouse
+        // 12290 = 0x3002 = 0x2002 | 0x1002 = SOURCE_MOUSE | SOURCE_TOUCHSCREEN
+        // 0x2   = SOURCE_CLASS_POINTER
+        if (event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == (InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN)) {
+            int mouseButton = 1;
+            try {
+                Object object = event.getClass().getMethod("getButtonState").invoke(event);
+                if (object != null) {
+                    mouseButton = (Integer) object;
+                }
+            } catch(Exception ignored) {
+            }
+
+            // We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
+            // if we are.  We'll leverage our existing mouse motion listener
+            SDLGenericMotionListener_API12 motionListener = SDLActivity.getMotionListener();
+            x = motionListener.getEventX(event);
+            y = motionListener.getEventY(event);
+
+            SDLActivity.onNativeMouse(mouseButton, action, x, y, motionListener.inRelativeMode());
+        } else {
+            switch(action) {
+                case MotionEvent.ACTION_MOVE:
+                    for (i = 0; i < pointerCount; i++) {
+                        pointerFingerId = event.getPointerId(i);
+                        x = event.getX(i) / mWidth;
+                        y = event.getY(i) / mHeight;
+                        p = event.getPressure(i);
+                        if (p > 1.0f) {
+                            // may be larger than 1.0f on some devices
+                            // see the documentation of getPressure(i)
+                            p = 1.0f;
+                        }
+                        SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
+                    }
+                    break;
+
+                case MotionEvent.ACTION_UP:
+                case MotionEvent.ACTION_DOWN:
+                    // Primary pointer up/down, the index is always zero
+                    i = 0;
+                    /* fallthrough */
+                case MotionEvent.ACTION_POINTER_UP:
+                case MotionEvent.ACTION_POINTER_DOWN:
+                    // Non primary pointer up/down
+                    if (i == -1) {
+                        i = event.getActionIndex();
+                    }
+
+                    pointerFingerId = event.getPointerId(i);
+                    x = event.getX(i) / mWidth;
+                    y = event.getY(i) / mHeight;
+                    p = event.getPressure(i);
+                    if (p > 1.0f) {
+                        // may be larger than 1.0f on some devices
+                        // see the documentation of getPressure(i)
+                        p = 1.0f;
+                    }
+                    SDLActivity.onNativeTouch(touchDevId, pointerFingerId, action, x, y, p);
+                    break;
+
+                case MotionEvent.ACTION_CANCEL:
+                    for (i = 0; i < pointerCount; i++) {
+                        pointerFingerId = event.getPointerId(i);
+                        x = event.getX(i) / mWidth;
+                        y = event.getY(i) / mHeight;
+                        p = event.getPressure(i);
+                        if (p > 1.0f) {
+                            // may be larger than 1.0f on some devices
+                            // see the documentation of getPressure(i)
+                            p = 1.0f;
+                        }
+                        SDLActivity.onNativeTouch(touchDevId, pointerFingerId, MotionEvent.ACTION_UP, x, y, p);
+                    }
+                    break;
+
+                default:
+                    break;
+            }
+        }
+
+        return true;
+   }
+
+    // Sensor events
+    public void enableSensor(int sensortype, boolean enabled) {
+        // TODO: This uses getDefaultSensor - what if we have >1 accels?
+        if (enabled) {
+            mSensorManager.registerListener(this,
+                            mSensorManager.getDefaultSensor(sensortype),
+                            SensorManager.SENSOR_DELAY_GAME, null);
+        } else {
+            mSensorManager.unregisterListener(this,
+                            mSensorManager.getDefaultSensor(sensortype));
+        }
+    }
+
+    @Override
+    public void onAccuracyChanged(Sensor sensor, int accuracy) {
+        // TODO
+    }
+
+    @Override
+    public void onSensorChanged(SensorEvent event) {
+        if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {
+
+            // Since we may have an orientation set, we won't receive onConfigurationChanged events.
+            // We thus should check here.
+            int newOrientation;
+
+            float x, y;
+            switch (mDisplay.getRotation()) {
+                case Surface.ROTATION_90:
+                    x = -event.values[1];
+                    y = event.values[0];
+                    newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE;
+                    break;
+                case Surface.ROTATION_270:
+                    x = event.values[1];
+                    y = -event.values[0];
+                    newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
+                    break;
+                case Surface.ROTATION_180:
+                    x = -event.values[0];
+                    y = -event.values[1];
+                    newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
+                    break;
+                case Surface.ROTATION_0:
+                default:
+                    x = event.values[0];
+                    y = event.values[1];
+                    newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT;
+                    break;
+            }
+
+            if (newOrientation != SDLActivity.mCurrentOrientation) {
+                SDLActivity.mCurrentOrientation = newOrientation;
+                SDLActivity.onNativeOrientationChanged(newOrientation);
+            }
+
+            SDLActivity.onNativeAccel(-x / SensorManager.GRAVITY_EARTH,
+                                      y / SensorManager.GRAVITY_EARTH,
+                                      event.values[2] / SensorManager.GRAVITY_EARTH);
+
+
+        }
+    }
+
+    // Captured pointer events for API 26.
+    public boolean onCapturedPointerEvent(MotionEvent event)
+    {
+        int action = event.getActionMasked();
+
+        float x, y;
+        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:
+            case MotionEvent.ACTION_MOVE:
+                x = event.getX(0);
+                y = event.getY(0);
+                SDLActivity.onNativeMouse(0, action, x, y, true);
+                return true;
+
+            case MotionEvent.ACTION_BUTTON_PRESS:
+            case MotionEvent.ACTION_BUTTON_RELEASE:
+
+                // Change our action value to what SDL's code expects.
+                if (action == MotionEvent.ACTION_BUTTON_PRESS) {
+                    action = MotionEvent.ACTION_DOWN;
+                } else { /* MotionEvent.ACTION_BUTTON_RELEASE */
+                    action = MotionEvent.ACTION_UP;
+                }
+
+                x = event.getX(0);
+                y = event.getY(0);
+                int button = event.getButtonState();
+
+                SDLActivity.onNativeMouse(button, action, x, y, true);
+                return true;
+        }
+
+        return false;
+    }
+}

+ 351 - 0
Engine/lib/sdl/build-scripts/android-prefab.sh

@@ -0,0 +1,351 @@
+#!/bin/bash
+
+set -e
+
+if ! [ "x$ANDROID_NDK_HOME" != "x" -a -d "$ANDROID_NDK_HOME" ]; then
+    echo "ANDROID_NDK_HOME environment variable is not set"
+    exit 1
+fi
+
+if ! [ "x$ANDROID_HOME" != "x" -a -d "$ANDROID_HOME" ]; then
+    echo "ANDROID_HOME environment variable is not set"
+    exit 1
+fi
+
+if [ "x$ANDROID_API" = "x" ]; then
+    ANDROID_API="$(ls "$ANDROID_HOME/platforms" | grep -E "^android-[0-9]+$" | sed 's/android-//' | sort -n -r | head -1)"
+    if [ "x$ANDROID_API" = "x" ]; then
+        echo "No Android platform found in $ANDROID_HOME/platforms"
+        exit 1
+    fi
+else
+    if ! [ -d "$ANDROID_HOME/platforms/android-$ANDROID_API" ]; then
+        echo "Android api version $ANDROID_API is not available ($ANDROID_HOME/platforms/android-$ANDROID_API does not exist)" >2
+        exit 1
+    fi
+fi
+
+android_platformdir="$ANDROID_HOME/platforms/android-$ANDROID_API"
+
+echo "Building for android api version $ANDROID_API"
+echo "android_platformdir=$android_platformdir"
+
+scriptdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
+sdl_root=$(cd -P -- "$(dirname -- "$0")/.." && printf '%s\n' "$(pwd -P)")
+
+build_root="${sdl_root}/build-android-prefab"
+
+android_abis="armeabi-v7a arm64-v8a x86 x86_64"
+android_api=19
+android_ndk=21
+android_stl="c++_shared"
+
+sdl_major=$(sed -ne 's/^#define SDL_MAJOR_VERSION  *//p' "${sdl_root}/include/SDL_version.h")
+sdl_minor=$(sed -ne 's/^#define SDL_MINOR_VERSION  *//p' "${sdl_root}/include/SDL_version.h")
+sdl_patch=$(sed -ne 's/^#define SDL_PATCHLEVEL  *//p' "${sdl_root}/include/SDL_version.h")
+sdl_version="${sdl_major}.${sdl_minor}.${sdl_patch}"
+echo "Building Android prefab package for SDL version $sdl_version"
+
+prefabhome="${build_root}/prefab-${sdl_version}"
+rm -rf "$prefabhome"
+mkdir -p "${prefabhome}"
+
+build_cmake_projects() {
+    for android_abi in $android_abis; do
+        echo "Configuring CMake project for $android_abi"
+        cmake -S "$sdl_root" -B "${build_root}/build_${android_abi}" \
+            -DCMAKE_TOOLCHAIN_FILE="$ANDROID_NDK_HOME/build/cmake/android.toolchain.cmake" \
+            -DANDROID_PLATFORM=${android_platform} \
+            -DANDROID_ABI=${android_abi} \
+            -DSDL_SHARED=ON \
+            -DSDL_STATIC=ON \
+            -DSDL_STATIC_PIC=ON \
+            -DSDL_TEST=ON \
+            -DSDL2_DISABLE_SDL2MAIN=OFF \
+            -DSDL2_DISABLE_INSTALL=OFF \
+            -DCMAKE_INSTALL_PREFIX="${build_root}/build_${android_abi}/prefix" \
+            -DCMAKE_INSTALL_INCLUDEDIR=include \
+            -DCMAKE_INSTALL_LIBDIR=lib \
+            -DCMAKE_BUILD_TYPE=Release \
+            -GNinja
+
+        rm -rf "${build_root}/build_${android_abi}/prefix"
+
+        echo "Building CMake project for $android_abi"
+        cmake --build "${build_root}/build_${android_abi}"
+
+        echo "Installing CMake project for $android_abi"
+        cmake --install "${build_root}/build_${android_abi}"
+    done
+}
+
+classes_sources_jar_path="${prefabhome}/classes-sources.jar"
+classes_jar_path="${prefabhome}/classes.jar"
+compile_java() {
+    classes_sources_root="${prefabhome}/classes-sources"
+
+    rm -rf "${classes_sources_root}"
+    mkdir -p "${classes_sources_root}/META-INF"
+
+    echo "Copying LICENSE.txt to java build folder"
+    cp "$sdl_root/LICENSE.txt" "${classes_sources_root}/META-INF"
+
+    echo "Copy JAVA sources to java build folder"
+    cp -r "$sdl_root/android-project/app/src/main/java/org" "${classes_sources_root}"
+
+    java_sourceslist_path="${prefabhome}/java_sources.txt"
+    pushd "${classes_sources_root}"
+        echo "Collecting sources for classes-sources.jar"
+        find "." -name "*.java" >"${java_sourceslist_path}"
+        find "META-INF" -name "*" >>"${java_sourceslist_path}"
+
+        echo "Creating classes-sources.jar"
+        jar -cf "${classes_sources_jar_path}" "@${java_sourceslist_path}"
+    popd
+
+    classes_root="${prefabhome}/classes"
+    mkdir -p "${classes_root}/META-INF"
+    cp "$sdl_root/LICENSE.txt" "${classes_root}/META-INF"
+    java_sourceslist_path="${prefabhome}/java_sources.txt"
+
+    echo "Collecting sources for classes.jar"
+    find "$sdl_root/android-project/app/src/main/java" -name "*.java" >"${java_sourceslist_path}"
+
+    echo "Compiling classes"
+    javac -encoding utf-8 -classpath "$android_platformdir/android.jar" -d "${classes_root}" "@${java_sourceslist_path}"
+
+    java_classeslist_path="${prefabhome}/java_classes.txt"
+    pushd "${classes_root}"
+        find "." -name "*.class" >"${java_classeslist_path}"
+        find "META-INF" -name "*" >>"${java_classeslist_path}"
+        echo "Creating classes.jar"
+        jar -cf "${classes_jar_path}" "@${java_classeslist_path}"
+    popd
+}
+
+pom_filename="SDL${sdl_major}-${sdl_version}.pom"
+pom_filepath="${prefabhome}/${pom_filename}"
+create_pom_xml() {
+    echo "Creating ${pom_filename}"
+    cat >"${pom_filepath}" <<EOF
+<project>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.libsdl.android</groupId>
+  <artifactId>SDL${sdl_major}</artifactId>
+  <version>${sdl_version}</version>
+  <packaging>aar</packaging>
+  <name>SDL${sdl_major}</name>
+  <description>The AAR for SDL${sdl_major}</description>
+  <url>https://libsdl.org/</url>
+  <licenses>
+    <license>
+      <name>zlib License</name>
+      <url>https://github.com/libsdl-org/SDL/blob/main/LICENSE.txt</url>
+      <distribution>repo</distribution>
+    </license>
+  </licenses>
+  <scm>
+    <connection>scm:git:https://github.com/libsdl-org/SDL</connection>
+    <url>https://github.com/libsdl-org/SDL</url>
+  </scm>
+</project>
+EOF
+}
+
+create_aar_androidmanifest() {
+    echo "Creating AndroidManifest.xml"
+    cat >"${aar_root}/AndroidManifest.xml" <<EOF
+<manifest
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    package="org.libsdl.android" android:versionCode="1"
+    android:versionName="1.0">
+	<uses-sdk android:minSdkVersion="16"
+              android:targetSdkVersion="29"/>
+</manifest>
+EOF
+}
+
+echo "Creating AAR root directory"
+aar_root="${prefabhome}/SDL${sdl_major}-${sdl_version}"
+mkdir -p "${aar_root}"
+
+aar_metainfdir_path=${aar_root}/META-INF
+mkdir -p "${aar_metainfdir_path}"
+cp "${sdl_root}/LICENSE.txt" "${aar_metainfdir_path}"
+
+prefabworkdir="${aar_root}/prefab"
+mkdir -p "${prefabworkdir}"
+
+cat >"${prefabworkdir}/prefab.json" <<EOF
+{
+  "schema_version": 2,
+  "name": "SDL$sdl_major",
+  "version": "$sdl_version",
+  "dependencies": []
+}
+EOF
+
+modulesworkdir="${prefabworkdir}/modules"
+mkdir -p "${modulesworkdir}"
+
+create_shared_sdl_module() {
+    echo "Creating SDL${sdl_major} prefab module"
+    for android_abi in $android_abis; do
+        sdl_moduleworkdir="${modulesworkdir}/SDL${sdl_major}"
+        mkdir -p "${sdl_moduleworkdir}"
+
+        abi_build_prefix="${build_root}/build_${android_abi}/prefix"
+
+        cat >"${sdl_moduleworkdir}/module.json" <<EOF
+{
+  "export_libraries": [],
+  "library_name": "libSDL${sdl_major}"
+}
+EOF
+        mkdir -p "${sdl_moduleworkdir}/include"
+        cp -r "${abi_build_prefix}/include/SDL${sdl_major}/"* "${sdl_moduleworkdir}/include/"
+        rm "${sdl_moduleworkdir}/include/SDL_config.h"
+        cp "$sdl_root/include/SDL_config.h" "$sdl_root/include/SDL_config_android.h" "${sdl_moduleworkdir}/include/"
+
+        abi_sdllibdir="${sdl_moduleworkdir}/libs/android.${android_abi}"
+        mkdir -p "${abi_sdllibdir}"
+        cat >"${abi_sdllibdir}/abi.json" <<EOF
+{
+  "abi": "${android_abi}",
+  "api": ${android_api},
+  "ndk": ${android_ndk},
+  "stl": "${android_stl}",
+  "static": false
+}
+EOF
+        cp "${abi_build_prefix}/lib/libSDL${sdl_major}.so" "${abi_sdllibdir}"
+    done
+}
+
+create_static_sdl_module() {
+    echo "Creating SDL${sdl_major}-static prefab module"
+    for android_abi in $android_abis; do
+        sdl_moduleworkdir="${modulesworkdir}/SDL${sdl_major}-static"
+        mkdir -p "${sdl_moduleworkdir}"
+
+        abi_build_prefix="${build_root}/build_${android_abi}/prefix"
+
+        cat >"${sdl_moduleworkdir}/module.json" <<EOF
+{
+  "export_libraries": ["-ldl", "-lGLESv1_CM", "-lGLESv2", "-llog", "-landroid", "-lOpenSLES"]
+  "library_name": "libSDL${sdl_major}"
+}
+EOF
+        mkdir -p "${sdl_moduleworkdir}/include"
+        cp -r "${abi_build_prefix}/include/SDL${sdl_major}/"* "${sdl_moduleworkdir}/include"
+        rm "${sdl_moduleworkdir}/include/SDL_config.h"
+        cp "$sdl_root/include/SDL_config.h" "$sdl_root/include/SDL_config_android.h" "${sdl_moduleworkdir}/include/"
+
+        abi_sdllibdir="${sdl_moduleworkdir}/libs/android.${android_abi}"
+        mkdir -p "${abi_sdllibdir}"
+        cat >"${abi_sdllibdir}/abi.json" <<EOF
+{
+  "abi": "${android_abi}",
+  "api": ${android_api},
+  "ndk": ${android_ndk},
+  "stl": "${android_stl}",
+  "static": true
+}
+EOF
+        cp "${abi_build_prefix}/lib/libSDL${sdl_major}.a" "${abi_sdllibdir}"
+    done
+}
+
+create_sdlmain_module() {
+    echo "Creating SDL${sdl_major}main prefab module"
+    for android_abi in $android_abis; do
+        sdl_moduleworkdir="${modulesworkdir}/SDL${sdl_major}main"
+        mkdir -p "${sdl_moduleworkdir}"
+
+        abi_build_prefix="${build_root}/build_${android_abi}/prefix"
+
+        cat >"${sdl_moduleworkdir}/module.json" <<EOF
+{
+  "export_libraries": [],
+  "library_name": "libSDL${sdl_major}main"
+}
+EOF
+        abi_sdllibdir="${sdl_moduleworkdir}/libs/android.${android_abi}"
+        mkdir -p "${abi_sdllibdir}"
+        cat >"${abi_sdllibdir}/abi.json" <<EOF
+{
+  "abi": "${android_abi}",
+  "api": ${android_api},
+  "ndk": ${android_ndk},
+  "stl": "${android_stl}",
+  "static": true
+}
+EOF
+        cp "${abi_build_prefix}/lib/libSDL${sdl_major}main.a" "${abi_sdllibdir}"
+    done
+}
+
+create_sdltest_module() {
+    echo "Creating SDL${sdl_major}test prefab module"
+    for android_abi in $android_abis; do
+        sdl_moduleworkdir="${modulesworkdir}/SDL${sdl_major}test"
+        mkdir -p "${sdl_moduleworkdir}"
+
+        abi_build_prefix="${build_root}/build_${android_abi}/prefix"
+
+        cat >"${sdl_moduleworkdir}/module.json" <<EOF
+{
+  "export_libraries": [],
+  "library_name": "libSDL${sdl_major}_test"
+}
+EOF
+        abi_sdllibdir="${sdl_moduleworkdir}/libs/android.${android_abi}"
+        mkdir -p "${abi_sdllibdir}"
+        cat >"${abi_sdllibdir}/abi.json" <<EOF
+{
+  "abi": "${android_abi}",
+  "api": ${android_api},
+  "ndk": ${android_ndk},
+  "stl": "${android_stl}",
+  "static": true
+}
+EOF
+        cp "${abi_build_prefix}/lib/libSDL${sdl_major}_test.a" "${abi_sdllibdir}"
+    done
+}
+
+build_cmake_projects
+
+compile_java
+
+create_pom_xml
+
+create_aar_androidmanifest
+
+create_shared_sdl_module
+
+create_static_sdl_module
+
+create_sdlmain_module
+
+create_sdltest_module
+
+pushd "${aar_root}"
+    aar_filename="SDL${sdl_major}-${sdl_version}.aar"
+    cp "${classes_jar_path}" ./classes.jar
+    cp "${classes_sources_jar_path}" ./classes-sources.jar
+    zip -r "${aar_filename}" AndroidManifest.xml classes.jar classes-sources.jar prefab META-INF
+    zip -Tv "${aar_filename}" 2>/dev/null ;
+    mv "${aar_filename}" "${prefabhome}"
+popd
+
+maven_filename="SDL${sdl_major}-${sdl_version}.zip"
+
+pushd "${prefabhome}"
+    zip_filename="SDL${sdl_major}-${sdl_version}.zip"
+    zip "${maven_filename}" "${aar_filename}" "${pom_filename}" 2>/dev/null;
+    zip -Tv "${zip_filename}" 2>/dev/null;
+popd
+
+echo "Prefab zip is ready at ${prefabhome}/${aar_filename}"
+echo "Maven archive is ready at ${prefabhome}/${zip_filename}"

+ 3 - 3
Engine/lib/sdl/build-scripts/clang-fat.sh

@@ -6,12 +6,12 @@
 
 
 DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
 DEVELOPER="`xcode-select -print-path`/Platforms/MacOSX.platform/Developer"
 
 
-# Intel 64-bit compiler flags (10.7 runtime compatibility)
-CLANG_COMPILE_X64="clang -arch x86_64 -mmacosx-version-min=10.7 \
+# Intel 64-bit compiler flags (10.9 runtime compatibility)
+CLANG_COMPILE_X64="clang -arch x86_64 -mmacosx-version-min=10.9 \
 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 \
 -DMAC_OS_X_VERSION_MIN_REQUIRED=1070 \
 -I/usr/local/include"
 -I/usr/local/include"
 
 
-CLANG_LINK_X64="-mmacosx-version-min=10.7"
+CLANG_LINK_X64="-mmacosx-version-min=10.9"
 
 
 # ARM 64-bit compiler flags (11.0 runtime compatibility)
 # ARM 64-bit compiler flags (11.0 runtime compatibility)
 CLANG_COMPILE_ARM64="clang -arch arm64 -mmacosx-version-min=11.0 \
 CLANG_COMPILE_ARM64="clang -arch arm64 -mmacosx-version-min=11.0 \

+ 6 - 3
Engine/lib/sdl/build-scripts/config.guess

@@ -4,7 +4,7 @@
 
 
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 # shellcheck disable=SC2006,SC2268 # see below for rationale
 
 
-timestamp='2022-05-08'
+timestamp='2022-05-25'
 
 
 # This file is free software; you can redistribute it and/or modify it
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
 # under the terms of the GNU General Public License as published by
@@ -1378,8 +1378,11 @@ EOF
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
     BePC:Haiku:*:*)	# Haiku running on Intel PC compatible.
 	GUESS=i586-pc-haiku
 	GUESS=i586-pc-haiku
 	;;
 	;;
-    x86_64:Haiku:*:*)
-	GUESS=x86_64-unknown-haiku
+    ppc:Haiku:*:*)	# Haiku running on Apple PowerPC
+	GUESS=powerpc-apple-haiku
+	;;
+    *:Haiku:*:*)	# Haiku modern gcc (not bound by BeOS compat)
+	GUESS=$UNAME_MACHINE-unknown-haiku
 	;;
 	;;
     SX-4:SUPER-UX:*:*)
     SX-4:SUPER-UX:*:*)
 	GUESS=sx4-nec-superux$UNAME_RELEASE
 	GUESS=sx4-nec-superux$UNAME_RELEASE

+ 1 - 1
Engine/lib/sdl/build-scripts/config.sub

@@ -1075,7 +1075,7 @@ case $cpu-$vendor in
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
 		cpu=i586
 		cpu=i586
 		;;
 		;;
-	pentiumpro-* | p6-* | 6x86-* | athlon-* | athalon_*-*)
+	pentiumpro-* | p6-* | 6x86-* | athlon-* | athlon_*-*)
 		cpu=i686
 		cpu=i686
 		;;
 		;;
 	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
 	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)

+ 1 - 1
Engine/lib/sdl/build-scripts/emscripten-buildbot.sh

@@ -55,7 +55,7 @@ mkdir buildbot
 pushd buildbot
 pushd buildbot
 
 
 echo "Configuring..."
 echo "Configuring..."
-emconfigure ../configure --host=wasm32-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=wasm32-unknown-emscripten --disable-assembly --disable-threads --disable-cpuinfo CFLAGS="-s USE_SDL=0 -O2 -Wno-warn-absolute-paths -Wdeclaration-after-statement -Werror=declaration-after-statement" --prefix="$PWD/emscripten-sdl2-installed" || exit $?
 
 
 echo "Building..."
 echo "Building..."
 emmake $MAKE || exit $?
 emmake $MAKE || exit $?

+ 9 - 1
Engine/lib/sdl/build-scripts/fnsince.pl

@@ -19,7 +19,15 @@ open(PIPEFH, '-|', 'git tag -l') or die "Failed to read git release tags: $!\n";
 while (<PIPEFH>) {
 while (<PIPEFH>) {
     chomp;
     chomp;
     if (/\Arelease\-(.*?)\Z/) {
     if (/\Arelease\-(.*?)\Z/) {
-        push @unsorted_releases, $1;
+        # After 2.24.x, ignore anything that isn't a x.y.0 release.
+        # We moved to bugfix-only point releases there, so make sure new APIs
+        #  are assigned to the next minor version and ignore the patch versions.
+        my $ver = $1;
+        my @versplit = split /\./, $ver;
+        next if (scalar(@versplit) > 2) && (($versplit[0] > 2) || (($versplit[0] == 2) && ($versplit[1] >= 24))) && ($versplit[2] != 0);
+
+        # Consider this release version.
+        push @unsorted_releases, $ver;
     }
     }
 
 
 }
 }

+ 450 - 0
Engine/lib/sdl/build-scripts/gen_audio_channel_conversion.c

@@ -0,0 +1,450 @@
+/*
+  Simple DirectMedia Layer
+  Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+*/
+
+#include <stdio.h>
+
+/*
+
+Built with:
+
+gcc -o genchancvt build-scripts/gen_audio_channel_conversion.c -lm && ./genchancvt > src/audio/SDL_audio_channel_converters.h
+
+*/
+
+#define NUM_CHANNELS 8
+
+static const char *layout_names[NUM_CHANNELS] = {
+    "Mono", "Stereo", "2.1", "Quad", "4.1", "5.1", "6.1", "7.1"
+};
+
+static const char *channel_names[NUM_CHANNELS][NUM_CHANNELS] = {
+    /* mono */   { "FC" },
+    /* stereo */ { "FL", "FR" },
+    /* 2.1 */    { "FL", "FR", "LFE" },
+    /* quad */   { "FL", "FR", "BL", "BR" },
+    /* 4.1 */    { "FL", "FR", "LFE", "BL", "BR" },
+    /* 5.1 */    { "FL", "FR", "FC", "LFE", "BL", "BR" },
+    /* 6.1 */    { "FL", "FR", "FC", "LFE", "BC", "SL", "SR" },
+    /* 7.1 */    { "FL", "FR", "FC", "LFE", "BL", "BR", "SL", "SR" },
+};
+
+
+/*
+ * This table is from FAudio:
+ *
+ *  https://raw.githubusercontent.com/FNA-XNA/FAudio/master/src/matrix_defaults.inl
+ */
+static const float channel_conversion_matrix[8][8][64] = {
+{
+	/* 1 x 1 */
+	{ 1.000000000f },
+	/* 1 x 2 */
+	{ 1.000000000f, 1.000000000f },
+	/* 1 x 3 */
+	{ 1.000000000f, 1.000000000f, 0.000000000f },
+	/* 1 x 4 */
+	{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f },
+	/* 1 x 5 */
+	{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 1 x 6 */
+	{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 1 x 7 */
+	{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 1 x 8 */
+	{ 1.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
+},
+{
+	/* 2 x 1 */
+	{ 0.500000000f, 0.500000000f },
+	/* 2 x 2 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 2 x 3 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f },
+	/* 2 x 4 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 2 x 5 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 2 x 6 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 2 x 7 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 2 x 8 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
+},
+{
+	/* 3 x 1 */
+	{ 0.333333343f, 0.333333343f, 0.333333343f },
+	/* 3 x 2 */
+	{ 0.800000012f, 0.000000000f, 0.200000003f, 0.000000000f, 0.800000012f, 0.200000003f },
+	/* 3 x 3 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 3 x 4 */
+	{ 0.888888896f, 0.000000000f, 0.111111112f, 0.000000000f, 0.888888896f, 0.111111112f, 0.000000000f, 0.000000000f, 0.111111112f, 0.000000000f, 0.000000000f, 0.111111112f },
+	/* 3 x 5 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 3 x 6 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 3 x 7 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 3 x 8 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
+},
+{
+	/* 4 x 1 */
+	{ 0.250000000f, 0.250000000f, 0.250000000f, 0.250000000f },
+	/* 4 x 2 */
+	{ 0.421000004f, 0.000000000f, 0.358999997f, 0.219999999f, 0.000000000f, 0.421000004f, 0.219999999f, 0.358999997f },
+	/* 4 x 3 */
+	{ 0.421000004f, 0.000000000f, 0.358999997f, 0.219999999f, 0.000000000f, 0.421000004f, 0.219999999f, 0.358999997f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 4 x 4 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 4 x 5 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 4 x 6 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 4 x 7 */
+	{ 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.500000000f, 0.500000000f, 0.000000000f, 0.000000000f, 0.796000004f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f },
+	/* 4 x 8 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
+},
+{
+	/* 5 x 1 */
+	{ 0.200000003f, 0.200000003f, 0.200000003f, 0.200000003f, 0.200000003f },
+	/* 5 x 2 */
+	{ 0.374222219f, 0.000000000f, 0.111111112f, 0.319111109f, 0.195555553f, 0.000000000f, 0.374222219f, 0.111111112f, 0.195555553f, 0.319111109f },
+	/* 5 x 3 */
+	{ 0.421000004f, 0.000000000f, 0.000000000f, 0.358999997f, 0.219999999f, 0.000000000f, 0.421000004f, 0.000000000f, 0.219999999f, 0.358999997f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f },
+	/* 5 x 4 */
+	{ 0.941176474f, 0.000000000f, 0.058823530f, 0.000000000f, 0.000000000f, 0.000000000f, 0.941176474f, 0.058823530f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.058823530f, 0.941176474f, 0.000000000f, 0.000000000f, 0.000000000f, 0.058823530f, 0.000000000f, 0.941176474f },
+	/* 5 x 5 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 5 x 6 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 5 x 7 */
+	{ 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.500000000f, 0.500000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f },
+	/* 5 x 8 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
+},
+{
+	/* 6 x 1 */
+	{ 0.166666672f, 0.166666672f, 0.166666672f, 0.166666672f, 0.166666672f, 0.166666672f },
+	/* 6 x 2 */
+	{ 0.294545442f, 0.000000000f, 0.208181813f, 0.090909094f, 0.251818180f, 0.154545456f, 0.000000000f, 0.294545442f, 0.208181813f, 0.090909094f, 0.154545456f, 0.251818180f },
+	/* 6 x 3 */
+	{ 0.324000001f, 0.000000000f, 0.229000002f, 0.000000000f, 0.277000010f, 0.170000002f, 0.000000000f, 0.324000001f, 0.229000002f, 0.000000000f, 0.170000002f, 0.277000010f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f },
+	/* 6 x 4 */
+	{ 0.558095276f, 0.000000000f, 0.394285709f, 0.047619049f, 0.000000000f, 0.000000000f, 0.000000000f, 0.558095276f, 0.394285709f, 0.047619049f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.047619049f, 0.558095276f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.047619049f, 0.000000000f, 0.558095276f },
+	/* 6 x 5 */
+	{ 0.586000025f, 0.000000000f, 0.414000005f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.586000025f, 0.414000005f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.586000025f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.586000025f },
+	/* 6 x 6 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 6 x 7 */
+	{ 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.939999998f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.500000000f, 0.500000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.796000004f },
+	/* 6 x 8 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f }
+},
+{
+	/* 7 x 1 */
+	{ 0.143142849f, 0.143142849f, 0.143142849f, 0.142857149f, 0.143142849f, 0.143142849f, 0.143142849f },
+	/* 7 x 2 */
+	{ 0.247384623f, 0.000000000f, 0.174461529f, 0.076923080f, 0.174461529f, 0.226153851f, 0.100615382f, 0.000000000f, 0.247384623f, 0.174461529f, 0.076923080f, 0.174461529f, 0.100615382f, 0.226153851f },
+	/* 7 x 3 */
+	{ 0.268000007f, 0.000000000f, 0.188999996f, 0.000000000f, 0.188999996f, 0.245000005f, 0.108999997f, 0.000000000f, 0.268000007f, 0.188999996f, 0.000000000f, 0.188999996f, 0.108999997f, 0.245000005f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 7 x 4 */
+	{ 0.463679999f, 0.000000000f, 0.327360004f, 0.040000003f, 0.000000000f, 0.168960005f, 0.000000000f, 0.000000000f, 0.463679999f, 0.327360004f, 0.040000003f, 0.000000000f, 0.000000000f, 0.168960005f, 0.000000000f, 0.000000000f, 0.000000000f, 0.040000003f, 0.327360004f, 0.431039989f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.040000003f, 0.327360004f, 0.000000000f, 0.431039989f },
+	/* 7 x 5 */
+	{ 0.483000010f, 0.000000000f, 0.340999991f, 0.000000000f, 0.000000000f, 0.175999999f, 0.000000000f, 0.000000000f, 0.483000010f, 0.340999991f, 0.000000000f, 0.000000000f, 0.000000000f, 0.175999999f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.340999991f, 0.449000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.340999991f, 0.000000000f, 0.449000001f },
+	/* 7 x 6 */
+	{ 0.611000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.223000005f, 0.000000000f, 0.000000000f, 0.611000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.223000005f, 0.000000000f, 0.000000000f, 0.611000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.432000011f, 0.568000019f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.432000011f, 0.000000000f, 0.568000019f },
+	/* 7 x 7 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f },
+	/* 7 x 8 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.707000017f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.707000017f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f }
+},
+{
+	/* 8 x 1 */
+	{ 0.125125006f, 0.125125006f, 0.125125006f, 0.125000000f, 0.125125006f, 0.125125006f, 0.125125006f, 0.125125006f },
+	/* 8 x 2 */
+	{ 0.211866662f, 0.000000000f, 0.150266662f, 0.066666670f, 0.181066677f, 0.111066669f, 0.194133341f, 0.085866667f, 0.000000000f, 0.211866662f, 0.150266662f, 0.066666670f, 0.111066669f, 0.181066677f, 0.085866667f, 0.194133341f },
+	/* 8 x 3 */
+	{ 0.226999998f, 0.000000000f, 0.160999998f, 0.000000000f, 0.194000006f, 0.119000003f, 0.208000004f, 0.092000000f, 0.000000000f, 0.226999998f, 0.160999998f, 0.000000000f, 0.119000003f, 0.194000006f, 0.092000000f, 0.208000004f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f },
+	/* 8 x 4 */
+	{ 0.466344833f, 0.000000000f, 0.329241365f, 0.034482758f, 0.000000000f, 0.000000000f, 0.169931039f, 0.000000000f, 0.000000000f, 0.466344833f, 0.329241365f, 0.034482758f, 0.000000000f, 0.000000000f, 0.000000000f, 0.169931039f, 0.000000000f, 0.000000000f, 0.000000000f, 0.034482758f, 0.466344833f, 0.000000000f, 0.433517247f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.034482758f, 0.000000000f, 0.466344833f, 0.000000000f, 0.433517247f },
+	/* 8 x 5 */
+	{ 0.483000010f, 0.000000000f, 0.340999991f, 0.000000000f, 0.000000000f, 0.000000000f, 0.175999999f, 0.000000000f, 0.000000000f, 0.483000010f, 0.340999991f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.175999999f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.483000010f, 0.000000000f, 0.449000001f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.483000010f, 0.000000000f, 0.449000001f },
+	/* 8 x 6 */
+	{ 0.518000007f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.188999996f, 0.000000000f, 0.000000000f, 0.518000007f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.188999996f, 0.000000000f, 0.000000000f, 0.518000007f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.518000007f, 0.000000000f, 0.481999993f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.518000007f, 0.000000000f, 0.481999993f },
+	/* 8 x 7 */
+	{ 0.541000009f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.541000009f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.541000009f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.287999988f, 0.287999988f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.458999991f, 0.000000000f, 0.541000009f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.458999991f, 0.000000000f, 0.541000009f },
+	/* 8 x 8 */
+	{ 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 0.000000000f, 1.000000000f }
+}
+};
+
+static char *remove_dots(const char *str)  /* this is NOT robust. */
+{
+    static char retval1[32];
+    static char retval2[32];
+    static int idx = 0;
+    char *retval = (idx++ & 1) ? retval1 : retval2;
+    char *ptr = retval;
+    while (*str) {
+        if (*str != '.') {
+            *(ptr++) = *str;
+        }
+        str++;
+    }
+    *ptr = '\0';
+    return retval;
+}
+
+static char *lowercase(const char *str)  /* this is NOT robust. */
+{
+    static char retval1[32];
+    static char retval2[32];
+    static int idx = 0;
+    char *retval = (idx++ & 1) ? retval1 : retval2;
+    char *ptr = retval;
+    while (*str) {
+        const char ch = *(str++);
+        *(ptr++) = ((ch >= 'A') && (ch <= 'Z')) ? (ch - ('A' - 'a')) : ch;
+    }
+    *ptr = '\0';
+    return retval;
+}
+
+static void write_converter(const int fromchans, const int tochans)
+{
+    const char *fromstr = layout_names[fromchans-1];
+    const char *tostr = layout_names[tochans-1];
+    const float *cvtmatrix = channel_conversion_matrix[fromchans-1][tochans-1];
+    const float *fptr;
+    const int convert_backwards = (tochans > fromchans);
+    int input_channel_used[NUM_CHANNELS];
+    int i, j;
+
+    if (tochans == fromchans) {
+        return;  /* nothing to convert, don't generate a converter. */
+    }
+
+    for (i = 0; i < fromchans; i++) {
+        input_channel_used[i] = 0;
+    }
+
+    fptr = cvtmatrix;
+    for (j = 0; j < tochans; j++) {
+        for (i = 0; i < fromchans; i++) {
+            #if 0
+            printf("to=%d, from=%d, coeff=%f\n", j, i, *fptr);
+            #endif
+            if (*(fptr++) != 0.0f) {
+                input_channel_used[i]++;
+            }
+        }
+    }
+
+    printf("static void SDLCALL\n"
+           "SDL_Convert%sTo%s(SDL_AudioCVT *cvt, SDL_AudioFormat format)\n"
+           "{\n", remove_dots(fromstr), remove_dots(tostr));
+
+    if (convert_backwards) {  /* must convert backwards when growing the output in-place. */
+        printf("    float *dst = ((float *) (cvt->buf + ((cvt->len_cvt / %d) * %d))) - %d;\n", fromchans, tochans, tochans);
+        printf("    const float *src = ((const float *) (cvt->buf + cvt->len_cvt)) - %d;\n", fromchans);
+    } else {
+        printf("    float *dst = (float *) cvt->buf;\n");
+        printf("    const float *src = dst;\n");
+    }
+
+    printf("    int i;\n"
+           "\n"
+           "    LOG_DEBUG_CONVERT(\"%s\", \"%s\");\n"
+           "    SDL_assert(format == AUDIO_F32SYS);\n"
+           "\n", lowercase(fromstr), lowercase(tostr));
+
+    if (convert_backwards) {
+        printf("    /* convert backwards, since output is growing in-place. */\n");
+        printf("    for (i = cvt->len_cvt / (sizeof (float) * %d); i; i--, src -= %d, dst -= %d) {\n", fromchans, fromchans, tochans);
+        fptr = cvtmatrix;
+        for (i = 0; i < fromchans; i++) {
+            if (input_channel_used[i] > 1) {  /* don't read it from src more than once. */
+                printf("        const float src%s = src[%d];\n", channel_names[fromchans-1][i], i);
+            }
+        }
+
+        for (j = tochans - 1; j >= 0; j--) {
+            int has_input = 0;
+            fptr = cvtmatrix + (fromchans * j);
+            printf("        dst[%d] /* %s */ =", j, channel_names[tochans-1][j]);
+            for (i = fromchans - 1; i >= 0; i--) {
+                const float coefficient = fptr[i];
+                char srcname[32];
+                if (coefficient == 0.0f) {
+                    continue;
+                } else if (input_channel_used[i] > 1) {
+                    snprintf(srcname, sizeof (srcname), "src%s", channel_names[fromchans-1][i]);
+                } else {
+                    snprintf(srcname, sizeof (srcname), "src[%d]", i);
+                }
+
+                if (has_input) {
+                    printf(" +");
+                }
+
+                has_input = 1;
+
+                if (coefficient == 1.0f) {
+                    printf(" %s", srcname);
+                } else {
+                    printf(" (%s * %.9ff)", srcname, coefficient);
+                }
+            }
+
+            if (!has_input) {
+                printf(" 0.0f");
+            }
+
+            printf(";\n");
+        }
+
+        printf("    }\n");
+    } else {
+        printf("    for (i = cvt->len_cvt / (sizeof (float) * %d); i; i--, src += %d, dst += %d) {\n", fromchans, fromchans, tochans);
+
+        fptr = cvtmatrix;
+        for (i = 0; i < fromchans; i++) {
+            if (input_channel_used[i] > 1) {  /* don't read it from src more than once. */
+                printf("        const float src%s = src[%d];\n", channel_names[fromchans-1][i], i);
+            }
+        }
+
+        for (j = 0; j < tochans; j++) {
+            int has_input = 0;
+            fptr = cvtmatrix + (fromchans * j);
+            printf("        dst[%d] /* %s */ =", j, channel_names[tochans-1][j]);
+            for (i = 0; i < fromchans; i++) {
+                const float coefficient = fptr[i];
+                char srcname[32];
+                if (coefficient == 0.0f) {
+                    continue;
+                } else if (input_channel_used[i] > 1) {
+                    snprintf(srcname, sizeof (srcname), "src%s", channel_names[fromchans-1][i]);
+                } else {
+                    snprintf(srcname, sizeof (srcname), "src[%d]", i);
+                }
+
+                if (has_input) {
+                    printf(" +");
+                }
+
+                has_input = 1;
+
+                if (coefficient == 1.0f) {
+                    printf(" %s", srcname);
+                } else {
+                    printf(" (%s * %.9ff)", srcname, coefficient);
+                }
+            }
+
+            if (!has_input) {
+                printf(" 0.0f");
+            }
+
+            printf(";\n");
+        }
+        printf("    }\n");
+    }
+
+    printf("\n");
+
+    if ((fromchans > 1) && (tochans > 1)) {
+        printf("    cvt->len_cvt = (cvt->len_cvt / %d) * %d;\n", fromchans, tochans);
+    } else if (tochans == 1) {
+        printf("    cvt->len_cvt = cvt->len_cvt / %d;\n", fromchans);
+    } else /* if (fromchans == 1) */ {
+        printf("    cvt->len_cvt = cvt->len_cvt * %d;\n", tochans);
+    }
+
+    printf("    if (cvt->filters[++cvt->filter_index]) {\n"
+           "        cvt->filters[cvt->filter_index] (cvt, format);\n"
+           "    }\n"
+           "}\n\n");
+}
+
+int main(void)
+{
+    int ini, outi;
+
+    printf(
+        "/*\n"
+        "  Simple DirectMedia Layer\n"
+        "  Copyright (C) 1997-2023 Sam Lantinga <[email protected]>\n"
+        "\n"
+        "  This software is provided 'as-is', without any express or implied\n"
+        "  warranty.  In no event will the authors be held liable for any damages\n"
+        "  arising from the use of this software.\n"
+        "\n"
+        "  Permission is granted to anyone to use this software for any purpose,\n"
+        "  including commercial applications, and to alter it and redistribute it\n"
+        "  freely, subject to the following restrictions:\n"
+        "\n"
+        "  1. The origin of this software must not be misrepresented; you must not\n"
+        "     claim that you wrote the original software. If you use this software\n"
+        "     in a product, an acknowledgment in the product documentation would be\n"
+        "     appreciated but is not required.\n"
+        "  2. Altered source versions must be plainly marked as such, and must not be\n"
+        "     misrepresented as being the original software.\n"
+        "  3. This notice may not be removed or altered from any source distribution.\n"
+        "*/\n"
+        "\n"
+        "/* DO NOT EDIT, THIS FILE WAS GENERATED BY build-scripts/gen_audio_channel_conversion.c */\n"
+        "\n"
+    );
+
+    for (ini = 1; ini <= NUM_CHANNELS; ini++) {
+        for (outi = 1; outi <= NUM_CHANNELS; outi++) {
+            write_converter(ini, outi);
+        }
+    }
+
+    printf("static const SDL_AudioFilter channel_converters[%d][%d] = {   /* [from][to] */\n", NUM_CHANNELS, NUM_CHANNELS);
+    for (ini = 1; ini <= NUM_CHANNELS; ini++) {
+        const char *comma = "";
+        printf("    {");
+        for (outi = 1; outi <= NUM_CHANNELS; outi++) {
+            const char *fromstr = layout_names[ini-1];
+            const char *tostr = layout_names[outi-1];
+            if (ini == outi) {
+                printf("%s NULL", comma);
+            } else {
+                printf("%s SDL_Convert%sTo%s", comma, remove_dots(fromstr), remove_dots(tostr));
+            }
+            comma = ",";
+        }
+        printf(" }%s\n", (ini == NUM_CHANNELS) ? "" : ",");
+    }
+
+    printf("};\n\n");
+    printf("/* vi: set ts=4 sw=4 expandtab: */\n\n");
+
+    return 0;
+}
+
+/* vi: set ts=4 sw=4 expandtab: */

+ 4 - 3
Engine/lib/sdl/build-scripts/gen_audio_resampler_filter.c

@@ -1,6 +1,6 @@
 /*
 /*
   Simple DirectMedia Layer
   Simple DirectMedia Layer
-  Copyright (C) 1997-2022 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2023 Sam Lantinga <[email protected]>
 
 
   This software is provided 'as-is', without any express or implied
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
   warranty.  In no event will the authors be held liable for any damages
@@ -74,11 +74,12 @@ kaiser_and_sinc(float *table, float *diffs, const int tablelen, const double bet
 {
 {
     const int lenm1 = tablelen - 1;
     const int lenm1 = tablelen - 1;
     const int lenm1div2 = lenm1 / 2;
     const int lenm1div2 = lenm1 / 2;
+    const double bessel_beta = bessel(beta);
     int i;
     int i;
 
 
     table[0] = 1.0f;
     table[0] = 1.0f;
     for (i = 1; i < tablelen; i++) {
     for (i = 1; i < tablelen; i++) {
-        const double kaiser = bessel(beta * sqrt(1.0 - pow(((i - lenm1) / 2.0) / lenm1div2, 2.0))) / bessel(beta);
+        const double kaiser = bessel(beta * sqrt(1.0 - pow(((i - lenm1) / 2.0) / lenm1div2, 2.0))) / bessel_beta;
         table[tablelen - i] = (float) kaiser;
         table[tablelen - i] = (float) kaiser;
     }
     }
 
 
@@ -112,7 +113,7 @@ int main(void)
     printf(
     printf(
         "/*\n"
         "/*\n"
         "  Simple DirectMedia Layer\n"
         "  Simple DirectMedia Layer\n"
-        "  Copyright (C) 1997-2022 Sam Lantinga <[email protected]>\n"
+        "  Copyright (C) 1997-2023 Sam Lantinga <[email protected]>\n"
         "\n"
         "\n"
         "  This software is provided 'as-is', without any express or implied\n"
         "  This software is provided 'as-is', without any express or implied\n"
         "  warranty.  In no event will the authors be held liable for any damages\n"
         "  warranty.  In no event will the authors be held liable for any damages\n"

+ 29 - 6
Engine/lib/sdl/build-scripts/showrev.sh

@@ -5,10 +5,31 @@
 SDL_ROOT=$(dirname $0)/..
 SDL_ROOT=$(dirname $0)/..
 cd $SDL_ROOT
 cd $SDL_ROOT
 
 
+if [ -e ./VERSION.txt ]; then
+    cat ./VERSION.txt
+    exit 0
+fi
+
+major=$(sed -ne 's/^#define SDL_MAJOR_VERSION  *//p' include/SDL_version.h)
+minor=$(sed -ne 's/^#define SDL_MINOR_VERSION  *//p' include/SDL_version.h)
+micro=$(sed -ne 's/^#define SDL_PATCHLEVEL  *//p' include/SDL_version.h)
+version="${major}.${minor}.${micro}"
+
 if [ -x "$(command -v git)" ]; then
 if [ -x "$(command -v git)" ]; then
-    rev=$(echo "$(git remote get-url origin 2>/dev/null)@$(git rev-list HEAD~.. 2>/dev/null)")
-    if [ "$rev" != "@" ]; then
-        echo $rev
+    rev="$(git describe --tags --long 2>/dev/null)"
+    if [ -n "$rev" ]; then
+        # e.g. release-2.24.0-542-g96361fc47
+        # or release-2.24.1-5-g36b987dab
+        # or prerelease-2.23.2-0-gcb46e1b3f
+        echo "$rev"
+        exit 0
+    fi
+
+    rev="$(git describe --always --tags --long 2>/dev/null)"
+    if [ -n "$rev" ]; then
+        # Just a truncated sha1, e.g. 96361fc47.
+        # Turn it into e.g. 2.25.0-g96361fc47
+        echo "${version}-g${rev}"
         exit 0
         exit 0
     fi
     fi
 fi
 fi
@@ -16,10 +37,12 @@ fi
 if [ -x "$(command -v p4)" ]; then
 if [ -x "$(command -v p4)" ]; then
     rev="$(p4 changes -m1 ./...\#have 2>/dev/null| awk '{print $2}')"
     rev="$(p4 changes -m1 ./...\#have 2>/dev/null| awk '{print $2}')"
     if [ $? = 0 ]; then
     if [ $? = 0 ]; then
-        echo $rev
+        # e.g. 2.25.0-p7511446
+        echo "${version}-p${rev}"
         exit 0
         exit 0
     fi
     fi
 fi
 fi
 
 
-echo ""
-exit 1
+# best we can do
+echo "${version}-no-vcs"
+exit 0

+ 47 - 17
Engine/lib/sdl/test/versioning.sh → Engine/lib/sdl/build-scripts/test-versioning.sh

@@ -34,9 +34,20 @@ else
     not_ok "configure.ac $version disagrees with SDL_version.h $ref_version"
     not_ok "configure.ac $version disagrees with SDL_version.h $ref_version"
 fi
 fi
 
 
-major=$(sed -ne 's/^set(SDL_MAJOR_VERSION \([0-9]\+\))$/\1/p' CMakeLists.txt)
-minor=$(sed -ne 's/^set(SDL_MINOR_VERSION \([0-9]\+\))$/\1/p' CMakeLists.txt)
-micro=$(sed -ne 's/^set(SDL_MICRO_VERSION \([0-9]\+\))$/\1/p' CMakeLists.txt)
+major=$(sed -ne 's/^SDL_MAJOR_VERSION=//p' configure)
+minor=$(sed -ne 's/^SDL_MINOR_VERSION=//p' configure)
+micro=$(sed -ne 's/^SDL_MICRO_VERSION=//p' configure)
+version="${major}.${minor}.${micro}"
+
+if [ "$ref_version" = "$version" ]; then
+    ok "configure $version"
+else
+    not_ok "configure $version disagrees with SDL_version.h $ref_version"
+fi
+
+major=$(sed -ne 's/^set(SDL_MAJOR_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
+minor=$(sed -ne 's/^set(SDL_MINOR_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
+micro=$(sed -ne 's/^set(SDL_MICRO_VERSION \([0-9]*\))$/\1/p' CMakeLists.txt)
 version="${major}.${minor}.${micro}"
 version="${major}.${minor}.${micro}"
 
 
 if [ "$ref_version" = "$version" ]; then
 if [ "$ref_version" = "$version" ]; then
@@ -45,6 +56,17 @@ else
     not_ok "CMakeLists.txt $version disagrees with SDL_version.h $ref_version"
     not_ok "CMakeLists.txt $version disagrees with SDL_version.h $ref_version"
 fi
 fi
 
 
+major=$(sed -ne 's/.*SDL_MAJOR_VERSION = \([0-9]*\);/\1/p' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java)
+minor=$(sed -ne 's/.*SDL_MINOR_VERSION = \([0-9]*\);/\1/p' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java)
+micro=$(sed -ne 's/.*SDL_MICRO_VERSION = \([0-9]*\);/\1/p' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java)
+version="${major}.${minor}.${micro}"
+
+if [ "$ref_version" = "$version" ]; then
+    ok "SDLActivity.java $version"
+else
+    not_ok "android-project/app/src/main/java/org/libsdl/app/SDLActivity.java $version disagrees with SDL_version.h $ref_version"
+fi
+
 major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.os2)
 major=$(sed -ne 's/^MAJOR_VERSION *= *//p' Makefile.os2)
 minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.os2)
 minor=$(sed -ne 's/^MINOR_VERSION *= *//p' Makefile.os2)
 micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.os2)
 micro=$(sed -ne 's/^MICRO_VERSION *= *//p' Makefile.os2)
@@ -67,14 +89,6 @@ else
     not_ok "Makefile.w32 $version disagrees with SDL_version.h $ref_version"
     not_ok "Makefile.w32 $version disagrees with SDL_version.h $ref_version"
 fi
 fi
 
 
-version=$(sed -Ene 's/^[$]SDLVersion = "([0-9.]+)"\r?$/\1/p' build-scripts/winrtbuild.ps1)
-
-if [ "$ref_version" = "$version" ]; then
-    ok "winrtbuild.ps1 $version"
-else
-    not_ok "winrtbuild.ps1 $version disagrees with SDL_version.h $ref_version"
-fi
-
 tuple=$(sed -ne 's/^ *FILEVERSION *//p' src/main/windows/version.rc | tr -d '\r')
 tuple=$(sed -ne 's/^ *FILEVERSION *//p' src/main/windows/version.rc | tr -d '\r')
 ref_tuple="${ref_major},${ref_minor},${ref_micro},0"
 ref_tuple="${ref_major},${ref_minor},${ref_micro},0"
 
 
@@ -92,7 +106,7 @@ else
     not_ok "version.rc PRODUCTVERSION $tuple disagrees with SDL_version.h $ref_tuple"
     not_ok "version.rc PRODUCTVERSION $tuple disagrees with SDL_version.h $ref_tuple"
 fi
 fi
 
 
-tuple=$(sed -Ene 's/^ *VALUE "FileVersion", "([0-9, ]+)\\0"\r?$/\1/p' src/main/windows/version.rc | tr -d '\r')
+tuple=$(sed -Ene 's/^ *VALUE "FileVersion", "([0-9, ]*)\\0"\r?$/\1/p' src/main/windows/version.rc | tr -d '\r')
 ref_tuple="${ref_major}, ${ref_minor}, ${ref_micro}, 0"
 ref_tuple="${ref_major}, ${ref_minor}, ${ref_micro}, 0"
 
 
 if [ "$ref_tuple" = "$tuple" ]; then
 if [ "$ref_tuple" = "$tuple" ]; then
@@ -101,7 +115,7 @@ else
     not_ok "version.rc FileVersion $tuple disagrees with SDL_version.h $ref_tuple"
     not_ok "version.rc FileVersion $tuple disagrees with SDL_version.h $ref_tuple"
 fi
 fi
 
 
-tuple=$(sed -Ene 's/^ *VALUE "ProductVersion", "([0-9, ]+)\\0"\r?$/\1/p' src/main/windows/version.rc | tr -d '\r')
+tuple=$(sed -Ene 's/^ *VALUE "ProductVersion", "([0-9, ]*)\\0"\r?$/\1/p' src/main/windows/version.rc | tr -d '\r')
 
 
 if [ "$ref_tuple" = "$tuple" ]; then
 if [ "$ref_tuple" = "$tuple" ]; then
     ok "version.rc ProductVersion $tuple"
     ok "version.rc ProductVersion $tuple"
@@ -127,13 +141,27 @@ fi
 
 
 # For simplicity this assumes we'll never break ABI before SDL 3.
 # For simplicity this assumes we'll never break ABI before SDL 3.
 dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
 dylib_compat=$(sed -Ene 's/.*DYLIB_COMPATIBILITY_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
-ref='1.0.0
-1.0.0'
+
+case "$ref_minor" in
+    (*[02468])
+        major="$(( ref_minor * 100 + 1 ))"
+        minor="0"
+        ;;
+    (*)
+        major="$(( ref_minor * 100 + ref_micro + 1 ))"
+        minor="0"
+        ;;
+esac
+
+ref="${major}.${minor}.0
+${major}.${minor}.0
+${major}.${minor}.0
+${major}.${minor}.0"
 
 
 if [ "$ref" = "$dylib_compat" ]; then
 if [ "$ref" = "$dylib_compat" ]; then
     ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is consistent"
     ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is consistent"
 else
 else
-    not_ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is inconsistent"
+    not_ok "project.pbxproj DYLIB_COMPATIBILITY_VERSION is inconsistent, expected $ref, got $dylib_compat"
 fi
 fi
 
 
 dylib_cur=$(sed -Ene 's/.*DYLIB_CURRENT_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
 dylib_cur=$(sed -Ene 's/.*DYLIB_CURRENT_VERSION = (.*);$/\1/p' Xcode/SDL/SDL.xcodeproj/project.pbxproj)
@@ -150,12 +178,14 @@ case "$ref_minor" in
 esac
 esac
 
 
 ref="${major}.${minor}.0
 ref="${major}.${minor}.0
+${major}.${minor}.0
+${major}.${minor}.0
 ${major}.${minor}.0"
 ${major}.${minor}.0"
 
 
 if [ "$ref" = "$dylib_cur" ]; then
 if [ "$ref" = "$dylib_cur" ]; then
     ok "project.pbxproj DYLIB_CURRENT_VERSION is consistent"
     ok "project.pbxproj DYLIB_CURRENT_VERSION is consistent"
 else
 else
-    not_ok "project.pbxproj DYLIB_CURRENT_VERSION is inconsistent"
+    not_ok "project.pbxproj DYLIB_CURRENT_VERSION is inconsistent, expected $ref, got $dylib_cur"
 fi
 fi
 
 
 echo "1..$tests"
 echo "1..$tests"

+ 92 - 0
Engine/lib/sdl/build-scripts/update-version.sh

@@ -0,0 +1,92 @@
+#!/bin/sh
+
+#set -x
+
+cd `dirname $0`/..
+
+ARGSOKAY=1
+if [ -z $1 ]; then
+    ARGSOKAY=0
+fi
+if [ -z $2 ]; then
+    ARGSOKAY=0
+fi
+if [ -z $3 ]; then
+    ARGSOKAY=0
+fi
+
+if [ "x$ARGSOKAY" = "x0" ]; then
+    echo "USAGE: $0 <major> <minor> <patch>" 1>&2
+    exit 1
+fi
+
+MAJOR="$1"
+MINOR="$2"
+PATCH="$3"
+NEWVERSION="$MAJOR.$MINOR.$PATCH"
+
+echo "Updating version to '$NEWVERSION' ..."
+
+# !!! FIXME: This first one is a kinda scary search/replace that might fail later if another X.Y.Z version is added to the file.
+perl -w -pi -e 's/(\<string\>)\d+\.\d+\.\d+/${1}'$NEWVERSION'/;' Xcode/SDL/Info-Framework.plist
+
+DYVER=`expr $MINOR \* 100 + 1`
+perl -w -pi -e 's/(DYLIB_CURRENT_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
+
+# Set compat to major.minor.0 by default.
+perl -w -pi -e 's/(DYLIB_COMPATIBILITY_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
+
+# non-zero patch?
+if [ "x$PATCH" != "x0" ]; then
+    if [ `expr $MINOR % 2` = "0" ]; then
+        # If patch is not zero, but minor is even, it's a bugfix release.
+        perl -w -pi -e 's/(DYLIB_CURRENT_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.'$PATCH'.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
+
+    else
+        # If patch is not zero, but minor is odd, it's a development prerelease.
+        DYVER=`expr $MINOR \* 100 + $PATCH + 1`
+        perl -w -pi -e 's/(DYLIB_CURRENT_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
+        perl -w -pi -e 's/(DYLIB_COMPATIBILITY_VERSION\s*=\s*)\d+\.\d+\.\d+/${1}'$DYVER'.0.0/;' Xcode/SDL/SDL.xcodeproj/project.pbxproj
+    fi
+fi
+
+perl -w -pi -e 's/\A(SDL_MAJOR_VERSION=)\d+/${1}'$MAJOR'/;' configure.ac
+perl -w -pi -e 's/\A(SDL_MINOR_VERSION=)\d+/${1}'$MINOR'/;' configure.ac
+perl -w -pi -e 's/\A(SDL_MICRO_VERSION=)\d+/${1}'$PATCH'/;' configure.ac
+
+perl -w -pi -e 's/\A(set\(SDL_MAJOR_VERSION\s+)\d+/${1}'$MAJOR'/;' CMakeLists.txt
+perl -w -pi -e 's/\A(set\(SDL_MINOR_VERSION\s+)\d+/${1}'$MINOR'/;' CMakeLists.txt
+perl -w -pi -e 's/\A(set\(SDL_MICRO_VERSION\s+)\d+/${1}'$PATCH'/;' CMakeLists.txt
+
+perl -w -pi -e 's/\A(.* SDL_MAJOR_VERSION = )\d+/${1}'$MAJOR'/;' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+perl -w -pi -e 's/\A(.* SDL_MINOR_VERSION = )\d+/${1}'$MINOR'/;' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+perl -w -pi -e 's/\A(.* SDL_MICRO_VERSION = )\d+/${1}'$PATCH'/;' android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
+
+perl -w -pi -e 's/\A(MAJOR_VERSION\s*=\s*)\d+/${1}'$MAJOR'/;' Makefile.os2
+perl -w -pi -e 's/\A(MINOR_VERSION\s*=\s*)\d+/${1}'$MINOR'/;' Makefile.os2
+perl -w -pi -e 's/\A(MICRO_VERSION\s*=\s*)\d+/${1}'$PATCH'/;' Makefile.os2
+
+perl -w -pi -e 's/\A(MAJOR_VERSION\s*=\s*)\d+/${1}'$MAJOR'/;' Makefile.w32
+perl -w -pi -e 's/\A(MINOR_VERSION\s*=\s*)\d+/${1}'$MINOR'/;' Makefile.w32
+perl -w -pi -e 's/\A(MICRO_VERSION\s*=\s*)\d+/${1}'$PATCH'/;' Makefile.w32
+
+perl -w -pi -e 's/(\#define SDL_MAJOR_VERSION\s+)\d+/${1}'$MAJOR'/;' include/SDL_version.h
+perl -w -pi -e 's/(\#define SDL_MINOR_VERSION\s+)\d+/${1}'$MINOR'/;' include/SDL_version.h
+perl -w -pi -e 's/(\#define SDL_PATCHLEVEL\s+)\d+/${1}'$PATCH'/;' include/SDL_version.h
+
+perl -w -pi -e 's/(FILEVERSION\s+)\d+,\d+,\d+/${1}'$MAJOR','$MINOR','$PATCH'/;' src/main/windows/version.rc
+perl -w -pi -e 's/(PRODUCTVERSION\s+)\d+,\d+,\d+/${1}'$MAJOR','$MINOR','$PATCH'/;' src/main/windows/version.rc
+perl -w -pi -e 's/(VALUE "FileVersion", ")\d+, \d+, \d+/${1}'$MAJOR', '$MINOR', '$PATCH'/;' src/main/windows/version.rc
+perl -w -pi -e 's/(VALUE "ProductVersion", ")\d+, \d+, \d+/${1}'$MAJOR', '$MINOR', '$PATCH'/;' src/main/windows/version.rc
+
+echo "Regenerating configure script with new version..."
+./autogen.sh |grep -v 'Now you are ready to run ./configure'
+
+echo "Running build-scripts/test-versioning.sh to verify changes..."
+./build-scripts/test-versioning.sh
+
+echo "All done."
+echo "Run 'git diff' and make sure this looks correct, before 'git commit'."
+
+exit 0
+

+ 31 - 1
Engine/lib/sdl/build-scripts/updaterev.sh

@@ -6,10 +6,40 @@ outdir=`pwd`
 cd `dirname $0`
 cd `dirname $0`
 srcdir=..
 srcdir=..
 header=$outdir/include/SDL_revision.h
 header=$outdir/include/SDL_revision.h
+dist=
+vendor=
+
+while [ "$#" -gt 0 ]; do
+    case "$1" in
+        (--dist)
+            dist=yes
+            shift
+            ;;
+        (--vendor)
+            vendor="$2"
+            shift 2
+            ;;
+        (*)
+            echo "$0: Unknown option: $1" >&2
+            exit 2
+            ;;
+    esac
+done
 
 
 rev=`sh showrev.sh 2>/dev/null`
 rev=`sh showrev.sh 2>/dev/null`
 if [ "$rev" != "" ]; then
 if [ "$rev" != "" ]; then
-    echo "#define SDL_REVISION \"$rev\"" >"$header.new"
+    if [ -n "$dist" ]; then
+        echo "$rev" > "$outdir/VERSION.txt"
+    fi
+    echo "/* Generated by updaterev.sh, do not edit */" >"$header.new"
+    if [ -n "$vendor" ]; then
+        echo "#define SDL_VENDOR_INFO \"$vendor\"" >>"$header.new"
+    fi
+    echo "#ifdef SDL_VENDOR_INFO" >>"$header.new"
+    echo "#define SDL_REVISION \"SDL-$rev (\" SDL_VENDOR_INFO \")\"" >>"$header.new"
+    echo "#else" >>"$header.new"
+    echo "#define SDL_REVISION \"SDL-$rev\"" >>"$header.new"
+    echo "#endif" >>"$header.new"
     echo "#define SDL_REVISION_NUMBER 0" >>"$header.new"
     echo "#define SDL_REVISION_NUMBER 0" >>"$header.new"
     if diff $header $header.new >/dev/null 2>&1; then
     if diff $header $header.new >/dev/null 2>&1; then
         rm "$header.new"
         rm "$header.new"

+ 178 - 32
Engine/lib/sdl/build-scripts/wikiheaders.pl

@@ -4,10 +4,28 @@ use warnings;
 use strict;
 use strict;
 use Text::Wrap;
 use Text::Wrap;
 
 
+$Text::Wrap::huge = 'overflow';
+
+my $projectfullname = 'Simple Directmedia Layer';
+my $projectshortname = 'SDL';
+my $wikisubdir = '';
+my $incsubdir = 'include';
+my $apiprefixregex = undef;
+my $versionfname = 'include/SDL_version.h';
+my $versionmajorregex = '\A\#define\s+SDL_MAJOR_VERSION\s+(\d+)\Z';
+my $versionminorregex = '\A\#define\s+SDL_MINOR_VERSION\s+(\d+)\Z';
+my $versionpatchregex = '\A\#define\s+SDL_PATCHLEVEL\s+(\d+)\Z';
+my $mainincludefname = 'SDL.h';
+my $selectheaderregex = '\ASDL.*?\.h\Z';
+my $projecturl = 'https://libsdl.org/';
+my $wikiurl = 'https://wiki.libsdl.org';
+my $bugreporturl = 'https://github.com/libsdl-org/sdlwiki/issues/new';
 my $srcpath = undef;
 my $srcpath = undef;
 my $wikipath = undef;
 my $wikipath = undef;
 my $warn_about_missing = 0;
 my $warn_about_missing = 0;
 my $copy_direction = 0;
 my $copy_direction = 0;
+my $optionsfname = undef;
+my $wikipreamble = undef;
 
 
 foreach (@ARGV) {
 foreach (@ARGV) {
     $warn_about_missing = 1, next if $_ eq '--warn-about-missing';
     $warn_about_missing = 1, next if $_ eq '--warn-about-missing';
@@ -15,14 +33,74 @@ foreach (@ARGV) {
     $copy_direction = 1, next if $_ eq '--copy-to-header';
     $copy_direction = 1, next if $_ eq '--copy-to-header';
     $copy_direction = -1, next if $_ eq '--copy-to-wiki';
     $copy_direction = -1, next if $_ eq '--copy-to-wiki';
     $copy_direction = -2, next if $_ eq '--copy-to-manpages';
     $copy_direction = -2, next if $_ eq '--copy-to-manpages';
+    if (/\A--options=(.*)\Z/) {
+        $optionsfname = $1;
+        next;
+    }
     $srcpath = $_, next if not defined $srcpath;
     $srcpath = $_, next if not defined $srcpath;
     $wikipath = $_, next if not defined $wikipath;
     $wikipath = $_, next if not defined $wikipath;
 }
 }
 
 
+my $default_optionsfname = '.wikiheaders-options';
+$default_optionsfname = "$srcpath/$default_optionsfname" if defined $srcpath;
+
+if ((not defined $optionsfname) && (-f $default_optionsfname)) {
+    $optionsfname = $default_optionsfname;
+}
+
+if (defined $optionsfname) {
+    open OPTIONS, '<', $optionsfname or die("Failed to open options file '$optionsfname': $!\n");
+    while (<OPTIONS>) {
+        chomp;
+        if (/\A(.*?)\=(.*)\Z/) {
+            my $key = $1;
+            my $val = $2;
+            $key =~ s/\A\s+//;
+            $key =~ s/\s+\Z//;
+            $val =~ s/\A\s+//;
+            $val =~ s/\s+\Z//;
+            $warn_about_missing = int($val), next if $key eq 'warn_about_missing';
+            $srcpath = $val, next if $key eq 'srcpath';
+            $wikipath = $val, next if $key eq 'wikipath';
+            $apiprefixregex = $val, next if $key eq 'apiprefixregex';
+            $projectfullname = $val, next if $key eq 'projectfullname';
+            $projectshortname = $val, next if $key eq 'projectshortname';
+            $wikisubdir = $val, next if $key eq 'wikisubdir';
+            $incsubdir = $val, next if $key eq 'incsubdir';
+            $versionmajorregex = $val, next if $key eq 'versionmajorregex';
+            $versionminorregex = $val, next if $key eq 'versionminorregex';
+            $versionpatchregex = $val, next if $key eq 'versionpatchregex';
+            $versionfname = $val, next if $key eq 'versionfname';
+            $mainincludefname = $val, next if $key eq 'mainincludefname';
+            $selectheaderregex = $val, next if $key eq 'selectheaderregex';
+            $projecturl = $val, next if $key eq 'projecturl';
+            $wikiurl = $val, next if $key eq 'wikiurl';
+            $bugreporturl = $val, next if $key eq 'bugreporturl';
+            $wikipreamble = $val, next if $key eq 'wikipreamble';
+        }
+    }
+    close(OPTIONS);
+}
+
 my $wordwrap_mode = 'mediawiki';
 my $wordwrap_mode = 'mediawiki';
 sub wordwrap_atom {   # don't call this directly.
 sub wordwrap_atom {   # don't call this directly.
     my $str = shift;
     my $str = shift;
-    return fill('', '', $str);
+    my $retval = '';
+
+    # wordwrap but leave links intact, even if they overflow.
+    if ($wordwrap_mode eq 'mediawiki') {
+        while ($str =~ s/(.*?)\s*(\[https?\:\/\/.*?\s+.*?\])\s*//ms) {
+            $retval .= fill('', '', $1); # wrap it.
+            $retval .= "\n$2\n";  # don't wrap it.
+        }
+    } elsif ($wordwrap_mode eq 'md') {
+        while ($str =~ s/(.*?)\s*(\[.*?\]\(https?\:\/\/.*?\))\s*//ms) {
+            $retval .= fill('', '', $1); # wrap it.
+            $retval .= "\n$2\n";  # don't wrap it.
+        }
+    }
+
+    return $retval . fill('', '', $str);
 }
 }
 
 
 sub wordwrap_with_bullet_indent {  # don't call this directly.
 sub wordwrap_with_bullet_indent {  # don't call this directly.
@@ -142,16 +220,23 @@ sub wikify_chunk {
         while ($str =~ s/\A(.*?)\`(.*?)\`//ms) {
         while ($str =~ s/\A(.*?)\`(.*?)\`//ms) {
             my $codeblock = $2;
             my $codeblock = $2;
             $codedstr .= wikify_chunk($wikitype, $1, undef, undef);
             $codedstr .= wikify_chunk($wikitype, $1, undef, undef);
-            # Convert obvious SDL things to wikilinks, even inside `code` blocks.
-            $codeblock =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
+            if (defined $apiprefixregex) {
+                # Convert obvious API things to wikilinks, even inside `code` blocks.
+                $codeblock =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[[$1]]/gms;
+            }
             $codedstr .= "<code>$codeblock</code>";
             $codedstr .= "<code>$codeblock</code>";
         }
         }
 
 
-        # Convert obvious SDL things to wikilinks.
-        $str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[[$1]]/gms;
+        # Convert obvious API things to wikilinks.
+        if (defined $apiprefixregex) {
+            $str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[[$1]]/gms;
+        }
 
 
         # Make some Markdown things into MediaWiki...
         # Make some Markdown things into MediaWiki...
 
 
+        # links
+        $str =~ s/\[(.*?)\]\((https?\:\/\/.*?)\)/\[$2 $1\]/g;
+
         # bold+italic
         # bold+italic
         $str =~ s/\*\*\*(.*?)\*\*\*/'''''$1'''''/gms;
         $str =~ s/\*\*\*(.*?)\*\*\*/'''''$1'''''/gms;
 
 
@@ -170,8 +255,10 @@ sub wikify_chunk {
             $str .= "<syntaxhighlight lang='$codelang'>$code<\/syntaxhighlight>";
             $str .= "<syntaxhighlight lang='$codelang'>$code<\/syntaxhighlight>";
         }
         }
     } elsif ($wikitype eq 'md') {
     } elsif ($wikitype eq 'md') {
-        # Convert obvious SDL things to wikilinks.
-        $str =~ s/\b(SDL_[a-zA-Z0-9_]+)/[$1]($1)/gms;
+        # Convert obvious API things to wikilinks.
+        if (defined $apiprefixregex) {
+            $str =~ s/\b($apiprefixregex[a-zA-Z0-9_]+)/[$1]($1)/gms;
+        }
         if (defined $code) {
         if (defined $code) {
             $str .= "```$codelang$code```";
             $str .= "```$codelang$code```";
         }
         }
@@ -216,7 +303,13 @@ sub dewikify_chunk {
             # Doxygen supports Markdown (and it just simply looks better than MediaWiki
             # Doxygen supports Markdown (and it just simply looks better than MediaWiki
             # when looking at the raw headers), so do some conversions here as necessary.
             # when looking at the raw headers), so do some conversions here as necessary.
 
 
-            $str =~ s/\[\[(SDL_[a-zA-Z0-9_]+)\]\]/$1/gms;  # Dump obvious wikilinks.
+            # Dump obvious wikilinks.
+            if (defined $apiprefixregex) {
+                $str =~ s/\[\[($apiprefixregex[a-zA-Z0-9_]+)\]\]/$1/gms;
+            }
+
+            # links
+            $str =~ s/\[(https?\:\/\/.*?)\s+(.*?)\]/\[$2\]\($1\)/g;
 
 
             # <code></code> is also popular.  :/
             # <code></code> is also popular.  :/
             $str =~ s/\<code>(.*?)<\/code>/`$1`/gms;
             $str =~ s/\<code>(.*?)<\/code>/`$1`/gms;
@@ -240,7 +333,13 @@ sub dewikify_chunk {
     } elsif ($dewikify_mode eq 'manpage') {
     } elsif ($dewikify_mode eq 'manpage') {
         $str =~ s/\./\\[char46]/gms;  # make sure these can't become control codes.
         $str =~ s/\./\\[char46]/gms;  # make sure these can't become control codes.
         if ($wikitype eq 'mediawiki') {
         if ($wikitype eq 'mediawiki') {
-            $str =~ s/\s*\[\[(SDL_[a-zA-Z0-9_]+)\]\]\s*/\n.BR $1\n/gms;  # Dump obvious wikilinks.
+            # Dump obvious wikilinks.
+            if (defined $apiprefixregex) {
+                $str =~ s/\s*\[\[($apiprefixregex[a-zA-Z0-9_]+)\]\]\s*/\n.BR $1\n/gms;
+            }
+
+            # links
+            $str =~ s/\[(https?\:\/\/.*?)\s+(.*?)\]/\n.URL "$1" "$2"\n/g;
 
 
             # <code></code> is also popular.  :/
             # <code></code> is also popular.  :/
             $str =~ s/\s*\<code>(.*?)<\/code>\s*/\n.BR $1\n/gms;
             $str =~ s/\s*\<code>(.*?)<\/code>\s*/\n.BR $1\n/gms;
@@ -336,11 +435,13 @@ my %headerfuncslocation = ();   # $headerfuncslocation{"SDL_OpenAudio"} -> name
 my %headerfuncschunk = ();   # $headerfuncschunk{"SDL_OpenAudio"} -> offset in array in %headers that should be replaced for this function.
 my %headerfuncschunk = ();   # $headerfuncschunk{"SDL_OpenAudio"} -> offset in array in %headers that should be replaced for this function.
 my %headerfuncshasdoxygen = ();   # $headerfuncschunk{"SDL_OpenAudio"} -> 1 if there was no existing doxygen for this function.
 my %headerfuncshasdoxygen = ();   # $headerfuncschunk{"SDL_OpenAudio"} -> 1 if there was no existing doxygen for this function.
 
 
-my $incpath = "$srcpath/include";
+my $incpath = "$srcpath";
+$incpath .= "/$incsubdir" if $incsubdir ne '';
+
 opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n");
 opendir(DH, $incpath) or die("Can't opendir '$incpath': $!\n");
 while (readdir(DH)) {
 while (readdir(DH)) {
     my $dent = $_;
     my $dent = $_;
-    next if not $dent =~ /\ASDL.*?\.h\Z/;  # just SDL*.h headers.
+    next if not $dent =~ /$selectheaderregex/;  # just selected headers.
     open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n");
     open(FH, '<', "$incpath/$dent") or die("Can't open '$incpath/$dent': $!\n");
 
 
     my @contents = ();
     my @contents = ();
@@ -490,21 +591,30 @@ opendir(DH, $wikipath) or die("Can't opendir '$wikipath': $!\n");
 while (readdir(DH)) {
 while (readdir(DH)) {
     my $dent = $_;
     my $dent = $_;
     my $type = '';
     my $type = '';
-    if ($dent =~ /\ASDL.*?\.(md|mediawiki)\Z/) {
+    if ($dent =~ /\.(md|mediawiki)\Z/) {
         $type = $1;
         $type = $1;
     } else {
     } else {
         next;  # only dealing with wiki pages.
         next;  # only dealing with wiki pages.
     }
     }
 
 
+    my $fn = $dent;
+    $fn =~ s/\..*\Z//;
+
+    # Ignore FrontPage.
+    next if $fn eq 'FrontPage';
+
+    # Ignore "Category*" pages.
+    next if ($fn =~ /\ACategory/);
+
     open(FH, '<', "$wikipath/$dent") or die("Can't open '$wikipath/$dent': $!\n");
     open(FH, '<', "$wikipath/$dent") or die("Can't open '$wikipath/$dent': $!\n");
 
 
     my $current_section = '[start]';
     my $current_section = '[start]';
     my @section_order = ( $current_section );
     my @section_order = ( $current_section );
-    my $fn = $dent;
-    $fn =~ s/\..*\Z//;
     my %sections = ();
     my %sections = ();
     $sections{$current_section} = '';
     $sections{$current_section} = '';
 
 
+    my $firstline = 1;
+
     while (<FH>) {
     while (<FH>) {
         chomp;
         chomp;
         my $orig = $_;
         my $orig = $_;
@@ -512,18 +622,24 @@ while (readdir(DH)) {
         s/\s*\Z//;
         s/\s*\Z//;
 
 
         if ($type eq 'mediawiki') {
         if ($type eq 'mediawiki') {
-            if (/\A\= (.*?) \=\Z/) {
+            if (defined($wikipreamble) && $firstline && /\A\=\=\=\=\=\= (.*?) \=\=\=\=\=\=\Z/ && ($1 eq $wikipreamble)) {
+                $firstline = 0;  # skip this.
+                next;
+            } elsif (/\A\= (.*?) \=\Z/) {
+                $firstline = 0;
                 $current_section = ($1 eq $fn) ? '[Brief]' : $1;
                 $current_section = ($1 eq $fn) ? '[Brief]' : $1;
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 push @section_order, $current_section;
                 $sections{$current_section} = '';
                 $sections{$current_section} = '';
             } elsif (/\A\=\= (.*?) \=\=\Z/) {
             } elsif (/\A\=\= (.*?) \=\=\Z/) {
+                $firstline = 0;
                 $current_section = ($1 eq $fn) ? '[Brief]' : $1;
                 $current_section = ($1 eq $fn) ? '[Brief]' : $1;
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 push @section_order, $current_section;
                 $sections{$current_section} = '';
                 $sections{$current_section} = '';
                 next;
                 next;
             } elsif (/\A\-\-\-\-\Z/) {
             } elsif (/\A\-\-\-\-\Z/) {
+                $firstline = 0;
                 $current_section = '[footer]';
                 $current_section = '[footer]';
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 push @section_order, $current_section;
@@ -531,13 +647,18 @@ while (readdir(DH)) {
                 next;
                 next;
             }
             }
         } elsif ($type eq 'md') {
         } elsif ($type eq 'md') {
-            if (/\A\#+ (.*?)\Z/) {
+            if (defined($wikipreamble) && $firstline && /\A\#\#\#\#\#\# (.*?)\Z/ && ($1 eq $wikipreamble)) {
+                $firstline = 0;  # skip this.
+                next;
+            } elsif (/\A\#+ (.*?)\Z/) {
+                $firstline = 0;
                 $current_section = ($1 eq $fn) ? '[Brief]' : $1;
                 $current_section = ($1 eq $fn) ? '[Brief]' : $1;
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 push @section_order, $current_section;
                 $sections{$current_section} = '';
                 $sections{$current_section} = '';
                 next;
                 next;
             } elsif (/\A\-\-\-\-\Z/) {
             } elsif (/\A\-\-\-\-\Z/) {
+                $firstline = 0;
                 $current_section = '[footer]';
                 $current_section = '[footer]';
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 die("Doubly-defined section '$current_section' in '$dent'!\n") if defined $sections{$current_section};
                 push @section_order, $current_section;
                 push @section_order, $current_section;
@@ -548,7 +669,12 @@ while (readdir(DH)) {
             die("Unexpected wiki file type. Fixme!\n");
             die("Unexpected wiki file type. Fixme!\n");
         }
         }
 
 
-        $sections{$current_section} .= "$orig\n";
+        if ($firstline) {
+            $firstline = ($_ ne '');
+        }
+        if (!$firstline) {
+            $sections{$current_section} .= "$orig\n";
+        }
     }
     }
     close(FH);
     close(FH);
 
 
@@ -718,6 +844,8 @@ if ($copy_direction == 1) {  # --copy-to-headers
             foreach (@desclines) {
             foreach (@desclines) {
                 s/\A(\:|\* )//;
                 s/\A(\:|\* )//;
                 s/\(\)\Z//;  # Convert "SDL_Func()" to "SDL_Func"
                 s/\(\)\Z//;  # Convert "SDL_Func()" to "SDL_Func"
+                s/\[\[(.*?)\]\]/$1/;  # in case some wikilinks remain.
+                s/\A\/*//;
                 $str .= "\\sa $_\n";
                 $str .= "\\sa $_\n";
             }
             }
         }
         }
@@ -926,7 +1054,7 @@ if ($copy_direction == 1) {  # --copy-to-headers
                 if ($wikitype eq 'mediawiki') {
                 if ($wikitype eq 'mediawiki') {
                     $sections{'Related Functions'} .= ":[[$sa]]\n";
                     $sections{'Related Functions'} .= ":[[$sa]]\n";
                 } elsif ($wikitype eq 'md') {
                 } elsif ($wikitype eq 'md') {
-                    $sections{'Related Functions'} .= "* [$sa](/$sa)\n";
+                    $sections{'Related Functions'} .= "* [$sa]($sa)\n";
                 } else { die("Expected wikitype '$wikitype'\n"); }
                 } else { die("Expected wikitype '$wikitype'\n"); }
             }
             }
         }
         }
@@ -1008,6 +1136,14 @@ if ($copy_direction == 1) {  # --copy-to-headers
         } else { die("Unexpected wikitype '$wikitype'\n"); }
         } else { die("Unexpected wikitype '$wikitype'\n"); }
         $$sectionsref{'[footer]'} = $footer;
         $$sectionsref{'[footer]'} = $footer;
 
 
+        if (defined $wikipreamble) {
+            if ($wikitype eq 'mediawiki') {
+                print FH "====== $wikipreamble ======\n";
+            } elsif ($wikitype eq 'md') {
+                print FH "###### $wikipreamble\n";
+            } else { die("Unexpected wikitype '$wikitype'\n"); }
+        }
+
         my $prevsectstr = '';
         my $prevsectstr = '';
         my @ordered_sections = (@standard_wiki_sections, defined $wikisectionorderref ? @$wikisectionorderref : ());  # this copies the arrays into one.
         my @ordered_sections = (@standard_wiki_sections, defined $wikisectionorderref ? @$wikisectionorderref : ());  # this copies the arrays into one.
         foreach (@ordered_sections) {
         foreach (@ordered_sections) {
@@ -1076,22 +1212,23 @@ if ($copy_direction == 1) {  # --copy-to-headers
     my $gitrev = `cd "$srcpath" ; git rev-list HEAD~..`;
     my $gitrev = `cd "$srcpath" ; git rev-list HEAD~..`;
     chomp($gitrev);
     chomp($gitrev);
 
 
-    open(FH, '<', "$srcpath/include/SDL_version.h") or die("Can't open '$srcpath/include/SDL_version.h': $!\n");
+    # !!! FIXME
+    open(FH, '<', "$srcpath/$versionfname") or die("Can't open '$srcpath/$versionfname': $!\n");
     my $majorver = 0;
     my $majorver = 0;
     my $minorver = 0;
     my $minorver = 0;
     my $patchver = 0;
     my $patchver = 0;
     while (<FH>) {
     while (<FH>) {
         chomp;
         chomp;
-        if (/\A\#define SDL_MAJOR_VERSION\s+(\d+)\Z/) {
+        if (/$versionmajorregex/) {
             $majorver = int($1);
             $majorver = int($1);
-        } elsif (/\A\#define SDL_MINOR_VERSION\s+(\d+)\Z/) {
+        } elsif (/$versionminorregex/) {
             $minorver = int($1);
             $minorver = int($1);
-        } elsif (/\A\#define SDL_PATCHLEVEL\s+(\d+)\Z/) {
+        } elsif (/$versionpatchregex/) {
             $patchver = int($1);
             $patchver = int($1);
         }
         }
     }
     }
     close(FH);
     close(FH);
-    my $sdlversion = "$majorver.$minorver.$patchver";
+    my $fullversion = "$majorver.$minorver.$patchver";
 
 
     foreach (keys %headerfuncs) {
     foreach (keys %headerfuncs) {
         my $fn = $_;
         my $fn = $_;
@@ -1126,17 +1263,24 @@ if ($copy_direction == 1) {  # --copy-to-headers
         $str .= ".\\\" This manpage content is licensed under Creative Commons\n";
         $str .= ".\\\" This manpage content is licensed under Creative Commons\n";
         $str .= ".\\\"  Attribution 4.0 International (CC BY 4.0)\n";
         $str .= ".\\\"  Attribution 4.0 International (CC BY 4.0)\n";
         $str .= ".\\\"   https://creativecommons.org/licenses/by/4.0/\n";
         $str .= ".\\\"   https://creativecommons.org/licenses/by/4.0/\n";
-        $str .= ".\\\" This manpage was generated from SDL's wiki page for $fn:\n";
-        $str .= ".\\\"   https://wiki.libsdl.org/$fn\n";
+        $str .= ".\\\" This manpage was generated from ${projectshortname}'s wiki page for $fn:\n";
+        $str .= ".\\\"   $wikiurl/$fn\n";
         $str .= ".\\\" Generated with SDL/build-scripts/wikiheaders.pl\n";
         $str .= ".\\\" Generated with SDL/build-scripts/wikiheaders.pl\n";
         $str .= ".\\\"  revision $gitrev\n" if $gitrev ne '';
         $str .= ".\\\"  revision $gitrev\n" if $gitrev ne '';
         $str .= ".\\\" Please report issues in this manpage's content at:\n";
         $str .= ".\\\" Please report issues in this manpage's content at:\n";
-        $str .= ".\\\"   https://github.com/libsdl-org/sdlwiki/issues/new?title=Feedback%20on%20page%20$fn\n";
+        $str .= ".\\\"   $bugreporturl\n";
         $str .= ".\\\" Please report issues in the generation of this manpage from the wiki at:\n";
         $str .= ".\\\" Please report issues in the generation of this manpage from the wiki at:\n";
         $str .= ".\\\"   https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20$fn\n";
         $str .= ".\\\"   https://github.com/libsdl-org/SDL/issues/new?title=Misgenerated%20manpage%20for%20$fn\n";
-        $str .= ".\\\" SDL can be found at https://libsdl.org/\n";
+        $str .= ".\\\" $projectshortname can be found at $projecturl\n";
+
+        # Define a .URL macro. The "www.tmac" thing decides if we're using GNU roff (which has a .URL macro already), and if so, overrides the macro we just created.
+        # This wizadry is from https://web.archive.org/web/20060102165607/http://people.debian.org/~branden/talks/wtfm/wtfm.pdf
+        $str .= ".de URL\n";
+        $str .= '\\$2 \(laURL: \\$1 \(ra\\$3' . "\n";
+        $str .= "..\n";
+        $str .= '.if \n[.g] .mso www.tmac' . "\n";
 
 
-        $str .= ".TH $fn 3 \"SDL $sdlversion\" \"Simple Directmedia Layer\" \"SDL$majorver FUNCTIONS\"\n";
+        $str .= ".TH $fn 3 \"$projectshortname $fullversion\" \"$projectfullname\" \"$projectshortname$majorver FUNCTIONS\"\n";
         $str .= ".SH NAME\n";
         $str .= ".SH NAME\n";
 
 
         $str .= "$fn";
         $str .= "$fn";
@@ -1145,7 +1289,7 @@ if ($copy_direction == 1) {  # --copy-to-headers
 
 
         $str .= ".SH SYNOPSIS\n";
         $str .= ".SH SYNOPSIS\n";
         $str .= ".nf\n";
         $str .= ".nf\n";
-        $str .= ".B #include \\(dqSDL.h\\(dq\n";
+        $str .= ".B #include \\(dq$mainincludefname\\(dq\n";
         $str .= ".PP\n";
         $str .= ".PP\n";
 
 
         my @decllines = split /\n/, $decl;
         my @decllines = split /\n/, $decl;
@@ -1216,6 +1360,8 @@ if ($copy_direction == 1) {  # --copy-to-headers
             foreach (@desclines) {
             foreach (@desclines) {
                 s/\A(\:|\* )//;
                 s/\A(\:|\* )//;
                 s/\(\)\Z//;  # Convert "SDL_Func()" to "SDL_Func"
                 s/\(\)\Z//;  # Convert "SDL_Func()" to "SDL_Func"
+                s/\[\[(.*?)\]\]/$1/;  # in case some wikilinks remain.
+                s/\A\/*//;
                 s/\A\.BR\s+//;  # dewikify added this, but we want to handle it.
                 s/\A\.BR\s+//;  # dewikify added this, but we want to handle it.
                 s/\A\s+//;
                 s/\A\s+//;
                 s/\s+\Z//;
                 s/\s+\Z//;
@@ -1234,14 +1380,14 @@ if ($copy_direction == 1) {  # --copy-to-headers
         $str .= ".UE\n";
         $str .= ".UE\n";
         $str .= ".PP\n";
         $str .= ".PP\n";
         $str .= "This manpage was generated from\n";
         $str .= "This manpage was generated from\n";
-        $str .= ".UR https://wiki.libsdl.org/$fn\n";
-        $str .= "SDL's wiki\n";
+        $str .= ".UR $wikiurl/$fn\n";
+        $str .= "${projectshortname}'s wiki\n";
         $str .= ".UE\n";
         $str .= ".UE\n";
         $str .= "using SDL/build-scripts/wikiheaders.pl";
         $str .= "using SDL/build-scripts/wikiheaders.pl";
         $str .= " revision $gitrev" if $gitrev ne '';
         $str .= " revision $gitrev" if $gitrev ne '';
         $str .= ".\n";
         $str .= ".\n";
         $str .= "Please report issues in this manpage at\n";
         $str .= "Please report issues in this manpage at\n";
-        $str .= ".UR https://github.com/libsdl-org/sdlwiki/issues/new\n";
+        $str .= ".UR $bugreporturl\n";
         $str .= "our bugtracker!\n";
         $str .= "our bugtracker!\n";
         $str .= ".UE\n";
         $str .= ".UE\n";
         }
         }

+ 0 - 8
Engine/lib/sdl/build-scripts/winrtbuild.bat

@@ -1,8 +0,0 @@
-@ECHO OFF
-REM
-REM winrtbuild.bat: a batch file to help launch the winrtbuild.ps1
-REM   Powershell script, either from Windows Explorer, or through Buildbot.
-REM
-SET ThisScriptsDirectory=%~dp0
-SET PowerShellScriptPath=%ThisScriptsDirectory%winrtbuild.ps1
-PowerShell -NoProfile -ExecutionPolicy Bypass -Command "& '%PowerShellScriptPath%'";

+ 0 - 302
Engine/lib/sdl/build-scripts/winrtbuild.ps1

@@ -1,302 +0,0 @@
-#
-# winrtbuild.ps1 -- A Powershell script to build all SDL/WinRT variants,
-#    across all WinRT platforms, in all of their supported, CPU architectures.
-#
-# Initial version written by David Ludwig <[email protected]>
-#
-# This script can be launched from Windows Explorer by double-clicking
-# on winrtbuild.bat
-#
-# Output will be placed in the following subdirectories of the SDL source
-# tree:
-#   * VisualC-WinRT\lib\  -- final .dll, .lib, and .pdb files
-#   * VisualC-WinRT\obj\  -- intermediate build files
-#
-# Recommended Dependencies:
-#   * Windows 8.1 or higher
-#   * Powershell 4.0 or higher (included as part of Windows 8.1)
-#   * Visual C++ 2012, for building Windows 8.0 and Windows Phone 8.0 binaries.
-#   * Visual C++ 2013, for building Windows 8.1 and Windows Phone 8.1 binaries
-#   * SDKs for Windows 8.0, Windows 8.1, Windows Phone 8.0, and
-#     Windows Phone 8.1, as needed
-#
-# Commom parameters/variables may include, but aren't strictly limited to:
-#   * PlatformToolset: the name of one of Visual Studio's build platforms.
-#     Different PlatformToolsets output different binaries.  One
-#     PlatformToolset exists for each WinRT platform.  Possible values
-#     may include:
-#       - "v110": Visual Studio 2012 build tools, plus the Windows 8.0 SDK
-#       - "v110_wp80": Visual Studio 2012 build tools, plus the Windows Phone 8.0 SDK
-#       - "v120": Visual Studio 2013 build tools, plus the Windows 8.1 SDK
-#       - "v120_wp81": Visual Studio 2013 build tools, plus the Windows Phone 8.1 SDK
-#   * VSProjectPath: the full path to a Visual Studio or Visual C++ project file
-#   * VSProjectName: the internal name of a Visual Studio or Visual C++ project
-#     file.  Some of Visual Studio's own build tools use this name when
-#     calculating paths for build-output.
-#   * Platform: a Visual Studio platform name, which often maps to a CPU
-#     CPU architecture.  Possible values may include: "Win32" (for 32-bit x86),
-#     "ARM", or "x64" (for 64-bit x86).
-#
-
-# Base version of SDL, used for packaging purposes
-$SDLVersion = "2.23.0"
-
-# Gets the .bat file that sets up an MSBuild environment, given one of
-# Visual Studio's, "PlatformToolset"s.
-function Get-MSBuild-Env-Launcher
-{
-    param(
-        [Parameter(Mandatory=$true,Position=1)][string]$PlatformToolset
-    )
-
-    if ($PlatformToolset -eq "v110") {      # Windows 8.0 (not Windows Phone), via VS 2012
-        return "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"
-    }
-    if ($PlatformToolset -eq "v110_wp80") { # Windows Phone 8.0, via VS 2012
-        return "C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\WPSDK\WP80\vcvarsphoneall.bat"
-    }
-    if ($PlatformToolset -eq "v120") {      # Windows 8.1 (not Windows Phone), via VS 2013
-        return "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
-    }
-    if ($PlatformToolset -eq "v120_wp81") { # Windows Phone 8.1, via VS 2013
-        return "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\vcvarsall.bat"
-    }
-    if ($PlatformToolset -eq "v140") {      # Windows 10, via VS 2015
-        return "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat"
-    }
-    return ""
-}
-
-# Gets a string that identifies the build-variant of SDL/WinRT that is specific
-# to a particular Visual Studio PlatformToolset.
-function Get-SDL-WinRT-Variant-Name
-{
-    param(
-        [Parameter(Mandatory=$true,Position=1)][string]$PlatformToolset,
-
-        # If true, append a string to this function's output, identifying the
-        # build-variant's minimum-supported version of Visual Studio.
-        [switch]$IncludeVSSuffix = $false
-    )
-
-    if ($PlatformToolset -eq "v110") {      # Windows 8.0 (not Windows Phone), via VS 2012 project files
-        if ($IncludeVSSuffix) {
-            return "WinRT80_VS2012"
-        } else {
-            return "WinRT80"
-        }
-    }
-    if ($PlatformToolset -eq "v110_wp80") { # Windows Phone 8.0, via VS 2012 project files
-        if ($IncludeVSSuffix) {
-            return "WinPhone80_VS2012"
-        } else {
-            return "WinPhone80"
-        }
-    }
-    if ($PlatformToolset -eq "v120") {      # Windows 8.1 (not Windows Phone), via VS 2013 project files
-        if ($IncludeVSSuffix) {
-            return "WinRT81_VS2013"
-        } else {
-            return "WinRT81"
-        }
-    }
-    if ($PlatformToolset -eq "v120_wp81") { # Windows Phone 8.1, via VS 2013 project files
-        if ($IncludeVSSuffix) {
-            return "WinPhone81_VS2013"
-        } else {
-            return "WinPhone81"
-        }
-    }
-    if ($PlatformToolset -eq "v140") {      # Windows 10, via VS 2015 project files
-        if ($IncludeVSSuffix) {
-            return "UWP_VS2015"
-        } else {
-            return "UWP"
-        }
-    }
-    return ""
-}
-
-# Returns the internal name of a Visual Studio Project.
-#
-# The internal name of a VS Project is encoded inside the project file
-# itself, inside a set of <ProjectName></ProjectName> XML tags.
-function Get-VS-ProjectName
-{
-    param(
-        [Parameter(Mandatory=$true,Position=1)]$VSProjectPath
-    )
-
-    # For now, just do a regex for the project name:
-    $matches = (Get-Content $VSProjectPath | Select-String -Pattern ".*<ProjectName>([^<]+)<.*").Matches
-    foreach ($match in $matches) {
-        if ($match.Groups.Count -ge 1) {
-            return $match.Groups[1].Value
-        }
-    }
-    return $null
-}
-
-# Build a specific variant of SDL/WinRT
-function Build-SDL-WinRT-Variant
-{
-    #
-    # Read in arguments:
-    #
-    param (
-        # name of an SDL project file, minus extensions and
-        # platform-identifying suffixes
-        [Parameter(Mandatory=$true,Position=1)][string]$SDLProjectName,
-
-        [Parameter(Mandatory=$true,Position=2)][string]$PlatformToolset,
-
-        [Parameter(Mandatory=$true,Position=3)][string]$Platform
-    )
-
-    #
-    # Derive other properties from read-in arguments:
-    #
-
-    # The .bat file to setup a platform-appropriate MSBuild environment:
-    $BatchFileForMSBuildEnv = Get-MSBuild-Env-Launcher $PlatformToolset
-
-    # The full path to the VS Project that'll be built:
-    $VSProjectPath = "$PSScriptRoot\..\VisualC-WinRT\$(Get-SDL-WinRT-Variant-Name $PlatformToolset -IncludeVSSuffix)\$SDLProjectName-$(Get-SDL-WinRT-Variant-Name $PlatformToolset).vcxproj"
-
-    # The internal name of the VS Project, used in some post-build steps:
-    $VSProjectName = Get-VS-ProjectName $VSProjectPath
-
-    # Where to place output binaries (.dll, .lib, and .pdb files):
-    $OutDir = "$PSScriptRoot\..\VisualC-WinRT\lib\$(Get-SDL-WinRT-Variant-Name $PlatformToolset)\$Platform"
-
-    # Where to place intermediate build files:
-    $IntermediateDir = "$PSScriptRoot\..\VisualC-WinRT\obj\$SDLProjectName-$(Get-SDL-WinRT-Variant-Name $PlatformToolset)\$Platform"
-
-    #
-    # Build the VS Project:
-    #
-    cmd.exe /c " ""$BatchFileForMSBuildEnv"" x86 & msbuild ""$VSProjectPath"" /p:Configuration=Release /p:Platform=$Platform /p:OutDir=""$OutDir\\"" /p:IntDir=""$IntermediateDir\\""" | Out-Host
-    $BuildResult = $?
-
-    #
-    # Move .dll files into place.  This fixes a problem whereby MSBuild may
-    # put output files into a sub-directory of $OutDir, rather than $OutDir
-    # itself.
-    #
-    if (Test-Path "$OutDir\$VSProjectName\") {
-        Move-Item -Force "$OutDir\$VSProjectName\*" "$OutDir"
-    }
-
-    #
-    # Clean up unneeded files in $OutDir:
-    #
-    if (Test-Path "$OutDir\$VSProjectName\") {
-        Remove-Item -Recurse "$OutDir\$VSProjectName"
-    }
-    Remove-Item "$OutDir\*.exp"
-    Remove-Item "$OutDir\*.ilk"
-    Remove-Item "$OutDir\*.pri"
-
-    #
-    # All done.  Indicate success, or failure, to the caller:
-    #
-    #echo "RESULT: $BuildResult" | Out-Host
-    return $BuildResult
-}
-
-
-#
-# Build each variant, with corresponding .dll, .lib, and .pdb files:
-#
-$DidAnyDLLBuildFail = $false
-$DidAnyNugetBuildFail = $false
-
-# Ryan disabled WP8.0, because it doesn't appear to have mmdeviceapi.h that SDL_wasapi needs.
-# My assumption is that no one will miss this, but send patches otherwise!  --ryan.
-# Build for Windows Phone 8.0, via VC++ 2012:
-#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "ARM"))   { $DidAnyDLLBuildFail = $true }
-#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110_wp80" "Win32")) { $DidAnyDLLBuildFail = $true }
-
-# Build for Windows Phone 8.1, via VC++ 2013:
-if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "ARM"))   { $DidAnyDLLBuildFail = $true }
-if ( ! (Build-SDL-WinRT-Variant "SDL" "v120_wp81" "Win32")) { $DidAnyDLLBuildFail = $true }
-
-# Build for Windows 8.0 and Windows RT 8.0, via VC++ 2012:
-#
-# Win 8.0 auto-building was disabled on 2017-Feb-25, by David Ludwig <[email protected]>.
-# Steam's OS-usage surveys indicate that Windows 8.0 use is pretty much nil, plus
-# Microsoft hasn't supported Windows 8.0 development for a few years now.
-# The commented-out lines below may still work on some systems, though.
-# 
-#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "ARM"))        { $DidAnyDLLBuildFail = $true }
-#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "Win32"))      { $DidAnyDLLBuildFail = $true }
-#if ( ! (Build-SDL-WinRT-Variant "SDL" "v110" "x64"))        { $DidAnyDLLBuildFail = $true }
-
-# Build for Windows 8.1 and Windows RT 8.1, via VC++ 2013:
-if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "ARM"))        { $DidAnyDLLBuildFail = $true }
-if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "Win32"))      { $DidAnyDLLBuildFail = $true }
-if ( ! (Build-SDL-WinRT-Variant "SDL" "v120" "x64"))        { $DidAnyDLLBuildFail = $true }
-
-# Build for Windows 10, via VC++ 2015
-if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "ARM"))        { $DidAnyDLLBuildFail = $true }
-if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "Win32"))      { $DidAnyDLLBuildFail = $true }
-if ( ! (Build-SDL-WinRT-Variant "SDL" "v140" "x64"))        { $DidAnyDLLBuildFail = $true }
-
-# Build NuGet packages, if possible
-if ($DidAnyDLLBuildFail -eq $true) {
-    Write-Warning -Message "Unable to build all variants.  NuGet packages will not be built."
-    $DidAnyNugetBuildFail = $true
-} else {
-    $NugetPath = (Get-Command -CommandType Application nuget.exe | %{$_.Path}) 2> $null
-    if ("$NugetPath" -eq "") {
-        Write-Warning -Message "Unable to find nuget.exe.  NuGet packages will not be built."
-        $DidAnyNugetBuildFail = $true
-    } else {
-        Write-Host -ForegroundColor Cyan "Building SDL2 NuGet packages..."
-        Write-Host -ForegroundColor Cyan "... via NuGet install: $NugetPath"
-        $NugetOutputDir = "$PSScriptRoot\..\VisualC-WinRT\lib\nuget"
-        Write-Host -ForegroundColor Cyan "...  output directory: $NugetOutputDir"
-        $SDLHGRevision = $($(hg log -l 1 --repository "$PSScriptRoot\.." | select-string "changeset") -Replace "changeset:\W*(\d+).*",'$1') 2>$null
-        Write-Host -ForegroundColor Cyan "...       HG Revision: $SDLHGRevision"
-
-        # Base options to nuget.exe
-        $NugetOptions = @("pack", "PACKAGE_NAME_WILL_GO_HERE", "-Output", "$NugetOutputDir")
-
-        # Try attaching hg revision to NuGet package:
-        $NugetOptions += "-Version"
-        if ("$SDLHGRevision" -eq "") {
-            Write-Warning -Message "Unable to find the Mercurial revision (maybe hg.exe can't be found?).  NuGet packages will not have this attached to their name."
-            $NugetOptions += "$SDLVersion-Unofficial"
-        } else {
-            $NugetOptions += "$SDLVersion.$SDLHGRevision-Unofficial"
-        }
-
-        # Create NuGet output dir, if not yet created:
-        if ($(Test-Path "$NugetOutputDir") -eq $false) {
-            New-Item "$NugetOutputDir" -type directory
-        }
-
-        # Package SDL2:
-        $NugetOptions[1] = "$PSScriptRoot\..\VisualC-WinRT\SDL2-WinRT.nuspec"
-        &"$NugetPath" $NugetOptions -Symbols
-        if ( ! $? ) { $DidAnyNugetBuildFail = $true }
-
-        # Package SDL2main:
-        $NugetOptions[1] = "$PSScriptRoot\..\VisualC-WinRT\SDL2main-WinRT-NonXAML.nuspec"
-        &"$NugetPath" $NugetOptions
-        if ( ! $? ) { $DidAnyNugetBuildFail = $true }
-    }
-}
-
-
-# Let the script's caller know whether or not any errors occurred.
-# Exit codes compatible with Buildbot are used (1 for error, 0 for success).
-if ($DidAnyDLLBuildFail -eq $true) {
-    Write-Error -Message "Unable to build all known variants of SDL2 for WinRT"
-    exit 1
-} elseif ($DidAnyNugetBuildFail -eq $true) {
-    Write-Warning -Message "Unable to build NuGet packages"
-    exit 0  # Should NuGet package build failure lead to a non-failing result code instead?
-} else {
-    exit 0
-}

+ 40 - 0
Engine/lib/sdl/cmake/CheckCPUArchitecture.cmake

@@ -0,0 +1,40 @@
+include(CheckCSourceCompiles)
+include(CMakePushCheckState)
+
+function(_internal_check_cpu_architecture macro_check NAME VARIABLE)
+  cmake_push_check_state(RESET)
+  string(TOUPPER "${NAME}" UPPER_NAME)
+  set(CACHE_VARIABLE "CHECK_CPU_ARCHITECTURE_${UPPER_NAME}")
+  set(test_src "
+int main(int argc, char *argv[]) {
+#if ${macro_check}
+  return 0;
+#else
+  choke
+#endif
+}
+")
+  check_c_source_compiles("${test_src}" "${CACHE_VARIABLE}")
+  cmake_pop_check_state()
+  if(${CACHE_VARIABLE})
+    set(${VARIABLE} "TRUE" PARENT_SCOPE)
+  else()
+    set(${VARIABLE} "FALSE" PARENT_SCOPE)
+  endif()
+endfunction()
+
+function(check_cpu_architecture ARCH VARIABLE)
+  if(ARCH STREQUAL "x86")
+    _internal_check_cpu_architecture("defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) ||defined( __i386) || defined(_M_IX86)" x86 ${VARIABLE})
+  elseif(ARCH STREQUAL "x64")
+    _internal_check_cpu_architecture("defined(__amd64__) || defined(__amd64) || defined(__x86_64__) || defined(__x86_64) || defined(_M_X64) || defined(_M_AMD64)" x64 ${VARIABLE})
+  elseif(ARCH STREQUAL "arm32")
+    _internal_check_cpu_architecture("defined(__arm__) || defined(_M_ARM)" arm32 ${VARIABLE})
+  elseif(ARCH STREQUAL "arm64")
+    _internal_check_cpu_architecture("defined(__aarch64__) || defined(_M_ARM64)" arm64 ${VARIABLE})
+  else()
+    message(WARNING "Unknown CPU architectures (${ARCH}).")
+    set(${VARIABLE} FALSE)
+  endif()
+  set("${VARIABLE}" "${${VARIABLE}}" PARENT_SCOPE)
+endfunction()

+ 17 - 6
Engine/lib/sdl/cmake/macros.cmake

@@ -17,8 +17,8 @@ macro(SET_OPTION _NAME _DESC)
 endmacro()
 endmacro()
 
 
 macro(DEP_OPTION _NAME _DESC _DEFLT _DEPTEST _FAILDFLT)
 macro(DEP_OPTION _NAME _DESC _DEFLT _DEPTEST _FAILDFLT)
-  add_to_alloptions(${_NAME})
-  cmake_dependent_option(${_NAME} ${_DESC} ${_DEFLT} ${_DEPTEST} ${_FAILDFLT})
+  add_to_alloptions("${_NAME}")
+  cmake_dependent_option("${_NAME}" "${_DESC}" "${_DEFLT}" "${_DEPTEST}" "${_FAILDFLT}")
 endmacro()
 endmacro()
 
 
 macro(OPTION_STRING _NAME _DESC _VALUE)
 macro(OPTION_STRING _NAME _DESC _VALUE)
@@ -74,7 +74,7 @@ macro(LISTTOSTR _LIST _OUTPUT)
   # Do not use string(REPLACE ";" " ") here to avoid messing up list
   # Do not use string(REPLACE ";" " ") here to avoid messing up list
   # entries
   # entries
   foreach(_ITEM ${${_LIST}})
   foreach(_ITEM ${${_LIST}})
-    set(${_OUTPUT} "${_LPREFIX}${_ITEM} ${${_OUTPUT}}")
+    set(${_OUTPUT} "${${_OUTPUT}} ${_LPREFIX}${_ITEM}")
   endforeach()
   endforeach()
 endmacro()
 endmacro()
 
 
@@ -88,15 +88,19 @@ macro(LISTTOSTRREV _LIST _OUTPUT)
   # Do not use string(REPLACE ";" " ") here to avoid messing up list
   # Do not use string(REPLACE ";" " ") here to avoid messing up list
   # entries
   # entries
   foreach(_ITEM ${${_LIST}})
   foreach(_ITEM ${${_LIST}})
-    set(${_OUTPUT} "${${_OUTPUT}} ${_LPREFIX}${_ITEM}")
+    set(${_OUTPUT} "${_LPREFIX}${_ITEM} ${${_OUTPUT}}")
   endforeach()
   endforeach()
 endmacro()
 endmacro()
 
 
-if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
+if(CMAKE_VERSION VERSION_LESS 3.16.0 OR SDL2_SUBPROJECT)
+  # - CMake versions <3.16 do not support the OBJC language
+  # - When SDL is built as a subproject and when the main project does not enable OBJC,
+  #   CMake fails due to missing internal CMake variables (CMAKE_OBJC_COMPILE_OBJECT)
+  #   (reproduced with CMake 3.24.2)
   macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
   macro(CHECK_OBJC_SOURCE_COMPILES SOURCE VAR)
     set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
     set(PREV_REQUIRED_DEFS "${CMAKE_REQUIRED_DEFINITIONS}")
     set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
     set(CMAKE_REQUIRED_DEFINITIONS "-x objective-c ${PREV_REQUIRED_DEFS}")
-    CHECK_C_SOURCE_COMPILES(${SOURCE} ${VAR})
+    CHECK_C_SOURCE_COMPILES("${SOURCE}" ${VAR})
     set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
     set(CMAKE_REQUIRED_DEFINITIONS "${PREV_REQUIRED_DEFS}")
   endmacro()
   endmacro()
 else()
 else()
@@ -106,6 +110,13 @@ else()
   endif()
   endif()
 endif()
 endif()
 
 
+if(APPLE)
+  check_language(OBJC)
+  if(NOT CMAKE_OBJC_COMPILER)
+    message(WARNING "Cannot find working OBJC compiler.")
+  endif()
+endif()
+
 if(CMAKE_VERSION VERSION_LESS 3.13.0)
 if(CMAKE_VERSION VERSION_LESS 3.13.0)
   macro(target_link_directories _TARGET _SCOPE)
   macro(target_link_directories _TARGET _SCOPE)
     link_directories(${ARGN})
     link_directories(${ARGN})

+ 221 - 189
Engine/lib/sdl/cmake/sdlchecks.cmake

@@ -1,8 +1,11 @@
+include(CMakeParseArguments)
 macro(FindLibraryAndSONAME _LIB)
 macro(FindLibraryAndSONAME _LIB)
+  cmake_parse_arguments(FLAS "" "" "LIBDIRS" ${ARGN})
+
   string(TOUPPER ${_LIB} _UPPERLNAME)
   string(TOUPPER ${_LIB} _UPPERLNAME)
   string(REGEX REPLACE "\\-" "_" _LNAME "${_UPPERLNAME}")
   string(REGEX REPLACE "\\-" "_" _LNAME "${_UPPERLNAME}")
 
 
-  find_library(${_LNAME}_LIB ${_LIB})
+  find_library(${_LNAME}_LIB ${_LIB} PATHS ${FLAS_LIBDIRS})
   if(${_LNAME}_LIB)
   if(${_LNAME}_LIB)
     # reduce the library name for shared linking
     # reduce the library name for shared linking
 
 
@@ -30,28 +33,19 @@ macro(FindLibraryAndSONAME _LIB)
 endmacro()
 endmacro()
 
 
 macro(CheckDLOPEN)
 macro(CheckDLOPEN)
-  check_symbol_exists(dlopen "dlfcn.h" HAVE_DLOPEN)
-  if(NOT HAVE_DLOPEN)
-    check_library_exists(dl dlopen "" DLOPEN_LIB)
-    if(DLOPEN_LIB)
+  cmake_push_check_state(RESET)
+  check_symbol_exists(dlopen "dlfcn.h" HAVE_DLOPEN_IN_LIBC)
+  if(NOT HAVE_DLOPEN_IN_LIBC)
+    set(CMAKE_REQUIRED_LIBRARIES dl)
+    check_symbol_exists(dlopen "dlfcn.h" HAVE_DLOPEN_IN_LIBDL)
+    if(HAVE_DLOPEN_IN_LIBDL)
       list(APPEND EXTRA_LIBS dl)
       list(APPEND EXTRA_LIBS dl)
-      set(_DLLIB dl)
-      set(HAVE_DLOPEN TRUE)
     endif()
     endif()
   endif()
   endif()
-  if(HAVE_DLOPEN)
-    if(_DLLIB)
-      set(CMAKE_REQUIRED_LIBRARIES ${_DLLIB})
-    endif()
-    check_c_source_compiles("
-       #include <dlfcn.h>
-       int main(int argc, char **argv) {
-         void *handle = dlopen(\"\", RTLD_NOW);
-         const char *loaderror = (char *) dlerror();
-         return 0;
-       }" HAVE_DLOPEN)
-    set(CMAKE_REQUIRED_LIBRARIES)
+  if(HAVE_DLOPEN_IN_LIBC OR HAVE_DLOPEN_IN_LIBDL)
+    set(HAVE_DLOPEN TRUE)
   endif()
   endif()
+  cmake_pop_check_state()
 endmacro()
 endmacro()
 
 
 macro(CheckO_CLOEXEC)
 macro(CheckO_CLOEXEC)
@@ -65,26 +59,16 @@ endmacro()
 # - n/a
 # - n/a
 macro(CheckOSS)
 macro(CheckOSS)
   if(SDL_OSS)
   if(SDL_OSS)
-    set(OSS_HEADER_FILE "sys/soundcard.h")
     check_c_source_compiles("
     check_c_source_compiles("
         #include <sys/soundcard.h>
         #include <sys/soundcard.h>
-        int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" OSS_FOUND)
-    if(NOT OSS_FOUND)
-      set(OSS_HEADER_FILE "soundcard.h")
-      check_c_source_compiles("
-          #include <soundcard.h>
-          int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" OSS_FOUND)
-    endif()
+        int main(int argc, char **argv) { int arg = SNDCTL_DSP_SETFRAGMENT; return 0; }" HAVE_OSS_SYS_SOUNDCARD_H)
 
 
-    if(OSS_FOUND)
+    if(HAVE_OSS_SYS_SOUNDCARD_H)
       set(HAVE_OSS TRUE)
       set(HAVE_OSS TRUE)
       file(GLOB OSS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/dsp/*.c)
       file(GLOB OSS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/dsp/*.c)
-      if(OSS_HEADER_FILE STREQUAL "soundcard.h")
-        set(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H 1)
-      endif()
       set(SDL_AUDIO_DRIVER_OSS 1)
       set(SDL_AUDIO_DRIVER_OSS 1)
-      set(SOURCE_FILES ${SOURCE_FILES} ${OSS_SOURCES})
-      if(NETBSD OR OPENBSD)
+      list(APPEND SOURCE_FILES ${OSS_SOURCES})
+      if(NETBSD)
         list(APPEND EXTRA_LIBS ossaudio)
         list(APPEND EXTRA_LIBS ossaudio)
       endif()
       endif()
       set(HAVE_SDL_AUDIO TRUE)
       set(HAVE_SDL_AUDIO TRUE)
@@ -106,13 +90,13 @@ macro(CheckALSA)
     if(HAVE_LIBASOUND)
     if(HAVE_LIBASOUND)
       set(HAVE_ALSA TRUE)
       set(HAVE_ALSA TRUE)
       file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
       file(GLOB ALSA_SOURCES ${SDL2_SOURCE_DIR}/src/audio/alsa/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${ALSA_SOURCES})
+      list(APPEND SOURCE_FILES ${ALSA_SOURCES})
       set(SDL_AUDIO_DRIVER_ALSA 1)
       set(SDL_AUDIO_DRIVER_ALSA 1)
       if(SDL_ALSA_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_ALSA_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic ALSA loading")
         message_warn("You must have SDL_LoadObject() support for dynamic ALSA loading")
       endif()
       endif()
-      if(SDL_ALSA_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME("asound")
+      FindLibraryAndSONAME("asound")
+      if(SDL_ALSA_SHARED AND ASOUND_LIB AND HAVE_SDL_LOADSO)
         set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"")
         set(SDL_AUDIO_DRIVER_ALSA_DYNAMIC "\"${ASOUND_LIB_SONAME}\"")
         set(HAVE_ALSA_SHARED TRUE)
         set(HAVE_ALSA_SHARED TRUE)
       else()
       else()
@@ -134,14 +118,14 @@ macro(CheckPipewire)
         if(PKG_PIPEWIRE_FOUND)
         if(PKG_PIPEWIRE_FOUND)
             set(HAVE_PIPEWIRE TRUE)
             set(HAVE_PIPEWIRE TRUE)
             file(GLOB PIPEWIRE_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pipewire/*.c)
             file(GLOB PIPEWIRE_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pipewire/*.c)
-            set(SOURCE_FILES ${SOURCE_FILES} ${PIPEWIRE_SOURCES})
+            list(APPEND SOURCE_FILES ${PIPEWIRE_SOURCES})
             set(SDL_AUDIO_DRIVER_PIPEWIRE 1)
             set(SDL_AUDIO_DRIVER_PIPEWIRE 1)
             list(APPEND EXTRA_CFLAGS ${PKG_PIPEWIRE_CFLAGS})
             list(APPEND EXTRA_CFLAGS ${PKG_PIPEWIRE_CFLAGS})
             if(SDL_PIPEWIRE_SHARED AND NOT HAVE_SDL_LOADSO)
             if(SDL_PIPEWIRE_SHARED AND NOT HAVE_SDL_LOADSO)
                 message_warn("You must have SDL_LoadObject() support for dynamic Pipewire loading")
                 message_warn("You must have SDL_LoadObject() support for dynamic Pipewire loading")
             endif()
             endif()
-            if(SDL_PIPEWIRE_SHARED AND HAVE_SDL_LOADSO)
-                FindLibraryAndSONAME("pipewire-0.3")
+            FindLibraryAndSONAME("pipewire-0.3" LIBDIRS ${PKG_PIPEWIRE_LIBRARY_DIRS})
+            if(SDL_PIPEWIRE_SHARED AND PIPEWIRE_0.3_LIB AND HAVE_SDL_LOADSO)
                 set(SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC "\"${PIPEWIRE_0.3_LIB_SONAME}\"")
                 set(SDL_AUDIO_DRIVER_PIPEWIRE_DYNAMIC "\"${PIPEWIRE_0.3_LIB_SONAME}\"")
                 set(HAVE_PIPEWIRE_SHARED TRUE)
                 set(HAVE_PIPEWIRE_SHARED TRUE)
             else()
             else()
@@ -163,14 +147,14 @@ macro(CheckPulseAudio)
     if(PKG_PULSEAUDIO_FOUND)
     if(PKG_PULSEAUDIO_FOUND)
       set(HAVE_PULSEAUDIO TRUE)
       set(HAVE_PULSEAUDIO TRUE)
       file(GLOB PULSEAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pulseaudio/*.c)
       file(GLOB PULSEAUDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/pulseaudio/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${PULSEAUDIO_SOURCES})
+      list(APPEND SOURCE_FILES ${PULSEAUDIO_SOURCES})
       set(SDL_AUDIO_DRIVER_PULSEAUDIO 1)
       set(SDL_AUDIO_DRIVER_PULSEAUDIO 1)
       list(APPEND EXTRA_CFLAGS ${PKG_PULSEAUDIO_CFLAGS})
       list(APPEND EXTRA_CFLAGS ${PKG_PULSEAUDIO_CFLAGS})
       if(SDL_PULSEAUDIO_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_PULSEAUDIO_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic PulseAudio loading")
         message_warn("You must have SDL_LoadObject() support for dynamic PulseAudio loading")
       endif()
       endif()
-      if(SDL_PULSEAUDIO_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME("pulse-simple")
+      FindLibraryAndSONAME("pulse-simple" LIBDIRS ${PKG_PULSEAUDIO_LIBRARY_DIRS})
+      if(SDL_PULSEAUDIO_SHARED AND PULSE_SIMPLE_LIB AND HAVE_SDL_LOADSO)
         set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
         set(SDL_AUDIO_DRIVER_PULSEAUDIO_DYNAMIC "\"${PULSE_SIMPLE_LIB_SONAME}\"")
         set(HAVE_PULSEAUDIO_SHARED TRUE)
         set(HAVE_PULSEAUDIO_SHARED TRUE)
       else()
       else()
@@ -192,14 +176,14 @@ macro(CheckJACK)
     if(PKG_JACK_FOUND)
     if(PKG_JACK_FOUND)
       set(HAVE_JACK TRUE)
       set(HAVE_JACK TRUE)
       file(GLOB JACK_SOURCES ${SDL2_SOURCE_DIR}/src/audio/jack/*.c)
       file(GLOB JACK_SOURCES ${SDL2_SOURCE_DIR}/src/audio/jack/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${JACK_SOURCES})
+      list(APPEND SOURCE_FILES ${JACK_SOURCES})
       set(SDL_AUDIO_DRIVER_JACK 1)
       set(SDL_AUDIO_DRIVER_JACK 1)
       list(APPEND EXTRA_CFLAGS ${PKG_JACK_CFLAGS})
       list(APPEND EXTRA_CFLAGS ${PKG_JACK_CFLAGS})
       if(SDL_JACK_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_JACK_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic JACK audio loading")
         message_warn("You must have SDL_LoadObject() support for dynamic JACK audio loading")
       endif()
       endif()
-      if(SDL_JACK_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME("jack")
+      FindLibraryAndSONAME("jack" LIBDIRS ${PKG_JACK_LIBRARY_DIRS})
+      if(SDL_JACK_SHARED AND JACK_LIB AND HAVE_SDL_LOADSO)
         set(SDL_AUDIO_DRIVER_JACK_DYNAMIC "\"${JACK_LIB_SONAME}\"")
         set(SDL_AUDIO_DRIVER_JACK_DYNAMIC "\"${JACK_LIB_SONAME}\"")
         set(HAVE_JACK_SHARED TRUE)
         set(HAVE_JACK_SHARED TRUE)
       else()
       else()
@@ -221,14 +205,14 @@ macro(CheckESD)
     if(PKG_ESD_FOUND)
     if(PKG_ESD_FOUND)
       set(HAVE_ESD TRUE)
       set(HAVE_ESD TRUE)
       file(GLOB ESD_SOURCES ${SDL2_SOURCE_DIR}/src/audio/esd/*.c)
       file(GLOB ESD_SOURCES ${SDL2_SOURCE_DIR}/src/audio/esd/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${ESD_SOURCES})
+      list(APPEND SOURCE_FILES ${ESD_SOURCES})
       set(SDL_AUDIO_DRIVER_ESD 1)
       set(SDL_AUDIO_DRIVER_ESD 1)
       list(APPEND EXTRA_CFLAGS ${PKG_ESD_CFLAGS})
       list(APPEND EXTRA_CFLAGS ${PKG_ESD_CFLAGS})
       if(SDL_ESD_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_ESD_SHARED AND NOT HAVE_SDL_LOADSO)
           message_warn("You must have SDL_LoadObject() support for dynamic ESD loading")
           message_warn("You must have SDL_LoadObject() support for dynamic ESD loading")
       endif()
       endif()
-      if(SDL_ESD_SHARED AND HAVE_SDL_LOADSO)
-          FindLibraryAndSONAME(esd)
+      FindLibraryAndSONAME(esd LIBDIRS ${PKG_ESD_LIBRARY_DIRS})
+      if(SDL_ESD_SHARED AND ESD_LIB AND HAVE_SDL_LOADSO)
           set(SDL_AUDIO_DRIVER_ESD_DYNAMIC "\"${ESD_LIB_SONAME}\"")
           set(SDL_AUDIO_DRIVER_ESD_DYNAMIC "\"${ESD_LIB_SONAME}\"")
           set(HAVE_ESD_SHARED TRUE)
           set(HAVE_ESD_SHARED TRUE)
       else()
       else()
@@ -254,15 +238,15 @@ macro(CheckARTS)
       execute_process(CMD_ARTSLIBS ${ARTS_CONFIG} --libs
       execute_process(CMD_ARTSLIBS ${ARTS_CONFIG} --libs
         OUTPUT_VARIABLE ARTS_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
         OUTPUT_VARIABLE ARTS_LIBS OUTPUT_STRIP_TRAILING_WHITESPACE)
       file(GLOB ARTS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/arts/*.c)
       file(GLOB ARTS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/arts/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${ARTS_SOURCES})
+      list(APPEND SOURCE_FILES ${ARTS_SOURCES})
       set(SDL_AUDIO_DRIVER_ARTS 1)
       set(SDL_AUDIO_DRIVER_ARTS 1)
       set(HAVE_ARTS TRUE)
       set(HAVE_ARTS TRUE)
       if(SDL_ARTS_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_ARTS_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic ARTS loading")
         message_warn("You must have SDL_LoadObject() support for dynamic ARTS loading")
       endif()
       endif()
-      if(SDL_ARTS_SHARED AND HAVE_SDL_LOADSO)
+      FindLibraryAndSONAME(artsc)
+      if(SDL_ARTS_SHARED AND ARTSC_LIB AND HAVE_SDL_LOADSO)
         # TODO
         # TODO
-        FindLibraryAndSONAME(artsc)
         set(SDL_AUDIO_DRIVER_ARTS_DYNAMIC "\"${ARTSC_LIB_SONAME}\"")
         set(SDL_AUDIO_DRIVER_ARTS_DYNAMIC "\"${ARTSC_LIB_SONAME}\"")
         set(HAVE_ARTS_SHARED TRUE)
         set(HAVE_ARTS_SHARED TRUE)
       else()
       else()
@@ -286,13 +270,13 @@ macro(CheckNAS)
     if(HAVE_NAS_H AND D_NAS_LIB)
     if(HAVE_NAS_H AND D_NAS_LIB)
       set(HAVE_NAS TRUE)
       set(HAVE_NAS TRUE)
       file(GLOB NAS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/nas/*.c)
       file(GLOB NAS_SOURCES ${SDL2_SOURCE_DIR}/src/audio/nas/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${NAS_SOURCES})
+      list(APPEND SOURCE_FILES ${NAS_SOURCES})
       set(SDL_AUDIO_DRIVER_NAS 1)
       set(SDL_AUDIO_DRIVER_NAS 1)
       if(SDL_NAS_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_NAS_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic NAS loading")
         message_warn("You must have SDL_LoadObject() support for dynamic NAS loading")
       endif()
       endif()
-      if(SDL_NAS_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME("audio")
+      FindLibraryAndSONAME("audio")
+      if(SDL_NAS_SHARED AND AUDIO_LIB AND HAVE_SDL_LOADSO)
         set(SDL_AUDIO_DRIVER_NAS_DYNAMIC "\"${AUDIO_LIB_SONAME}\"")
         set(SDL_AUDIO_DRIVER_NAS_DYNAMIC "\"${AUDIO_LIB_SONAME}\"")
         set(HAVE_NAS_SHARED TRUE)
         set(HAVE_NAS_SHARED TRUE)
       else()
       else()
@@ -304,29 +288,28 @@ macro(CheckNAS)
 endmacro()
 endmacro()
 
 
 # Requires:
 # Requires:
-# - n/a
+# - PkgCheckModules
 # Optional:
 # Optional:
 # - SDL_SNDIO_SHARED opt
 # - SDL_SNDIO_SHARED opt
 # - HAVE_SDL_LOADSO opt
 # - HAVE_SDL_LOADSO opt
 macro(CheckSNDIO)
 macro(CheckSNDIO)
   if(SDL_SNDIO)
   if(SDL_SNDIO)
-    # TODO: set include paths properly, so the sndio headers are found
-    check_include_file(sndio.h HAVE_SNDIO_H)
-    find_library(D_SNDIO_LIB sndio)
-    if(HAVE_SNDIO_H AND D_SNDIO_LIB)
+    pkg_check_modules(PKG_SNDIO sndio)
+    if(PKG_SNDIO_FOUND)
       set(HAVE_SNDIO TRUE)
       set(HAVE_SNDIO TRUE)
       file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
       file(GLOB SNDIO_SOURCES ${SDL2_SOURCE_DIR}/src/audio/sndio/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${SNDIO_SOURCES})
+      list(APPEND SOURCE_FILES ${SNDIO_SOURCES})
       set(SDL_AUDIO_DRIVER_SNDIO 1)
       set(SDL_AUDIO_DRIVER_SNDIO 1)
+      list(APPEND EXTRA_CFLAGS ${PKG_SNDIO_CFLAGS})
       if(SDL_SNDIO_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_SNDIO_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic sndio loading")
         message_warn("You must have SDL_LoadObject() support for dynamic sndio loading")
       endif()
       endif()
-      if(SDL_SNDIO_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME("sndio")
+      FindLibraryAndSONAME("sndio" LIBDIRS ${PKG_SNDIO_LIBRARY_DIRS})
+      if(SDL_SNDIO_SHARED AND SNDIO_LIB AND HAVE_SDL_LOADSO)
         set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${SNDIO_LIB_SONAME}\"")
         set(SDL_AUDIO_DRIVER_SNDIO_DYNAMIC "\"${SNDIO_LIB_SONAME}\"")
         set(HAVE_SNDIO_SHARED TRUE)
         set(HAVE_SNDIO_SHARED TRUE)
       else()
       else()
-        list(APPEND EXTRA_LIBS ${D_SNDIO_LIB})
+        list(APPEND EXTRA_LIBS ${PKG_SNDIO_LDFLAGS})
       endif()
       endif()
       set(HAVE_SDL_AUDIO TRUE)
       set(HAVE_SDL_AUDIO TRUE)
     endif()
     endif()
@@ -344,14 +327,14 @@ macro(CheckFusionSound)
     if(PKG_FUSIONSOUND_FOUND)
     if(PKG_FUSIONSOUND_FOUND)
       set(HAVE_FUSIONSOUND TRUE)
       set(HAVE_FUSIONSOUND TRUE)
       file(GLOB FUSIONSOUND_SOURCES ${SDL2_SOURCE_DIR}/src/audio/fusionsound/*.c)
       file(GLOB FUSIONSOUND_SOURCES ${SDL2_SOURCE_DIR}/src/audio/fusionsound/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${FUSIONSOUND_SOURCES})
+      list(APPEND SOURCE_FILES ${FUSIONSOUND_SOURCES})
       set(SDL_AUDIO_DRIVER_FUSIONSOUND 1)
       set(SDL_AUDIO_DRIVER_FUSIONSOUND 1)
       list(APPEND EXTRA_CFLAGS ${PKG_FUSIONSOUND_CFLAGS})
       list(APPEND EXTRA_CFLAGS ${PKG_FUSIONSOUND_CFLAGS})
       if(FUSIONSOUND_SHARED AND NOT HAVE_SDL_LOADSO)
       if(FUSIONSOUND_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic FusionSound loading")
         message_warn("You must have SDL_LoadObject() support for dynamic FusionSound loading")
       endif()
       endif()
-      if(FUSIONSOUND_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME("fusionsound")
+      FindLibraryAndSONAME("fusionsound" LIBDIRS ${PKG_FUSIONSOUND_LIBRARY_DIRS})
+      if(FUSIONSOUND_SHARED AND FUSIONSOUND_LIB AND HAVE_SDL_LOADSO)
         set(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "\"${FUSIONSOUND_LIB_SONAME}\"")
         set(SDL_AUDIO_DRIVER_FUSIONSOUND_DYNAMIC "\"${FUSIONSOUND_LIB_SONAME}\"")
         set(HAVE_FUSIONSOUND_SHARED TRUE)
         set(HAVE_FUSIONSOUND_SHARED TRUE)
       else()
       else()
@@ -369,18 +352,43 @@ endmacro()
 # - HAVE_SDL_LOADSO opt
 # - HAVE_SDL_LOADSO opt
 macro(CheckLibSampleRate)
 macro(CheckLibSampleRate)
   if(SDL_LIBSAMPLERATE)
   if(SDL_LIBSAMPLERATE)
-    check_include_file(samplerate.h HAVE_LIBSAMPLERATE_H)
-    if(HAVE_LIBSAMPLERATE_H)
+    find_package(SampleRate QUIET)
+    if(SampleRate_FOUND AND TARGET SampleRate::samplerate)
       set(HAVE_LIBSAMPLERATE TRUE)
       set(HAVE_LIBSAMPLERATE TRUE)
-      if(SDL_LIBSAMPLERATE_SHARED AND NOT HAVE_SDL_LOADSO)
-        message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
+      set(HAVE_LIBSAMPLERATE_H TRUE)
+      if(SDL_LIBSAMPLERATE_SHARED)
+        target_include_directories(sdl-build-options INTERFACE $<TARGET_PROPERTY:SampleRate::samplerate,INTERFACE_INCLUDE_DIRECTORIES>)
+        if(NOT HAVE_SDL_LOADSO)
+          message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
+        else()
+          get_property(_samplerate_type TARGET SampleRate::samplerate PROPERTY TYPE)
+          if(_samplerate_type STREQUAL "SHARED_LIBRARY")
+            set(HAVE_LIBSAMPLERATE_SHARED TRUE)
+            if(WIN32 OR OS2)
+              set(SDL_LIBSAMPLERATE_DYNAMIC "\"$<TARGET_FILE_NAME:SampleRate::samplerate>\"")
+            else()
+              set(SDL_LIBSAMPLERATE_DYNAMIC "\"$<TARGET_SONAME_FILE_NAME:SampleRate::samplerate>\"")
+            endif()
+          endif()
+        endif()
+      else()
+        target_link_libraries(sdl-build-options INTERFACE SampleRate::samplerate)
+        list(APPEND SDL_REQUIRES_PRIVATE SampleRate::samplerate)
       endif()
       endif()
-      if(SDL_LIBSAMPLERATE_SHARED AND HAVE_SDL_LOADSO)
+    else()
+      check_include_file(samplerate.h HAVE_LIBSAMPLERATE_H)
+      if(HAVE_LIBSAMPLERATE_H)
+        set(HAVE_LIBSAMPLERATE TRUE)
+        if(SDL_LIBSAMPLERATE_SHARED AND NOT HAVE_SDL_LOADSO)
+          message_warn("You must have SDL_LoadObject() support for dynamic libsamplerate loading")
+        endif()
         FindLibraryAndSONAME("samplerate")
         FindLibraryAndSONAME("samplerate")
-        set(SDL_LIBSAMPLERATE_DYNAMIC "\"${SAMPLERATE_LIB_SONAME}\"")
-        set(HAVE_LIBSAMPLERATE_SHARED TRUE)
-      else()
-        list(APPEND EXTRA_LDFLAGS -lsamplerate)
+        if(SDL_LIBSAMPLERATE_SHARED AND SAMPLERATE_LIB AND HAVE_SDL_LOADSO)
+          set(SDL_LIBSAMPLERATE_DYNAMIC "\"${SAMPLERATE_LIB_SONAME}\"")
+          set(HAVE_LIBSAMPLERATE_SHARED TRUE)
+        else()
+          list(APPEND EXTRA_LDFLAGS -lsamplerate)
+        endif()
       endif()
       endif()
     endif()
     endif()
   endif()
   endif()
@@ -392,12 +400,16 @@ endmacro()
 # - SDL_X11_SHARED opt
 # - SDL_X11_SHARED opt
 # - HAVE_SDL_LOADSO opt
 # - HAVE_SDL_LOADSO opt
 macro(CheckX11)
 macro(CheckX11)
+  cmake_push_check_state(RESET)
   if(SDL_X11)
   if(SDL_X11)
     foreach(_LIB X11 Xext Xcursor Xi Xfixes Xrandr Xrender Xss)
     foreach(_LIB X11 Xext Xcursor Xi Xfixes Xrandr Xrender Xss)
         FindLibraryAndSONAME("${_LIB}")
         FindLibraryAndSONAME("${_LIB}")
     endforeach()
     endforeach()
 
 
-    find_path(X_INCLUDEDIR X11/Xlib.h
+    set(X11_dirs)
+    find_path(X_INCLUDEDIR
+      NAMES X11/Xlib.h
+      PATHS
         /usr/pkg/xorg/include
         /usr/pkg/xorg/include
         /usr/X11R6/include
         /usr/X11R6/include
         /usr/X11R7/include
         /usr/X11R7/include
@@ -411,18 +423,18 @@ macro(CheckX11)
 
 
     if(X_INCLUDEDIR)
     if(X_INCLUDEDIR)
       list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}")
       list(APPEND EXTRA_CFLAGS "-I${X_INCLUDEDIR}")
-      list(APPEND CMAKE_REQUIRED_INCLUDES "${X_INCLUDEDIR}")
+      list(APPEND CMAKE_REQUIRED_INCLUDES ${X_INCLUDEDIR})
     endif()
     endif()
 
 
-    check_include_file(X11/Xcursor/Xcursor.h HAVE_XCURSOR_H)
-    check_include_file(X11/extensions/XInput2.h HAVE_XINPUT2_H)
-    check_include_file(X11/extensions/Xrandr.h HAVE_XRANDR_H)
-    check_include_file(X11/extensions/Xfixes.h HAVE_XFIXES_H_)
-    check_include_file(X11/extensions/Xrender.h HAVE_XRENDER_H)
-    check_include_file(X11/extensions/scrnsaver.h HAVE_XSS_H)
-    check_include_file(X11/extensions/shape.h HAVE_XSHAPE_H)
-    check_include_files("X11/Xlib.h;X11/extensions/Xdbe.h" HAVE_XDBE_H)
-    check_include_files("X11/Xlib.h;X11/Xproto.h;X11/extensions/Xext.h" HAVE_XEXT_H)
+    find_file(HAVE_XCURSOR_H NAMES "X11/Xcursor/Xcursor.h" HINTS "${X_INCLUDEDIR}")
+    find_file(HAVE_XINPUT2_H NAMES "X11/extensions/XInput2.h" HINTS "${X_INCLUDEDIR}")
+    find_file(HAVE_XRANDR_H NAMES "X11/extensions/Xrandr.h" HINTS "${X_INCLUDEDIR}")
+    find_file(HAVE_XFIXES_H_ NAMES "X11/extensions/Xfixes.h" HINTS "${X_INCLUDEDIR}")
+    find_file(HAVE_XRENDER_H NAMES "X11/extensions/Xrender.h" HINTS "${X_INCLUDEDIR}")
+    find_file(HAVE_XSS_H NAMES "X11/extensions/scrnsaver.h" HINTS "${X_INCLUDEDIR}")
+    find_file(HAVE_XSHAPE_H NAMES "X11/extensions/shape.h" HINTS "${X_INCLUDEDIR}")
+    find_file(HAVE_XDBE_H NAMES "X11/extensions/Xdbe.h" HINTS "${X_INCLUDEDIR}")
+    find_file(HAVE_XEXT_H NAMES "X11/extensions/Xext.h" HINTS "${X_INCLUDEDIR}")
 
 
     if(X11_LIB)
     if(X11_LIB)
       if(NOT HAVE_XEXT_H)
       if(NOT HAVE_XEXT_H)
@@ -433,7 +445,7 @@ macro(CheckX11)
       set(HAVE_SDL_VIDEO TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 
 
       file(GLOB X11_SOURCES ${SDL2_SOURCE_DIR}/src/video/x11/*.c)
       file(GLOB X11_SOURCES ${SDL2_SOURCE_DIR}/src/video/x11/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${X11_SOURCES})
+      list(APPEND SOURCE_FILES ${X11_SOURCES})
       set(SDL_VIDEO_DRIVER_X11 1)
       set(SDL_VIDEO_DRIVER_X11 1)
 
 
       # !!! FIXME: why is this disabled for Apple?
       # !!! FIXME: why is this disabled for Apple?
@@ -441,13 +453,13 @@ macro(CheckX11)
         set(SDL_X11_SHARED OFF)
         set(SDL_X11_SHARED OFF)
       endif()
       endif()
 
 
-      check_symbol_exists(shmat "sys/shm.h" HAVE_SHMAT)
-      if(NOT HAVE_SHMAT)
-        check_library_exists(ipc shmat "" HAVE_SHMAT)
-        if(HAVE_SHMAT)
+      check_symbol_exists(shmat "sys/shm.h" HAVE_SHMAT_IN_LIBC)
+      if(NOT HAVE_SHMAT_IN_LIBC)
+        check_library_exists(ipc shmat "" HAVE_SHMAT_IN_LIBIPC)
+        if(HAVE_SHMAT_IN_LIBIPC)
           list(APPEND EXTRA_LIBS ipc)
           list(APPEND EXTRA_LIBS ipc)
         endif()
         endif()
-        if(NOT HAVE_SHMAT)
+        if(NOT HAVE_SHMAT_IN_LIBIPC)
           list(APPEND EXTRA_CFLAGS "-DNO_SHARED_MEMORY")
           list(APPEND EXTRA_CFLAGS "-DNO_SHARED_MEMORY")
         endif()
         endif()
       endif()
       endif()
@@ -459,11 +471,19 @@ macro(CheckX11)
         else()
         else()
           set(HAVE_X11_SHARED TRUE)
           set(HAVE_X11_SHARED TRUE)
         endif()
         endif()
-        if(HAVE_X11_SHARED)
-          set(SDL_VIDEO_DRIVER_X11_DYNAMIC "\"${X11_LIB_SONAME}\"")
-          set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "\"${XEXT_LIB_SONAME}\"")
-        else()
-          list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
+        if(X11_LIB)
+          if(HAVE_X11_SHARED)
+            set(SDL_VIDEO_DRIVER_X11_DYNAMIC "\"${X11_LIB_SONAME}\"")
+          else()
+            list(APPEND EXTRA_LIBS ${X11_LIB})
+          endif()
+        endif()
+        if(XEXT_LIB)
+          if(HAVE_X11_SHARED)
+            set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "\"${XEXT_LIB_SONAME}\"")
+          else()
+            list(APPEND EXTRA_LIBS ${XEXT_LIB_SONAME})
+          endif()
         endif()
         endif()
       else()
       else()
           list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
           list(APPEND EXTRA_LIBS ${X11_LIB} ${XEXT_LIB})
@@ -487,9 +507,9 @@ macro(CheckX11)
 
 
       check_symbol_exists(XkbKeycodeToKeysym "X11/Xlib.h;X11/XKBlib.h" SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM)
       check_symbol_exists(XkbKeycodeToKeysym "X11/Xlib.h;X11/XKBlib.h" SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM)
 
 
-      if(SDL_X11_XCURSOR AND HAVE_XCURSOR_H)
+      if(SDL_X11_XCURSOR AND HAVE_XCURSOR_H AND XCURSOR_LIB)
         set(HAVE_X11_XCURSOR TRUE)
         set(HAVE_X11_XCURSOR TRUE)
-        if(HAVE_X11_SHARED AND XCURSOR_LIB)
+        if(HAVE_X11_SHARED)
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB_SONAME}\"")
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XCURSOR "\"${XCURSOR_LIB_SONAME}\"")
         else()
         else()
           list(APPEND EXTRA_LIBS ${XCURSOR_LIB})
           list(APPEND EXTRA_LIBS ${XCURSOR_LIB})
@@ -502,9 +522,9 @@ macro(CheckX11)
         set(SDL_VIDEO_DRIVER_X11_XDBE 1)
         set(SDL_VIDEO_DRIVER_X11_XDBE 1)
       endif()
       endif()
 
 
-      if(SDL_X11_XINPUT AND HAVE_XINPUT2_H)
+      if(SDL_X11_XINPUT AND HAVE_XINPUT2_H AND XI_LIB)
         set(HAVE_X11_XINPUT TRUE)
         set(HAVE_X11_XINPUT TRUE)
-        if(HAVE_X11_SHARED AND XI_LIB)
+        if(HAVE_X11_SHARED)
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB_SONAME}\"")
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "\"${XI_LIB_SONAME}\"")
         else()
         else()
           list(APPEND EXTRA_LIBS ${XI_LIB})
           list(APPEND EXTRA_LIBS ${XI_LIB})
@@ -537,8 +557,8 @@ macro(CheckX11)
             BarrierEventID b;
             BarrierEventID b;
             int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H)
             int main(int argc, char **argv) { return 0; }" HAVE_XFIXES_H)
       endif()
       endif()
-      if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H)
-        if(HAVE_X11_SHARED AND XFIXES_LIB)
+      if(SDL_X11_XFIXES AND HAVE_XFIXES_H AND HAVE_XINPUT2_H AND XFIXES_LIB)
+        if(HAVE_X11_SHARED)
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XFIXES "\"${XFIXES_LIB_SONAME}\"")
         else()
         else()
           list(APPEND EXTRA_LIBS ${XFIXES_LIB})
           list(APPEND EXTRA_LIBS ${XFIXES_LIB})
@@ -547,8 +567,8 @@ macro(CheckX11)
         set(HAVE_X11_XFIXES TRUE)
         set(HAVE_X11_XFIXES TRUE)
       endif()
       endif()
 
 
-      if(SDL_X11_XRANDR AND HAVE_XRANDR_H)
-        if(HAVE_X11_SHARED AND XRANDR_LIB)
+      if(SDL_X11_XRANDR AND HAVE_XRANDR_H AND XRANDR_LIB)
+        if(HAVE_X11_SHARED)
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"")
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "\"${XRANDR_LIB_SONAME}\"")
         else()
         else()
           list(APPEND EXTRA_LIBS ${XRANDR_LIB})
           list(APPEND EXTRA_LIBS ${XRANDR_LIB})
@@ -557,8 +577,8 @@ macro(CheckX11)
         set(HAVE_X11_XRANDR TRUE)
         set(HAVE_X11_XRANDR TRUE)
       endif()
       endif()
 
 
-      if(SDL_X11_XSCRNSAVER AND HAVE_XSS_H)
-        if(HAVE_X11_SHARED AND XSS_LIB)
+      if(SDL_X11_XSCRNSAVER AND HAVE_XSS_H AND XSS_LIB)
+        if(HAVE_X11_SHARED)
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"")
           set(SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "\"${XSS_LIB_SONAME}\"")
         else()
         else()
           list(APPEND EXTRA_LIBS ${XSS_LIB})
           list(APPEND EXTRA_LIBS ${XSS_LIB})
@@ -579,6 +599,7 @@ macro(CheckX11)
     # Prevent Mesa from including X11 headers
     # Prevent Mesa from including X11 headers
     list(APPEND EXTRA_CFLAGS "-DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11")
     list(APPEND EXTRA_CFLAGS "-DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11")
   endif()
   endif()
+  cmake_pop_check_state()
 endmacro()
 endmacro()
 
 
 macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
 macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
@@ -599,7 +620,8 @@ macro(WaylandProtocolGen _SCANNER _CODE_MODE _XML _PROTL)
         ARGS "${_CODE_MODE}" "${_XML}" "${_WAYLAND_PROT_C_CODE}"
         ARGS "${_CODE_MODE}" "${_XML}" "${_WAYLAND_PROT_C_CODE}"
     )
     )
 
 
-    set(SOURCE_FILES ${SOURCE_FILES} "${_WAYLAND_PROT_C_CODE}")
+    list(APPEND SDL_GENERATED_HEADERS "${_WAYLAND_PROT_H_CODE}")
+    list(APPEND SOURCE_FILES "${_WAYLAND_PROT_C_CODE}")
 endmacro()
 endmacro()
 
 
 # Requires:
 # Requires:
@@ -610,9 +632,11 @@ endmacro()
 # - HAVE_SDL_LOADSO opt
 # - HAVE_SDL_LOADSO opt
 macro(CheckWayland)
 macro(CheckWayland)
   if(SDL_WAYLAND)
   if(SDL_WAYLAND)
-    pkg_check_modules(WAYLAND "wayland-client>=1.18" wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
+    set(WAYLAND_FOUND FALSE)
+    pkg_check_modules(PKG_WAYLAND "wayland-client>=1.18" wayland-egl wayland-cursor egl "xkbcommon>=0.5.0")
 
 
-    if(WAYLAND_FOUND)
+    if(PKG_WAYLAND_FOUND)
+      set(WAYLAND_FOUND TRUE)
       find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)
       find_program(WAYLAND_SCANNER NAMES wayland-scanner REQUIRED)
       execute_process(
       execute_process(
         COMMAND ${WAYLAND_SCANNER} --version
         COMMAND ${WAYLAND_SCANNER} --version
@@ -635,14 +659,14 @@ macro(CheckWayland)
     endif()
     endif()
 
 
     if(WAYLAND_FOUND)
     if(WAYLAND_FOUND)
-      target_link_directories(sdl-build-options INTERFACE "${WAYLAND_LIBRARY_DIRS}")
-      target_include_directories(sdl-build-options INTERFACE "${WAYLAND_INCLUDE_DIRS}")
+      target_link_directories(sdl-build-options INTERFACE "${PKG_WAYLAND_LIBRARY_DIRS}")
+      target_include_directories(sdl-build-options INTERFACE "${PKG_WAYLAND_INCLUDE_DIRS}")
 
 
       set(HAVE_WAYLAND TRUE)
       set(HAVE_WAYLAND TRUE)
       set(HAVE_SDL_VIDEO TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 
 
       file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
       file(GLOB WAYLAND_SOURCES ${SDL2_SOURCE_DIR}/src/video/wayland/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${WAYLAND_SOURCES})
+      list(APPEND SOURCE_FILES ${WAYLAND_SOURCES})
 
 
       # We have to generate some protocol interface code for some unstable Wayland features.
       # We have to generate some protocol interface code for some unstable Wayland features.
       file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
       file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols")
@@ -662,36 +686,36 @@ macro(CheckWayland)
       if(SDL_WAYLAND_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_WAYLAND_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic Wayland loading")
         message_warn("You must have SDL_LoadObject() support for dynamic Wayland loading")
       endif()
       endif()
-      if(SDL_WAYLAND_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME(wayland-client)
-        FindLibraryAndSONAME(wayland-egl)
-        FindLibraryAndSONAME(wayland-cursor)
-        FindLibraryAndSONAME(xkbcommon)
+      FindLibraryAndSONAME(wayland-client LIBDIRS ${PKG_WAYLAND_LIBRARY_DIRS})
+      FindLibraryAndSONAME(wayland-egl LIBDIRS ${PKG_WAYLAND_LIBRARY_DIRS})
+      FindLibraryAndSONAME(wayland-cursor LIBDIRS ${PKG_WAYLAND_LIBRARY_DIRS})
+      FindLibraryAndSONAME(xkbcommon LIBDIRS ${PKG_WAYLAND_LIBRARY_DIRS})
+      if(SDL_WAYLAND_SHARED AND WAYLAND_CLIENT_LIB AND WAYLAND_EGL_LIB AND WAYLAND_CURSOR_LIB AND XKBCOMMON_LIB AND HAVE_SDL_LOADSO)
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC "\"${WAYLAND_CLIENT_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC "\"${WAYLAND_CLIENT_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL "\"${WAYLAND_EGL_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL "\"${WAYLAND_EGL_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR "\"${WAYLAND_CURSOR_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR "\"${WAYLAND_CURSOR_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
         set(HAVE_WAYLAND_SHARED TRUE)
         set(HAVE_WAYLAND_SHARED TRUE)
       else()
       else()
-        set(EXTRA_LIBS ${WAYLAND_LIBRARIES} ${EXTRA_LIBS})
+        list(APPEND EXTRA_LIBS ${PKG_WAYLAND_LIBRARIES})
       endif()
       endif()
 
 
       if(SDL_WAYLAND_LIBDECOR)
       if(SDL_WAYLAND_LIBDECOR)
-        pkg_check_modules(LIBDECOR libdecor-0)
-        if(LIBDECOR_FOUND)
+        pkg_check_modules(PKG_LIBDECOR libdecor-0)
+        if(PKG_LIBDECOR_FOUND)
             set(HAVE_WAYLAND_LIBDECOR TRUE)
             set(HAVE_WAYLAND_LIBDECOR TRUE)
             set(HAVE_LIBDECOR_H 1)
             set(HAVE_LIBDECOR_H 1)
-            target_link_directories(sdl-build-options INTERFACE "${LIBDECOR_LIBRARY_DIRS}")
-            target_include_directories(sdl-build-options INTERFACE "${LIBDECOR_INCLUDE_DIRS}")
+            target_link_directories(sdl-build-options INTERFACE "${PKG_LIBDECOR_LIBRARY_DIRS}")
+            target_include_directories(sdl-build-options INTERFACE "${PKG_LIBDECOR_INCLUDE_DIRS}")
             if(SDL_WAYLAND_LIBDECOR_SHARED AND NOT HAVE_SDL_LOADSO)
             if(SDL_WAYLAND_LIBDECOR_SHARED AND NOT HAVE_SDL_LOADSO)
                 message_warn("You must have SDL_LoadObject() support for dynamic libdecor loading")
                 message_warn("You must have SDL_LoadObject() support for dynamic libdecor loading")
             endif()
             endif()
-            if(SDL_WAYLAND_LIBDECOR_SHARED AND HAVE_SDL_LOADSO)
-                set(HAVE_LIBDECOR_SHARED TRUE)
-                FindLibraryAndSONAME(decor-0)
+            FindLibraryAndSONAME(decor-0 LIBDIRS ${PKG_LIBDECOR_LIBRARY_DIRS})
+            if(SDL_WAYLAND_LIBDECOR_SHARED AND DECOR_0_LIB AND HAVE_SDL_LOADSO)
+                set(HAVE_WAYLAND_LIBDECOR_SHARED TRUE)
                 set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
                 set(SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_LIBDECOR "\"${DECOR_0_LIB_SONAME}\"")
             else()
             else()
-              set(EXTRA_LIBS ${LIBDECOR_LIBRARIES} ${EXTRA_LIBS})
+              list(APPEND EXTRA_LIBS ${PKG_LIBDECOR_LIBRARIES})
             endif()
             endif()
         endif()
         endif()
       endif()
       endif()
@@ -711,7 +735,7 @@ macro(CheckCOCOA)
     endif()
     endif()
     if(HAVE_COCOA)
     if(HAVE_COCOA)
       file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m)
       file(GLOB COCOA_SOURCES ${SDL2_SOURCE_DIR}/src/video/cocoa/*.m)
-      set(SOURCE_FILES ${SOURCE_FILES} ${COCOA_SOURCES})
+      list(APPEND SOURCE_FILES ${COCOA_SOURCES})
       set(SDL_VIDEO_DRIVER_COCOA 1)
       set(SDL_VIDEO_DRIVER_COCOA 1)
       set(HAVE_SDL_VIDEO TRUE)
       set(HAVE_SDL_VIDEO TRUE)
     endif()
     endif()
@@ -729,15 +753,16 @@ macro(CheckDirectFB)
     if(PKG_DIRECTFB_FOUND)
     if(PKG_DIRECTFB_FOUND)
       set(HAVE_DIRECTFB TRUE)
       set(HAVE_DIRECTFB TRUE)
       file(GLOB DIRECTFB_SOURCES ${SDL2_SOURCE_DIR}/src/video/directfb/*.c)
       file(GLOB DIRECTFB_SOURCES ${SDL2_SOURCE_DIR}/src/video/directfb/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${DIRECTFB_SOURCES})
+      list(APPEND SOURCE_FILES ${DIRECTFB_SOURCES})
       set(SDL_VIDEO_DRIVER_DIRECTFB 1)
       set(SDL_VIDEO_DRIVER_DIRECTFB 1)
       set(SDL_VIDEO_RENDER_DIRECTFB 1)
       set(SDL_VIDEO_RENDER_DIRECTFB 1)
       list(APPEND EXTRA_CFLAGS ${PKG_DIRECTFB_CFLAGS})
       list(APPEND EXTRA_CFLAGS ${PKG_DIRECTFB_CFLAGS})
+      list(APPEND SDL_CFLAGS ${PKG_DIRECTFB_CFLAGS})
       if(SDL_DIRECTFB_SHARED AND NOT HAVE_SDL_LOADSO)
       if(SDL_DIRECTFB_SHARED AND NOT HAVE_SDL_LOADSO)
         message_warn("You must have SDL_LoadObject() support for dynamic DirectFB loading")
         message_warn("You must have SDL_LoadObject() support for dynamic DirectFB loading")
       endif()
       endif()
-      if(SDL_DIRECTFB_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME("directfb")
+      FindLibraryAndSONAME("directfb" LIBDIRS ${PKG_DIRECTFB_LIBRARY_DIRS})
+      if(SDL_DIRECTFB_SHARED AND DIRECTFB_LIB AND HAVE_SDL_LOADSO)
         set(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC "\"${DIRECTFB_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC "\"${DIRECTFB_LIB_SONAME}\"")
         set(HAVE_DIRECTFB_SHARED TRUE)
         set(HAVE_DIRECTFB_SHARED TRUE)
       else()
       else()
@@ -765,7 +790,7 @@ macro(CheckVivante)
       set(HAVE_SDL_VIDEO TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 
 
       file(GLOB VIVANTE_SOURCES ${SDL2_SOURCE_DIR}/src/video/vivante/*.c)
       file(GLOB VIVANTE_SOURCES ${SDL2_SOURCE_DIR}/src/video/vivante/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${VIVANTE_SOURCES})
+      list(APPEND SOURCE_FILES ${VIVANTE_SOURCES})
       set(SDL_VIDEO_DRIVER_VIVANTE 1)
       set(SDL_VIDEO_DRIVER_VIVANTE 1)
       if(HAVE_VIVANTE_VDK)
       if(HAVE_VIVANTE_VDK)
         set(SDL_VIDEO_DRIVER_VIVANTE_VDK 1)
         set(SDL_VIDEO_DRIVER_VIVANTE_VDK 1)
@@ -773,7 +798,7 @@ macro(CheckVivante)
         find_library(VIVANTE_VDK_LIBRARY VDK REQUIRED)
         find_library(VIVANTE_VDK_LIBRARY VDK REQUIRED)
         list(APPEND EXTRA_LIBS ${VIVANTE_LIBRARY} ${VIVANTE_VDK_LIBRARY})
         list(APPEND EXTRA_LIBS ${VIVANTE_LIBRARY} ${VIVANTE_VDK_LIBRARY})
       else()
       else()
-        set(SDL_CFLAGS "${SDL_CFLAGS} -DLINUX -DEGL_API_FB")
+        list(APPEND SDL_CFLAGS -DLINUX -DEGL_API_FB)
         list(APPEND EXTRA_LIBS EGL)
         list(APPEND EXTRA_LIBS EGL)
       endif(HAVE_VIVANTE_VDK)
       endif(HAVE_VIVANTE_VDK)
     endif()
     endif()
@@ -883,7 +908,7 @@ macro(CheckPTHREAD)
       set(PTHREAD_LDFLAGS "-lpthread")
       set(PTHREAD_LDFLAGS "-lpthread")
     elseif(OPENBSD)
     elseif(OPENBSD)
       set(PTHREAD_CFLAGS "-D_REENTRANT")
       set(PTHREAD_CFLAGS "-D_REENTRANT")
-      set(PTHREAD_LDFLAGS "-pthread")
+      set(PTHREAD_LDFLAGS "-lpthread")
     elseif(SOLARIS)
     elseif(SOLARIS)
       set(PTHREAD_CFLAGS "-D_REENTRANT")
       set(PTHREAD_CFLAGS "-D_REENTRANT")
       set(PTHREAD_LDFLAGS "-pthread -lposix4")
       set(PTHREAD_LDFLAGS "-pthread -lposix4")
@@ -921,11 +946,9 @@ macro(CheckPTHREAD)
       set(SDL_THREAD_PTHREAD 1)
       set(SDL_THREAD_PTHREAD 1)
       list(APPEND EXTRA_CFLAGS ${PTHREAD_CFLAGS})
       list(APPEND EXTRA_CFLAGS ${PTHREAD_CFLAGS})
       list(APPEND EXTRA_LDFLAGS ${PTHREAD_LDFLAGS})
       list(APPEND EXTRA_LDFLAGS ${PTHREAD_LDFLAGS})
-      set(SDL_CFLAGS "${SDL_CFLAGS} ${PTHREAD_CFLAGS}")
-      list(APPEND SDL_LIBS ${PTHREAD_LDFLAGS})
+      list(APPEND SDL_CFLAGS ${PTHREAD_CFLAGS})
 
 
       check_c_source_compiles("
       check_c_source_compiles("
-        #define _GNU_SOURCE 1
         #include <pthread.h>
         #include <pthread.h>
         int main(int argc, char **argv) {
         int main(int argc, char **argv) {
           pthread_mutexattr_t attr;
           pthread_mutexattr_t attr;
@@ -936,7 +959,6 @@ macro(CheckPTHREAD)
         set(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1)
         set(SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1)
       else()
       else()
         check_c_source_compiles("
         check_c_source_compiles("
-            #define _GNU_SOURCE 1
             #include <pthread.h>
             #include <pthread.h>
             int main(int argc, char **argv) {
             int main(int argc, char **argv) {
               pthread_mutexattr_t attr;
               pthread_mutexattr_t attr;
@@ -967,10 +989,13 @@ macro(CheckPTHREAD)
       check_include_files("pthread_np.h" HAVE_PTHREAD_NP_H)
       check_include_files("pthread_np.h" HAVE_PTHREAD_NP_H)
       if (HAVE_PTHREAD_H)
       if (HAVE_PTHREAD_H)
         check_c_source_compiles("
         check_c_source_compiles("
-            #define _GNU_SOURCE 1
             #include <pthread.h>
             #include <pthread.h>
             int main(int argc, char **argv) {
             int main(int argc, char **argv) {
-              pthread_setname_np(pthread_self(), \"\");
+              #ifdef __APPLE__
+              pthread_setname_np(\"\");
+              #else
+              pthread_setname_np(pthread_self(),\"\");
+              #endif
               return 0;
               return 0;
             }" HAVE_PTHREAD_SETNAME_NP)
             }" HAVE_PTHREAD_SETNAME_NP)
         if (HAVE_PTHREAD_NP_H)
         if (HAVE_PTHREAD_NP_H)
@@ -1127,7 +1152,7 @@ macro(CheckUSBHID)
     endif()
     endif()
     set(SDL_JOYSTICK_USBHID 1)
     set(SDL_JOYSTICK_USBHID 1)
     file(GLOB BSD_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/bsd/*.c)
     file(GLOB BSD_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/bsd/*.c)
-    set(SOURCE_FILES ${SOURCE_FILES} ${BSD_JOYSTICK_SOURCES})
+    list(APPEND SOURCE_FILES ${BSD_JOYSTICK_SOURCES})
     list(APPEND EXTRA_CFLAGS ${USB_CFLAGS})
     list(APPEND EXTRA_CFLAGS ${USB_CFLAGS})
     list(APPEND EXTRA_LIBS ${USB_LIBS})
     list(APPEND EXTRA_LIBS ${USB_LIBS})
     set(HAVE_SDL_JOYSTICK TRUE)
     set(HAVE_SDL_JOYSTICK TRUE)
@@ -1140,47 +1165,56 @@ endmacro()
 # Check for HIDAPI support
 # Check for HIDAPI support
 macro(CheckHIDAPI)
 macro(CheckHIDAPI)
   set(HAVE_HIDAPI TRUE)
   set(HAVE_HIDAPI TRUE)
-  if(NOT HIDAPI_SKIP_LIBUSB)
-    set(HAVE_LIBUSB FALSE)
-    pkg_check_modules(LIBUSB libusb-1.0)
-    if (LIBUSB_FOUND)
-      check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS})
-      if(HAVE_LIBUSB_H)
-        set(HAVE_LIBUSB TRUE)
-        set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS}")
-        if(HIDAPI_ONLY_LIBUSB)
-          list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
-        elseif(OS2)
-          set(SDL_LIBUSB_DYNAMIC "\"usb100.dll\"")
-        else()
-          # libusb is loaded dynamically, so don't add it to EXTRA_LIBS
-          FindLibraryAndSONAME("usb-1.0")
-          set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
+  if(SDL_HIDAPI)
+    if(SDL_HIDAPI_LIBUSB)
+      set(HAVE_LIBUSB FALSE)
+      pkg_check_modules(PKG_LIBUSB libusb-1.0)
+      if(PKG_LIBUSB_FOUND)
+        check_include_file(libusb.h HAVE_LIBUSB_H ${PKG_LIBUSB_CFLAGS})
+        if(HAVE_LIBUSB_H)
+          set(HAVE_LIBUSB TRUE)
+          set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PKG_LIBUSB_CFLAGS}")
+          if(HIDAPI_ONLY_LIBUSB)
+            list(APPEND EXTRA_LIBS ${PKG_LIBUSB_LIBRARIES})
+          elseif(OS2)
+            set(SDL_LIBUSB_DYNAMIC "\"usb100.dll\"")
+          else()
+            # libusb is loaded dynamically, so don't add it to EXTRA_LIBS
+            FindLibraryAndSONAME("usb-1.0" LIBDIRS ${PKG_LIBUSB_LIBRARY_DIRS})
+            if(USB_1.0_LIB)
+              set(SDL_LIBUSB_DYNAMIC "\"${USB_1.0_LIB_SONAME}\"")
+            endif()
+          endif()
         endif()
         endif()
       endif()
       endif()
+      if(HIDAPI_ONLY_LIBUSB AND NOT HAVE_LIBUSB)
+        set(HAVE_HIDAPI FALSE)
+      endif()
+      set(HAVE_HIDAPI_LIBUSB ${HAVE_LIBUSB})
     endif()
     endif()
-    if(HIDAPI_ONLY_LIBUSB AND NOT HAVE_LIBUSB)
-      set(HAVE_HIDAPI FALSE)
-    endif()
-  endif()
 
 
-  if(HAVE_HIDAPI)
-    if(ANDROID)
-      set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
-    endif()
-    if(IOS OR TVOS)
-      set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
-      set(SDL_FRAMEWORK_COREBLUETOOTH 1)
-    endif()
-    set(HAVE_SDL_HIDAPI TRUE)
-
-    if(SDL_JOYSTICK AND SDL_HIDAPI_JOYSTICK)
-      set(SDL_JOYSTICK_HIDAPI 1)
-      set(HAVE_SDL_JOYSTICK TRUE)
-      set(HAVE_HIDAPI_JOYSTICK TRUE)
-      file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_JOYSTICK_SOURCES})
+    if(HAVE_HIDAPI)
+      if(ANDROID)
+        list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
+      endif()
+      if(IOS OR TVOS)
+        list(APPEND SOURCE_FILES ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
+        set(SDL_FRAMEWORK_COREBLUETOOTH 1)
+      endif()
+      set(HAVE_SDL_HIDAPI TRUE)
+
+      if(SDL_JOYSTICK AND SDL_HIDAPI_JOYSTICK)
+        set(SDL_JOYSTICK_HIDAPI 1)
+        set(HAVE_SDL_JOYSTICK TRUE)
+        set(HAVE_HIDAPI_JOYSTICK TRUE)
+        file(GLOB HIDAPI_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
+        list(APPEND SOURCE_FILES ${HIDAPI_JOYSTICK_SOURCES})
+      endif()
+    else()
+      set(SDL_HIDAPI_DISABLED 1)
     endif()
     endif()
+  else()
+    set(SDL_HIDAPI_DISABLED 1)
   endif()
   endif()
 endmacro()
 endmacro()
 
 
@@ -1215,7 +1249,7 @@ macro(CheckRPI)
       set(HAVE_SDL_VIDEO TRUE)
       set(HAVE_SDL_VIDEO TRUE)
       set(SDL_VIDEO_DRIVER_RPI 1)
       set(SDL_VIDEO_DRIVER_RPI 1)
       file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
       file(GLOB VIDEO_RPI_SOURCES ${SDL2_SOURCE_DIR}/src/video/raspberry/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_RPI_SOURCES})
+      list(APPEND SOURCE_FILES ${VIDEO_RPI_SOURCES})
       list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
       list(APPEND EXTRA_LIBS ${VIDEO_RPI_LIBRARIES})
       # !!! FIXME: shouldn't be using CMAKE_C_FLAGS, right?
       # !!! FIXME: shouldn't be using CMAKE_C_FLAGS, right?
       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
       set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${VIDEO_RPI_INCLUDE_FLAGS} ${VIDEO_RPI_LIBRARY_FLAGS}")
@@ -1232,19 +1266,17 @@ endmacro()
 # - HAVE_SDL_LOADSO opt
 # - HAVE_SDL_LOADSO opt
 macro(CheckKMSDRM)
 macro(CheckKMSDRM)
   if(SDL_KMSDRM)
   if(SDL_KMSDRM)
-    pkg_check_modules(KMSDRM libdrm gbm egl)
-    if(KMSDRM_FOUND AND HAVE_OPENGL_EGL)
-      link_directories(
-        ${KMSDRM_LIBRARY_DIRS}
-      )
-      target_include_directories(sdl-build-options INTERFACE "${KMSDRM_INCLUDE_DIRS}")
+    pkg_check_modules(PKG_KMSDRM libdrm gbm egl)
+    if(PKG_KMSDRM_FOUND AND HAVE_OPENGL_EGL)
+      target_link_directories(sdl-build-options INTERFACE ${PKG_KMSDRM_LIBRARY_DIRS})
+      target_include_directories(sdl-build-options INTERFACE "${PKG_KMSDRM_INCLUDE_DIRS}")
       set(HAVE_KMSDRM TRUE)
       set(HAVE_KMSDRM TRUE)
       set(HAVE_SDL_VIDEO TRUE)
       set(HAVE_SDL_VIDEO TRUE)
 
 
       file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
       file(GLOB KMSDRM_SOURCES ${SDL2_SOURCE_DIR}/src/video/kmsdrm/*.c)
-      set(SOURCE_FILES ${SOURCE_FILES} ${KMSDRM_SOURCES})
+      list(APPEND SOURCE_FILES ${KMSDRM_SOURCES})
 
 
-      list(APPEND EXTRA_CFLAGS ${KMSDRM_CFLAGS})
+      list(APPEND EXTRA_CFLAGS ${PKG_KMSDRM_CFLAGS})
 
 
       set(SDL_VIDEO_DRIVER_KMSDRM 1)
       set(SDL_VIDEO_DRIVER_KMSDRM 1)
 
 
@@ -1252,13 +1284,13 @@ macro(CheckKMSDRM)
         message_warn("You must have SDL_LoadObject() support for dynamic KMS/DRM loading")
         message_warn("You must have SDL_LoadObject() support for dynamic KMS/DRM loading")
       endif()
       endif()
       if(SDL_KMSDRM_SHARED AND HAVE_SDL_LOADSO)
       if(SDL_KMSDRM_SHARED AND HAVE_SDL_LOADSO)
-        FindLibraryAndSONAME(drm)
-        FindLibraryAndSONAME(gbm)
+        FindLibraryAndSONAME(drm LIBDIRS ${PKG_KMSDRM_LIBRARY_DIRS})
+        FindLibraryAndSONAME(gbm LIBDIRS ${PKG_KMSDRM_LIBRARY_DIRS})
         set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC "\"${DRM_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC "\"${DRM_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM "\"${GBM_LIB_SONAME}\"")
         set(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM "\"${GBM_LIB_SONAME}\"")
         set(HAVE_KMSDRM_SHARED TRUE)
         set(HAVE_KMSDRM_SHARED TRUE)
       else()
       else()
-        set(EXTRA_LIBS ${KMSDRM_LIBRARIES} ${EXTRA_LIBS})
+        list(APPEND EXTRA_LIBS ${PKG_KMSDRM_LIBRARIES})
       endif()
       endif()
     endif()
     endif()
   endif()
   endif()

+ 124 - 0
Engine/lib/sdl/cmake/test/CMakeLists.txt

@@ -0,0 +1,124 @@
+# This cmake build script is meant for verifying the various CMake configuration script.
+
+cmake_minimum_required(VERSION 3.12)
+project(sdl_test LANGUAGES C)
+
+include(GenerateExportHeader)
+
+if(ANDROID)
+    macro(add_executable NAME)
+        set(args ${ARGN})
+        list(REMOVE_ITEM args WIN32)
+        add_library(${NAME} SHARED ${args})
+        unset(args)
+    endmacro()
+endif()
+
+cmake_policy(SET CMP0074 NEW)
+
+# Override CMAKE_FIND_ROOT_PATH_MODE to allow search for SDL2 outside of sysroot
+set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE NEVER)
+
+include(FeatureSummary)
+
+option(TEST_SHARED "Test linking to shared SDL2 library" ON)
+add_feature_info("TEST_SHARED" TEST_SHARED "Test linking with shared library")
+
+option(TEST_STATIC "Test linking to static SDL2 library" ON)
+add_feature_info("TEST_STATIC" TEST_STATIC "Test linking with static library")
+
+if(TEST_SHARED)
+    find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2)
+    if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
+        find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
+    endif()
+    add_executable(gui-shared WIN32 main_gui.c)
+    if(TARGET SDL2::SDL2main)
+        target_link_libraries(gui-shared PRIVATE SDL2::SDL2main)
+    endif()
+    target_link_libraries(gui-shared PRIVATE SDL2::SDL2)
+    if(WIN32)
+        add_custom_command(TARGET gui-shared POST_BUILD
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:gui-shared>"
+        )
+    endif()
+
+    add_library(sharedlib-shared SHARED main_lib.c)
+    target_link_libraries(sharedlib-shared PRIVATE SDL2::SDL2)
+    generate_export_header(sharedlib-shared EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
+    target_compile_definitions(sharedlib-shared PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-shared_export.h\"")
+    set_target_properties(sharedlib-shared PROPERTIES C_VISIBILITY_PRESET "hidden")
+
+    add_executable(gui-shared-vars WIN32 main_gui.c)
+    target_link_libraries(gui-shared-vars PRIVATE ${SDL2_LIBRARIES})
+    target_include_directories(gui-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+
+    add_executable(cli-shared main_cli.c)
+    target_link_libraries(cli-shared PRIVATE SDL2::SDL2)
+    if(WIN32)
+        add_custom_command(TARGET cli-shared POST_BUILD
+            COMMAND ${CMAKE_COMMAND} -E copy_if_different "$<TARGET_FILE:SDL2::SDL2>" "$<TARGET_FILE_DIR:cli-shared>"
+        )
+    endif()
+
+    # SDL2_LIBRARIES does not support creating a cli SDL2 application
+    # (it is possible that SDL2main is a stub, but we don't know for sure)
+    if(NOT TARGET SDL2::SDL2main)
+        add_executable(cli-shared-vars main_cli.c)
+        target_link_libraries(cli-shared-vars PRIVATE ${SDL2_LIBRARIES})
+        target_include_directories(cli-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+    endif()
+
+    add_library(sharedlib-shared-vars SHARED main_lib.c)
+    target_link_libraries(sharedlib-shared-vars PRIVATE ${SDL2_LIBRARIES})
+    target_include_directories(sharedlib-shared-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+    generate_export_header(sharedlib-shared-vars EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
+    target_compile_definitions(sharedlib-shared-vars PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-shared-vars_export.h\"")
+    set_target_properties(sharedlib-shared-vars PROPERTIES C_VISIBILITY_PRESET "hidden")
+endif()
+
+if(TEST_STATIC)
+    find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2-static)
+    if(EMSCRIPTEN OR (WIN32 AND NOT WINDOWS_STORE))
+        find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
+    endif()
+    add_executable(gui-static WIN32 main_gui.c)
+    if(TARGET SDL2::SDL2main)
+        target_link_libraries(gui-static PRIVATE SDL2::SDL2main)
+    endif()
+    target_link_libraries(gui-static PRIVATE SDL2::SDL2-static)
+
+    option(SDL_STATIC_PIC "SDL static library has been built with PIC")
+    if(SDL_STATIC_PIC OR WIN32)
+        add_library(sharedlib-static SHARED main_lib.c)
+        target_link_libraries(sharedlib-static PRIVATE SDL2::SDL2-static)
+        generate_export_header(sharedlib-static EXPORT_MACRO_NAME MYLIBRARY_EXPORT)
+        target_compile_definitions(sharedlib-static PRIVATE "EXPORT_HEADER=\"${CMAKE_CURRENT_BINARY_DIR}/sharedlib-static_export.h\"")
+        set_target_properties(sharedlib-static PROPERTIES C_VISIBILITY_PRESET "hidden")
+    endif()
+
+    add_executable(gui-static-vars WIN32 main_gui.c)
+    target_link_libraries(gui-static-vars PRIVATE ${SDL2MAIN_LIBRARY} ${SDL2_STATIC_LIBRARIES})
+    target_include_directories(gui-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+
+    add_executable(cli-static main_cli.c)
+    target_link_libraries(cli-static PRIVATE SDL2::SDL2-static)
+
+    # SDL2_LIBRARIES does not support creating a cli SDL2 application (when SDL2::SDL2main is available)
+    # (it is possible that SDL2main is a stub, but we don't know for sure)
+    if(NOT TARGET SDL2::SDL2main)
+        add_executable(cli-static-vars main_cli.c)
+        target_link_libraries(cli-static-vars PRIVATE ${SDL2_STATIC_LIBRARIES})
+        target_include_directories(cli-static-vars PRIVATE ${SDL2_INCLUDE_DIRS})
+    endif()
+endif()
+
+message(STATUS "SDL2_PREFIX:            ${SDL2_PREFIX}")
+message(STATUS "SDL2_INCLUDE_DIR:       ${SDL2_INCLUDE_DIR}")
+message(STATUS "SDL2_INCLUDE_DIRS:      ${SDL2_INCLUDE_DIRS}")
+message(STATUS "SDL2_LIBRARIES:         ${SDL2_LIBRARIES}")
+message(STATUS "SDL2_STATIC_LIBRARIES:  ${SDL2_STATIC_LIBRARIES}")
+message(STATUS "SDL2MAIN_LIBRARY:       ${SDL2MAIN_LIBRARY}")
+message(STATUS "SDL2TEST_LIBRARY:       ${SDL2TEST_LIBRARY}")
+
+feature_summary(WHAT ALL)

+ 11 - 0
Engine/lib/sdl/cmake/test/jni/Android.mk

@@ -0,0 +1,11 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := main_gui_androidmk
+LOCAL_SRC_FILES := ../main_gui.c
+LOCAL_SHARED_LIBRARIES += SDL2
+include $(BUILD_SHARED_LIBRARY)
+
+$(call import-module,SDL2main)
+$(call import-module,SDL2)

+ 14 - 0
Engine/lib/sdl/cmake/test/main_cli.c

@@ -0,0 +1,14 @@
+#define SDL_MAIN_HANDLED
+#include "SDL.h"
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+    SDL_SetMainReady();
+    if (SDL_Init(0) < 0) {
+        fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
+        return 1;
+    }
+    SDL_Delay(100);
+    SDL_Quit();
+    return 0;
+}

+ 28 - 0
Engine/lib/sdl/cmake/test/main_gui.c

@@ -0,0 +1,28 @@
+#include "SDL.h"
+#include <stdio.h>
+
+int main(int argc, char *argv[]) {
+    SDL_Window *window = NULL;
+    SDL_Surface *screenSurface = NULL;
+    if (SDL_Init(SDL_INIT_VIDEO) < 0) {
+        fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
+        return 1;
+    }
+    window = SDL_CreateWindow(
+            "hello_sdl2",
+            SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED,
+            640, 480,
+            SDL_WINDOW_SHOWN
+    );
+    if (window == NULL) {
+        fprintf(stderr, "could not create window: %s\n", SDL_GetError());
+        return 1;
+    }
+    screenSurface = SDL_GetWindowSurface(window);
+    SDL_FillRect(screenSurface, NULL, SDL_MapRGB(screenSurface->format, 0xff, 0xff, 0xff));
+    SDL_UpdateWindowSurface(window);
+    SDL_Delay(100);
+    SDL_DestroyWindow(window);
+    SDL_Quit();
+    return 0;
+}

+ 33 - 0
Engine/lib/sdl/cmake/test/main_lib.c

@@ -0,0 +1,33 @@
+#include "SDL.h"
+#include <stdio.h>
+
+#include EXPORT_HEADER
+
+#if defined(_WIN32)
+#include <windows.h>
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) {
+    return TRUE;
+}
+#endif
+
+int MYLIBRARY_EXPORT mylibrary_init(void);
+void MYLIBRARY_EXPORT mylibrary_quit(void);
+int MYLIBRARY_EXPORT mylibrary_work(void);
+
+int mylibrary_init(void) {
+    SDL_SetMainReady();
+    if (SDL_Init(0) < 0) {
+        fprintf(stderr, "could not initialize sdl2: %s\n", SDL_GetError());
+        return 1;
+    }
+    return 0;
+}
+
+void mylibrary_quit(void) {
+    SDL_Quit();
+}
+
+int mylibrary_work(void) {
+    SDL_Delay(100);
+    return 0;
+}

+ 51 - 0
Engine/lib/sdl/cmake/test/test_pkgconfig.sh

@@ -0,0 +1,51 @@
+#!/bin/sh
+
+if test "x$CC" = "x"; then
+    CC=cc
+fi
+
+machine="$($CC -dumpmachine)"
+case "$machine" in
+    *mingw* )
+        EXEPREFIX=""
+        EXESUFFIX=".exe"
+        ;;
+    *android* )
+        EXEPREFIX="lib"
+        EXESUFFIX=".so"
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -shared"
+        ;;
+    * )
+        EXEPREFIX=""
+        EXESUFFIX=""
+        ;;
+esac
+
+set -e
+
+# Get the canonical path of the folder containing this script
+testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
+CFLAGS="$( pkg-config sdl2 --cflags )"
+LDFLAGS="$( pkg-config sdl2 --libs )"
+STATIC_LDFLAGS="$( pkg-config sdl2 --libs --static )"
+
+compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_pkgconfig.c.o $CFLAGS $EXTRA_CFLAGS"
+link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"
+static_link_cmd="$CC main_gui_pkgconfig.c.o -o ${EXEPREFIX}main_gui_pkgconfig_static${EXESUFFIX} $STATIC_LDFLAGS $EXTRA_LDFLAGS"
+
+echo "-- CC:                $CC"
+echo "-- CFLAGS:            $CFLAGS"
+echo "-- EXTRA_CFLAGS:      $EXTRA_CFLAGS"
+echo "-- LDFLASG:           $LDFLAGS"
+echo "-- STATIC_LDFLAGS:    $STATIC_LDFLAGS"
+echo "-- EXTRA_LDFLAGS:     $EXTRA_LDFLAGS"
+
+echo "-- COMPILE:       $compile_cmd"
+echo "-- LINK:          $link_cmd"
+echo "-- STATIC_LINK:   $static_link_cmd"
+
+set -x
+
+$compile_cmd
+$link_cmd
+$static_link_cmd

+ 51 - 0
Engine/lib/sdl/cmake/test/test_sdlconfig.sh

@@ -0,0 +1,51 @@
+#!/bin/sh
+
+if test "x$CC" = "x"; then
+    CC=cc
+fi
+
+machine="$($CC -dumpmachine)"
+case "$machine" in
+    *mingw* )
+        EXEPREFIX=""
+        EXESUFFIX=".exe"
+        ;;
+    *android* )
+        EXEPREFIX="lib"
+        EXESUFFIX=".so"
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -shared"
+        ;;
+    * )
+        EXEPREFIX=""
+        EXESUFFIX=""
+        ;;
+esac
+
+set -e
+
+# Get the canonical path of the folder containing this script
+testdir=$(cd -P -- "$(dirname -- "$0")" && printf '%s\n' "$(pwd -P)")
+CFLAGS="$( sdl2-config --cflags )"
+LDFLAGS="$( sdl2-config --libs )"
+STATIC_LDFLAGS="$( sdl2-config --static-libs )"
+
+compile_cmd="$CC -c "$testdir/main_gui.c" -o main_gui_sdlconfig.c.o $CFLAGS $EXTRA_CFLAGS"
+link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig${EXESUFFIX} $LDFLAGS $EXTRA_LDFLAGS"
+static_link_cmd="$CC main_gui_sdlconfig.c.o -o ${EXEPREFIX}main_gui_sdlconfig_static${EXESUFFIX} $STATIC_LDFLAGS $EXTRA_LDFLAGS"
+
+echo "-- CC:                $CC"
+echo "-- CFLAGS:            $CFLAGS"
+echo "-- EXTRA_CFLAGS:      $EXTRA_CFLAGS"
+echo "-- LDFLAGS:           $LDFLAGS"
+echo "-- STATIC_LDFLAGS:    $STATIC_LDFLAGS"
+echo "-- EXTRA_LDFLAGS:     $EXTRA_LDFLAGS"
+
+echo "-- COMPILE:       $compile_cmd"
+echo "-- LINK:          $link_cmd"
+echo "-- STATIC_LINK:   $static_link_cmd"
+
+set -x
+
+$compile_cmd
+$link_cmd
+$static_link_cmd

File diff suppressed because it is too large
+ 239 - 173
Engine/lib/sdl/configure


+ 245 - 78
Engine/lib/sdl/configure.ac

@@ -12,8 +12,8 @@ orig_CFLAGS="$CFLAGS"
 dnl Set various version strings - taken gratefully from the GTk sources
 dnl Set various version strings - taken gratefully from the GTk sources
 # See docs/release_checklist.md
 # See docs/release_checklist.md
 SDL_MAJOR_VERSION=2
 SDL_MAJOR_VERSION=2
-SDL_MINOR_VERSION=23
-SDL_MICRO_VERSION=0
+SDL_MINOR_VERSION=26
+SDL_MICRO_VERSION=5
 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
 
 
 SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
 SDL_BINARY_AGE=`expr $SDL_MINOR_VERSION \* 100 + $SDL_MICRO_VERSION`
@@ -58,12 +58,24 @@ dnl Detect the canonical build and host environments
 dnl AC_CANONICAL_HOST
 dnl AC_CANONICAL_HOST
 
 
 dnl Check for tools
 dnl Check for tools
+AC_PROG_AWK
 AC_PROG_CC
 AC_PROG_CC
 AC_PROG_CXX
 AC_PROG_CXX
+AC_PROG_EGREP
 AC_PROG_INSTALL
 AC_PROG_INSTALL
 AC_PROG_MAKE_SET
 AC_PROG_MAKE_SET
 PKG_PROG_PKG_CONFIG
 PKG_PROG_PKG_CONFIG
 
 
+if [ test -z "$AWK" ]; then
+    AC_MSG_ERROR([*** awk not found, aborting])
+fi
+
+AC_CHECK_PROGS([SORT], [gsort sort], [false])
+AS_IF([! "$SORT" -V </dev/null >/dev/null], [AC_MSG_WARN([sort(1) that supports the -V option is required to find dynamic libraries])])
+
+dnl 64-bit file offsets if possible unless --disable-largefile is specified
+AC_SYS_LARGEFILE
+
 dnl Make sure that srcdir is a full pathname
 dnl Make sure that srcdir is a full pathname
 case "$host" in
 case "$host" in
     *-*-mingw*)
     *-*-mingw*)
@@ -177,15 +189,7 @@ find_lib()
         host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
         host_lib_path="/usr/$base_libdir /usr/local/$base_libdir"
     fi
     fi
     for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
     for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
-        lib=[`ls -- $path/$1 2>/dev/null | sed -e '/\.so\..*\./d' -e 's,.*/,,' | sort | tail -1`]
-        if test x$lib != x; then
-            echo $lib
-            return
-        fi
-    done
-    # Try again, this time allowing more than one version digit after the .so
-    for path in $env_lib_path $gcc_bin_path $gcc_lib_path $host_lib_path; do
-        lib=[`ls -- $path/$1 2>/dev/null | sed -e 's,.*/,,' | sort | tail -1`]
+        lib=[`ls -- $path/$1 2>/dev/null | sed 's,.*/,,' | "$SORT" -V -r | $AWK 'BEGIN{FS="."}{ print NF, $0 }' | "$SORT" -n -s | sed 's,[0-9]* ,,' | head -1`]
         if test x$lib != x; then
         if test x$lib != x; then
             echo $lib
             echo $lib
             return
             return
@@ -223,9 +227,8 @@ case "$enable_assertions" in
         ;;
         ;;
 esac
 esac
 
 
-AC_DEFINE_UNQUOTED([SDL_BUILD_MAJOR_VERSION], $SDL_MAJOR_VERSION, [ ])
-AC_DEFINE_UNQUOTED([SDL_BUILD_MINOR_VERSION], $SDL_MINOR_VERSION, [ ])
-AC_DEFINE_UNQUOTED([SDL_BUILD_MICRO_VERSION], $SDL_MICRO_VERSION, [ ])
+dnl For use in static assertions
+EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_BUILD_MAJOR_VERSION=$SDL_MAJOR_VERSION -DSDL_BUILD_MINOR_VERSION=$SDL_MINOR_VERSION -DSDL_BUILD_MICRO_VERSION=$SDL_MICRO_VERSION"
 
 
 dnl See whether we can use gcc style dependency tracking
 dnl See whether we can use gcc style dependency tracking
 AC_ARG_ENABLE(dependency-tracking,
 AC_ARG_ENABLE(dependency-tracking,
@@ -314,12 +317,19 @@ dnl See whether we are allowed to use the system C library
 AC_ARG_ENABLE(libc,
 AC_ARG_ENABLE(libc,
 [AS_HELP_STRING([--enable-libc], [Use the system C library [default=yes]])],
 [AS_HELP_STRING([--enable-libc], [Use the system C library [default=yes]])],
               , enable_libc=yes)
               , enable_libc=yes)
+
+dnl See whether we are allowed to use libiconv
+AC_ARG_ENABLE(system-iconv,
+[AS_HELP_STRING([--enable-system-iconv], [Use iconv() from system-installed libraries [default=yes]])],
+              , enable_system_iconv=yes)
+
 if test x$enable_libc = xyes; then
 if test x$enable_libc = xyes; then
     AC_DEFINE(HAVE_LIBC, 1, [ ])
     AC_DEFINE(HAVE_LIBC, 1, [ ])
 
 
 dnl Check for C library headers
 dnl Check for C library headers
-    AC_HEADER_STDC
-    AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h)
+dnl AC_CHECK_INCLUDES_DEFAULT is an autoconf-2.7x thing where AC_HEADER_STDC is deprecated.
+    m4_ifdef([AC_CHECK_INCLUDES_DEFAULT], [AC_CHECK_INCLUDES_DEFAULT], [AC_HEADER_STDC])
+    AC_CHECK_HEADERS(sys/types.h stdio.h stdlib.h stddef.h stdarg.h malloc.h memory.h string.h strings.h wchar.h inttypes.h stdint.h limits.h ctype.h math.h float.h iconv.h signal.h linux/input.h)
 
 
 dnl Check for typedefs, structures, etc.
 dnl Check for typedefs, structures, etc.
     AC_TYPE_SIZE_T
     AC_TYPE_SIZE_T
@@ -330,14 +340,6 @@ dnl Check for defines
     AC_FUNC_ALLOCA
     AC_FUNC_ALLOCA
 
 
 dnl Checks for library functions.
 dnl Checks for library functions.
-    AC_FUNC_MEMCMP
-    if test x$ac_cv_func_memcmp_working = xyes; then
-        AC_DEFINE(HAVE_MEMCMP, 1, [ ])
-    fi
-    AC_FUNC_STRTOD
-    if test x$ac_cv_func_strtod = xyes; then
-        AC_DEFINE(HAVE_STRTOD, 1, [ ])
-    fi
     AC_CHECK_FUNC(mprotect,
     AC_CHECK_FUNC(mprotect,
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
         AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
           #include <sys/types.h>
           #include <sys/types.h>
@@ -346,13 +348,15 @@ dnl Checks for library functions.
         AC_DEFINE(HAVE_MPROTECT, 1, [ ])
         AC_DEFINE(HAVE_MPROTECT, 1, [ ])
         ],[]),
         ],[]),
     )
     )
-    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex 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 elf_aux_info poll _Exit)
+    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv bsearch qsort abs bcopy memset memcmp memcpy memmove wcslen wcslcpy wcslcat _wcsdup wcsdup wcsstr wcscmp wcsncmp wcscasecmp _wcsicmp wcsncasecmp _wcsnicmp strlen strlcpy strlcat _strrev _strupr _strlwr index rindex strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtod strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp strcasestr vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval elf_aux_info poll _Exit)
 
 
     AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
     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 trunc truncf fmod fmodf log logf log10 log10f lround lroundf pow powf round roundf 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 lround lroundf pow powf round roundf 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)
+    if test x$enable_system_iconv = xyes; then
+        AC_CHECK_LIB(iconv, iconv_open, [LIBS="$LIBS -liconv"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"])
+        AC_CHECK_FUNCS(iconv)
+    fi
 
 
     AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
     AC_CHECK_MEMBER(struct sigaction.sa_sigaction,[AC_DEFINE([HAVE_SA_SIGACTION], 1, [ ])], ,[#include <signal.h>])
 
 
@@ -521,9 +525,11 @@ if test x$enable_filesystem != xyes; then
 else
 else
     SUMMARY_modules="${SUMMARY_modules} filesystem"
     SUMMARY_modules="${SUMMARY_modules} filesystem"
 fi
 fi
-AC_ARG_ENABLE(threads,
-[AS_HELP_STRING([--enable-threads], [Enable the threading subsystem [default=yes]])],
-              , enable_threads=yes)
+# Many subsystems depend on threads, so leave them enabled by default
+#AC_ARG_ENABLE(threads,
+#[AS_HELP_STRING([--enable-threads], [Enable the threading subsystem [default=yes]])],
+#              , enable_threads=yes)
+enable_threads=yes
 if test x$enable_threads != xyes; then
 if test x$enable_threads != xyes; then
     AC_DEFINE(SDL_THREADS_DISABLED, 1, [ ])
     AC_DEFINE(SDL_THREADS_DISABLED, 1, [ ])
 else
 else
@@ -851,22 +857,78 @@ dnl Check for various instruction support
     fi
     fi
 fi
 fi
 
 
+    AC_ARG_ENABLE(lsx,
+[AS_HELP_STRING([--enable-lsx], [use LSX assembly routines [default=yes]])],
+                  , enable_lsx=yes)
+    if test x$enable_lsx = xyes; then
+        save_CFLAGS="$CFLAGS"
+        have_gcc_lsx=no
+        AC_MSG_CHECKING(for GCC -mlsx option)
+        lsx_CFLAGS="-mlsx"
+        CFLAGS="$save_CFLAGS $lsx_CFLAGS"
+
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+        #ifndef __loongarch_sx
+        #error Assembler CPP flag not enabled
+        #endif
+        ]], [])], [have_gcc_lsx=yes], [])
+        AC_MSG_RESULT($have_gcc_lsx)
+        CFLAGS="$save_CFLAGS"
+
+        if test x$have_gcc_lsx = xyes; then
+            EXTRA_CFLAGS="$EXTRA_CFLAGS $lsx_CFLAGS"
+            SUMMARY_math="${SUMMARY_math} lsx"
+        fi
+    fi
+
+    AC_MSG_CHECKING(for lsxintrin.h)
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lsxintrin.h>]])],
+       [have_lsxintrin_h_hdr=yes],[have_lsxintrin_h_hdr=no])
+    AC_MSG_RESULT($have_lsxintrin_h_hdr)
+    if test x$have_lsxintrin_h_hdr = xyes; then
+        AC_DEFINE(HAVE_LSXINTRIN_H, 1, [ ])
+    fi
+
+    AC_ARG_ENABLE(lasx,
+[AS_HELP_STRING([--enable-lasx], [use LASX assembly routines [default=yes]])],
+                  , enable_LASX=yes)
+    if test x$enable_LASX = xyes; then
+        save_CFLAGS="$CFLAGS"
+        have_gcc_lasx=no
+        AC_MSG_CHECKING(for GCC -mlasx option)
+        lasx_CFLAGS="-mlasx"
+        CFLAGS="$save_CFLAGS $lasx_CFLAGS"
+
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+        #ifndef __loongarch_asx
+        #error Assembler CPP flag not enabled
+        #endif
+        ]], [])], [have_gcc_lasx=yes], [])
+        AC_MSG_RESULT($have_gcc_lasx)
+        CFLAGS="$save_CFLAGS"
+
+        if test x$have_gcc_lasx = xyes; then
+            EXTRA_CFLAGS="$EXTRA_CFLAGS $lasx_CFLAGS"
+            SUMMARY_math="${SUMMARY_math} lasx"
+        fi
+    fi
+
+    AC_MSG_CHECKING(for lasxintrin.h)
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <lasxintrin.h>]])],
+       [have_lasxintrin_h_hdr=yes],[have_lasxintrin_h_hdr=no])
+    AC_MSG_RESULT($have_lasxintrin_h_hdr)
+    if test x$have_lasxintrin_h_hdr = xyes; then
+        AC_DEFINE(HAVE_LASXINTRIN_H, 1, [ ])
+    fi
+
 dnl See if the OSS audio interface is supported
 dnl See if the OSS audio interface is supported
 CheckOSS()
 CheckOSS()
 {
 {
     AC_ARG_ENABLE(oss,
     AC_ARG_ENABLE(oss,
 [AS_HELP_STRING([--enable-oss], [support the OSS audio API [default=maybe]])],
 [AS_HELP_STRING([--enable-oss], [support the OSS audio API [default=maybe]])],
                   , enable_oss=maybe)
                   , enable_oss=maybe)
-
-    # OpenBSD "has" OSS, but it's not really for app use. They want you to
-    #  use sndio instead. So on there, we default to disabled. You can force
-    #  it on if you really want, though.
     if test x$enable_oss = xmaybe; then
     if test x$enable_oss = xmaybe; then
         enable_oss=yes
         enable_oss=yes
-        case "$host" in
-            *-*-openbsd*)
-                enable_oss=no;;
-        esac
     fi
     fi
 
 
     if test x$enable_audio = xyes -a x$enable_oss = xyes; then
     if test x$enable_audio = xyes -a x$enable_oss = xyes; then
@@ -879,16 +941,6 @@ CheckOSS()
               int arg = SNDCTL_DSP_SETFRAGMENT;
               int arg = SNDCTL_DSP_SETFRAGMENT;
             ]])], [have_oss=yes],[])
             ]])], [have_oss=yes],[])
         fi
         fi
-        if test x$have_oss != xyes; then
-            AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
-              #include <soundcard.h>
-            ]], [[
-              int arg = SNDCTL_DSP_SETFRAGMENT;
-            ]])], [
-            have_oss=yes
-            AC_DEFINE(SDL_AUDIO_DRIVER_OSS_SOUNDCARD_H, 1, [ ])
-            ],[])
-        fi
         AC_MSG_RESULT($have_oss)
         AC_MSG_RESULT($have_oss)
         if test x$have_oss = xyes; then
         if test x$have_oss = xyes; then
             SUMMARY_audio="${SUMMARY_audio} oss"
             SUMMARY_audio="${SUMMARY_audio} oss"
@@ -898,7 +950,7 @@ CheckOSS()
 
 
             # We may need to link with ossaudio emulation library
             # We may need to link with ossaudio emulation library
             case "$host" in
             case "$host" in
-                *-*-openbsd*|*-*-netbsd*)
+                *-*-netbsd*)
                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lossaudio";;
             esac
             esac
         fi
         fi
@@ -995,7 +1047,10 @@ CheckESD()
 [AS_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [default=yes]])],
 [AS_HELP_STRING([--enable-esd], [support the Enlightened Sound Daemon [default=yes]])],
                   , enable_esd=yes)
                   , enable_esd=yes)
     if test x$enable_audio = xyes -a x$enable_esd = xyes; then
     if test x$enable_audio = xyes -a x$enable_esd = xyes; then
-        AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
+        PKG_CHECK_MODULES([ESD], [esound >= 0.2.8], have_esd=yes, have_esd=no)
+        if test x$have_esd = xno; then
+           AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
+        fi
         if test x$have_esd = xyes; then
         if test x$have_esd = xyes; then
             AC_ARG_ENABLE(esd-shared,
             AC_ARG_ENABLE(esd-shared,
 [AS_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [default=yes]])],
 [AS_HELP_STRING([--enable-esd-shared], [dynamically load ESD audio support [default=yes]])],
@@ -1215,20 +1270,9 @@ CheckSNDIO()
 [AS_HELP_STRING([--enable-sndio], [support the sndio audio API [default=yes]])],
 [AS_HELP_STRING([--enable-sndio], [support the sndio audio API [default=yes]])],
                   , enable_sndio=yes)
                   , enable_sndio=yes)
     if test x$enable_audio = xyes -a x$enable_sndio = xyes; then
     if test x$enable_audio = xyes -a x$enable_sndio = xyes; then
-        AC_CHECK_HEADER(sndio.h, have_sndio_hdr=yes)
-        AC_CHECK_LIB(sndio, sio_open, have_sndio_lib=yes)
-
-        AC_MSG_CHECKING(for sndio audio support)
-        have_sndio=no
-
-        if test x$have_sndio_hdr = xyes -a x$have_sndio_lib = xyes; then
-            have_sndio=yes
-            SNDIO_LIBS="-lsndio"
-        fi
-
-        AC_MSG_RESULT($have_sndio)
+        PKG_CHECK_MODULES([SNDIO], [sndio], audio_sndio=yes, audio_sndio=no)
 
 
-        if test x$have_sndio = xyes; then
+        if test x$audio_sndio = xyes; then
             AC_ARG_ENABLE(sndio-shared,
             AC_ARG_ENABLE(sndio-shared,
 [AS_HELP_STRING([--enable-sndio-shared], [dynamically load sndio audio support [default=yes]])],
 [AS_HELP_STRING([--enable-sndio-shared], [dynamically load sndio audio support [default=yes]])],
                           , enable_sndio_shared=yes)
                           , enable_sndio_shared=yes)
@@ -1450,6 +1494,26 @@ CheckObjectiveCARC()
     fi
     fi
 }
 }
 
 
+dnl See if GCC's -gdwarf-4 is supported
+dnl See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101377 for why this is needed on Windows
+CheckGDwarf4()
+{
+    AC_MSG_CHECKING(for GCC -gdwarf-4 option)
+    have_gcc_gdwarf4=no
+
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$save_CFLAGS -gdwarf-4"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+    int x = 0;
+    ]],[])], [have_gcc_gdwarf4=yes],[])
+    AC_MSG_RESULT($have_gcc_gdwarf4)
+    CFLAGS="$save_CFLAGS"
+
+    if test x$have_gcc_gdwarf4 = xyes; then
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -gdwarf-4"
+    fi
+}
+
 dnl See if GCC's -fvisibility=hidden is supported (gcc4 and later, usually).
 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
 dnl  Details of this flag are here: http://gcc.gnu.org/wiki/Visibility
 CheckVisibilityHidden()
 CheckVisibilityHidden()
@@ -1513,6 +1577,49 @@ CheckStackBoundary()
     fi
     fi
 }
 }
 
 
+dnl See if GCC's -Werror is supported.
+CheckWerror()
+{
+    AC_ARG_ENABLE(werror,
+[AS_HELP_STRING([--enable-werror], [treat warnings as errors [default=no]])],
+                  enable_werror=$enableval, enable_werror=no)
+    if test x$enable_werror = xyes; then
+        AC_MSG_CHECKING(for GCC -Werror option)
+        have_gcc_werror=no
+
+        save_CFLAGS="$CFLAGS"
+        CFLAGS="$save_CFLAGS -Werror"
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+        int x = 0;
+        ]],[])], [have_gcc_werror=yes],[])
+        AC_MSG_RESULT($have_gcc_werror)
+        CFLAGS="$save_CFLAGS"
+
+        if test x$have_gcc_werror = xyes; then
+            EXTRA_CFLAGS="$EXTRA_CFLAGS -Werror"
+        fi
+    fi
+}
+
+dnl See if GCC's -Wno-error=deprecated-declarations is supported.
+CheckNoErrorDeprecatedDeclarationsWerror()
+{
+    AC_MSG_CHECKING(for GCC -Wno-error=deprecated-declarations option)
+    have_gcc_no_werror_deprecated_declarations=no
+
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$save_CFLAGS -Wno-error=deprecated-declarations"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+    int x = 0;
+    ]],[])], [have_gcc_no_werror_deprecated_declarations=yes],[])
+    AC_MSG_RESULT($have_gcc_werror)
+    CFLAGS="$save_CFLAGS"
+
+    if test x$have_gcc_no_werror_deprecated_declarations = xyes; then
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-error=deprecated-declarations"
+    fi
+}
+
 dnl See if GCC's -Wdeclaration-after-statement is supported.
 dnl See if GCC's -Wdeclaration-after-statement is supported.
 dnl  This lets us catch things that would fail on a C89 compiler when using
 dnl  This lets us catch things that would fail on a C89 compiler when using
 dnl  a modern GCC.
 dnl  a modern GCC.
@@ -1767,8 +1874,15 @@ dnl Find the X11 include and library directories
 CheckX11()
 CheckX11()
 {
 {
     AC_ARG_ENABLE(video-x11,
     AC_ARG_ENABLE(video-x11,
-[AS_HELP_STRING([--enable-video-x11], [use X11 video driver [default=yes]])],
-                  , enable_video_x11=yes)
+[AS_HELP_STRING([--enable-video-x11], [use X11 video driver [default=maybe]])],
+                  ,[
+    enable_video_x11=yes
+    case "$host" in
+        *-*-darwin*|*-ios-*)
+            enable_video_x11=no
+            ;;
+    esac])
+
     if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
     if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
         case "$host" in
         case "$host" in
             *-*-darwin*)
             *-*-darwin*)
@@ -2328,8 +2442,8 @@ CheckDummyVideo()
 CheckOffscreenVideo()
 CheckOffscreenVideo()
 {
 {
     AC_ARG_ENABLE(video-offscreen,
     AC_ARG_ENABLE(video-offscreen,
-[AS_HELP_STRING([--enable-video-offscreen], [use offscreen video driver [default=no]])],
-                  , enable_video_offscreen=no)
+[AS_HELP_STRING([--enable-video-offscreen], [use offscreen video driver [default=yes]])],
+                  , enable_video_offscreen=yes)
     if test x$enable_video_offscreen = xyes; then
     if test x$enable_video_offscreen = xyes; then
         AC_DEFINE(SDL_VIDEO_DRIVER_OFFSCREEN, 1, [ ])
         AC_DEFINE(SDL_VIDEO_DRIVER_OFFSCREEN, 1, [ ])
         SOURCES="$SOURCES $srcdir/src/video/offscreen/*.c"
         SOURCES="$SOURCES $srcdir/src/video/offscreen/*.c"
@@ -2658,6 +2772,7 @@ CheckInputKD()
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
     AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
       #include <linux/kd.h>
       #include <linux/kd.h>
       #include <linux/keyboard.h>
       #include <linux/keyboard.h>
+      #include <sys/ioctl.h>
     ]], [[
     ]], [[
         struct kbentry kbe;
         struct kbentry kbe;
         kbe.kb_table = KG_CTRL;
         kbe.kb_table = KG_CTRL;
@@ -2772,7 +2887,7 @@ CheckInotify()
 {
 {
     save_LIBS="$LIBS"
     save_LIBS="$LIBS"
     case "$host" in
     case "$host" in
-     *-*-freebsd*) LIBS="$LIBS -linotify"
+     *-*-freebsd*|*-*dragonfly*) LIBS="$LIBS -linotify"
       ;;
       ;;
     esac
     esac
     AC_CHECK_HEADERS(sys/inotify.h, [have_inotify_inotify_h_hdr=yes])
     AC_CHECK_HEADERS(sys/inotify.h, [have_inotify_inotify_h_hdr=yes])
@@ -2781,7 +2896,7 @@ CheckInotify()
     if test x$have_inotify_inotify_h_hdr = xyes -a x$have_inotify = xyes; then
     if test x$have_inotify_inotify_h_hdr = xyes -a x$have_inotify = xyes; then
         AC_DEFINE(HAVE_INOTIFY, 1, [ ])
         AC_DEFINE(HAVE_INOTIFY, 1, [ ])
         case "$host" in
         case "$host" in
-            *-*-freebsd*)
+            *-*-freebsd*|*-*-dragonfly*)
                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -linotify"
                 EXTRA_LDFLAGS="$EXTRA_LDFLAGS -linotify"
                 ;;
                 ;;
         esac
         esac
@@ -2948,7 +3063,7 @@ dnl This is used on Linux for glibc binary compatibility (Doh!)
             ;;
             ;;
         *-*-openbsd*)
         *-*-openbsd*)
             pthread_cflags="-D_REENTRANT"
             pthread_cflags="-D_REENTRANT"
-            pthread_lib="-pthread"
+            pthread_lib="-lpthread"
             ;;
             ;;
         *-*-solaris2.9)
         *-*-solaris2.9)
             # From Solaris 9+, posix4's preferred name is rt.
             # From Solaris 9+, posix4's preferred name is rt.
@@ -3173,6 +3288,10 @@ CheckWINDOWS()
     if test x$have_roapi_h = xyes; then
     if test x$have_roapi_h = xyes; then
         AC_DEFINE(HAVE_ROAPI_H, 1, [ ])
         AC_DEFINE(HAVE_ROAPI_H, 1, [ ])
     fi
     fi
+    AC_CHECK_HEADER(shellscalingapi.h,have_shellscalingapi_h=yes)
+    if test x$shellscalingapi_h = xyes; then
+        AC_DEFINE(HAVE_SHELLSCALINGAPI_H, 1, [ ])
+    fi
 }
 }
 
 
 dnl Determine whether the compiler can produce OS/2 executables
 dnl Determine whether the compiler can produce OS/2 executables
@@ -3199,6 +3318,17 @@ CheckDIRECTX()
     if test x$enable_directx = xyes; then
     if test x$enable_directx = xyes; then
         AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
         AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
         AC_CHECK_HEADER(d3d11_1.h, have_d3d11=yes)
         AC_CHECK_HEADER(d3d11_1.h, have_d3d11=yes)
+        AC_MSG_CHECKING(for d3d12 Windows SDK version)
+        AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <winsdkver.h>
+#include <sdkddkver.h>
+#include <d3d12.h>
+ID3D12Device1 *device;
+#if WDK_NTDDI_VERSION <= 0x0A000008
+asdf
+#endif
+            ]])], [have_d3d12=yes],[have_d3d12=no])
+        AC_MSG_RESULT($have_d3d12)
         AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
         AC_CHECK_HEADER(ddraw.h, have_ddraw=yes)
         AC_CHECK_HEADER(dsound.h, have_dsound=yes)
         AC_CHECK_HEADER(dsound.h, have_dsound=yes)
         AC_CHECK_HEADER(dinput.h, have_dinput=yes)
         AC_CHECK_HEADER(dinput.h, have_dinput=yes)
@@ -3496,6 +3626,7 @@ CheckHIDAPI()
 
 
         if test x$hidapi_support = xyes; then
         if test x$hidapi_support = xyes; then
             if test x$have_libusb_h = xyes; then
             if test x$have_libusb_h = xyes; then
+                AC_DEFINE(HAVE_LIBUSB)
                 EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
                 EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
                 if test x$require_hidapi_libusb = xyes; then
                 if test x$require_hidapi_libusb = xyes; then
                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
                     EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
@@ -3655,6 +3786,7 @@ case "$host" in
                 ;;
                 ;;
         esac
         esac
         CheckVisibilityHidden
         CheckVisibilityHidden
+        CheckWerror
         CheckDeclarationAfterStatement
         CheckDeclarationAfterStatement
         CheckDummyVideo
         CheckDummyVideo
         CheckOffscreenVideo
         CheckOffscreenVideo
@@ -3768,13 +3900,15 @@ case "$host" in
         if test x$enable_joystick = xyes; then
         if test x$enable_joystick = xyes; then
           case $ARCH in
           case $ARCH in
             linux)
             linux)
-                AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
-                SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
-                SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
-                have_joystick=yes
+                if test "x$ac_cv_header_linux_input_h" = xyes; then
+                    AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
+                    SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
+                    SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
+                    have_joystick=yes
+                fi
             ;;
             ;;
             freebsd)
             freebsd)
-                if test x$use_input_events = xyes; then
+                if test x$use_input_events = xyes -a x$ac_cv_header_linux_input_h = xyes; then
                     AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
                     AC_DEFINE(SDL_JOYSTICK_LINUX, 1, [ ])
                     SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
                     SOURCES="$SOURCES $srcdir/src/joystick/linux/*.c"
                     SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
                     SOURCES="$SOURCES $srcdir/src/joystick/steam/*.c"
@@ -3870,6 +4004,7 @@ case "$host" in
         # Set up other core UNIX files
         # Set up other core UNIX files
         SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_capabilities.c"
         SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_capabilities.c"
         SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
         SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
+        SOURCES="$SOURCES $srcdir/src/core/linux/SDL_sandbox.c"
         SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
         SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
         ;;
         ;;
     *-*-cygwin* | *-*-mingw*)
     *-*-cygwin* | *-*-mingw*)
@@ -3886,6 +4021,8 @@ case "$host" in
         if test x$enable_loadso = xyes; then
         if test x$enable_loadso = xyes; then
             have_loadso=yes
             have_loadso=yes
         fi
         fi
+        CheckGDwarf4
+        CheckWerror
         CheckDeclarationAfterStatement
         CheckDeclarationAfterStatement
         CheckDummyVideo
         CheckDummyVideo
         CheckOffscreenVideo
         CheckOffscreenVideo
@@ -3926,6 +4063,10 @@ case "$host" in
                 AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
                 AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
                 SUMMARY_video="${SUMMARY_video} d3d11"
                 SUMMARY_video="${SUMMARY_video} d3d11"
             fi
             fi
+            if test x$enable_render_d3d = xyes -a x$have_d3d12 = xyes; then
+                AC_DEFINE(SDL_VIDEO_RENDER_D3D12, 1, [ ])
+                SUMMARY_video="${SUMMARY_video} d3d12"
+            fi
         fi
         fi
         # Set up files for the audio library
         # Set up files for the audio library
         if test x$enable_audio = xyes; then
         if test x$enable_audio = xyes; then
@@ -4106,6 +4247,8 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works.  --ryan.
         ARCH=ios
         ARCH=ios
 
 
         CheckVisibilityHidden
         CheckVisibilityHidden
+        CheckWerror
+        CheckNoErrorDeprecatedDeclarationsWerror
         CheckDeclarationAfterStatement
         CheckDeclarationAfterStatement
         CheckDummyVideo
         CheckDummyVideo
         CheckOffscreenVideo
         CheckOffscreenVideo
@@ -4189,7 +4332,11 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works.  --ryan.
         SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
         SOURCES="$SOURCES $srcdir/src/video/uikit/*.m"
         SUMMARY_video="${SUMMARY_video} uikit"
         SUMMARY_video="${SUMMARY_video} uikit"
         have_video=yes
         have_video=yes
-        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm -liconv -lobjc"
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"
+        if test x$enable_system_iconv = xyes; then
+            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -liconv"
+        fi
+        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lobjc"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AVFoundation"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,AudioToolbox"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio"
         EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,CoreAudio"
@@ -4217,6 +4364,8 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works.  --ryan.
 
 
         CheckObjectiveCARC
         CheckObjectiveCARC
         CheckVisibilityHidden
         CheckVisibilityHidden
+        CheckWerror
+        CheckNoErrorDeprecatedDeclarationsWerror
         CheckDeclarationAfterStatement
         CheckDeclarationAfterStatement
         CheckDummyVideo
         CheckDummyVideo
         CheckOffscreenVideo
         CheckOffscreenVideo
@@ -4342,6 +4491,7 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works.  --ryan.
         fi
         fi
 
 
         CheckVisibilityHidden
         CheckVisibilityHidden
+        CheckWerror
         CheckDeclarationAfterStatement
         CheckDeclarationAfterStatement
         CheckDummyVideo
         CheckDummyVideo
         CheckOffscreenVideo
         CheckOffscreenVideo
@@ -4393,6 +4543,7 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works.  --ryan.
     *-*-riscos*)
     *-*-riscos*)
         ARCH=riscos
         ARCH=riscos
         CheckVisibilityHidden
         CheckVisibilityHidden
+        CheckWerror
         CheckDeclarationAfterStatement
         CheckDeclarationAfterStatement
         CheckDummyVideo
         CheckDummyVideo
         CheckOffscreenVideo
         CheckOffscreenVideo
@@ -4443,6 +4594,7 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works.  --ryan.
         enable_static=no # disable static builds
         enable_static=no # disable static builds
         EXTRA_CFLAGS="$EXTRA_CFLAGS -DBUILD_SDL -DOS2EMX_PLAIN_CHAR"
         EXTRA_CFLAGS="$EXTRA_CFLAGS -DBUILD_SDL -DOS2EMX_PLAIN_CHAR"
         CheckOS2
         CheckOS2
+        CheckWerror
         CheckDeclarationAfterStatement
         CheckDeclarationAfterStatement
         CheckDummyVideo
         CheckDummyVideo
         CheckDiskAudio
         CheckDiskAudio
@@ -4451,8 +4603,10 @@ dnl BeOS support removed after SDL 2.0.1. Haiku still works.  --ryan.
 
 
         # Set up the core platform files
         # Set up the core platform files
         SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
         SOURCES="$SOURCES $srcdir/src/core/os2/*.c"
-        if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then
-            SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
+        if test x$enable_system_iconv = xyes; then
+            if test x$ac_cv_func_iconv != xyes -o x$ac_cv_header_iconv_h != xyes; then
+                SOURCES="$SOURCES $srcdir/src/core/os2/geniconv/*.c"
+            fi
         fi
         fi
         # Use the Unix locale APIs.
         # Use the Unix locale APIs.
         if test x$enable_locale = xyes; then
         if test x$enable_locale = xyes; then
@@ -4532,6 +4686,12 @@ else
 fi
 fi
 AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
 AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
 
 
+AC_ARG_ENABLE([vendor-info],
+    [AS_HELP_STRING([--enable-vendor-info=STRING], [Add vendor info to SDL_REVISION])],
+    [enable_vendor_info="$enableval"], [enable_vendor_info=])
+AS_IF([test "$enable_vendor_info" = no], [enable_vendor_info=])
+AC_SUBST([SDL_VENDOR_INFO], [$enable_vendor_info])
+
 # Verify that we have all the platform specific files we need
 # Verify that we have all the platform specific files we need
 
 
 if test x$have_audio != xyes; then
 if test x$have_audio != xyes; then
@@ -4688,6 +4848,13 @@ fi
 
 
 SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
 SDL_STATIC_LIBS="$EXTRA_LDFLAGS"
 
 
+dnl Calculate the location of the prefix, relative to the cmake folder
+dnl Calculate the location of the prefix, relative to bindir
+pkg_cmakedir='$libdir/cmake/SDL2'
+AX_COMPUTE_RELATIVE_PATHS([pkg_cmakedir:prefix:cmake_prefix_relpath bindir:prefix:bin_prefix_relpath])
+AC_SUBST([cmake_prefix_relpath])
+AC_SUBST([bin_prefix_relpath])
+
 dnl Expand the cflags and libraries needed by apps using SDL
 dnl Expand the cflags and libraries needed by apps using SDL
 AC_SUBST(SDL_CFLAGS)
 AC_SUBST(SDL_CFLAGS)
 AC_SUBST(SDL_LIBS)
 AC_SUBST(SDL_LIBS)

+ 97 - 0
Engine/lib/sdl/docs/CONTRIBUTING.md

@@ -0,0 +1,97 @@
+# Contributing to SDL
+
+We appreciate your interest in contributing to SDL, this document will describe how to report bugs, contribute code or ideas or edit documentation.
+
+**Table Of Contents**
+
+-   [Filing a GitHub issue](#filing-a-github-issue)
+    -   [Reporting a bug](#reporting-a-bug)
+    -   [Suggesting enhancements](#suggesting-enhancements)
+-   [Contributing code](#contributing-code)
+    -   [Forking the project](#forking-the-project)
+    -   [Following the style guide](#following-the-style-guide)
+    -   [Running the tests](#running-the-tests)
+    -   [Opening a pull request](#opening-a-pull-request)
+-   [Contributing to the documentation](#contributing-to-the-documentation)
+    -   [Editing a function documentation](#editing-a-function-documentation)
+    -   [Editing the wiki](#editing-the-wiki)
+
+## Filing a GitHub issue
+
+### Reporting a bug
+
+If you think you have found a bug and would like to report it, here are the steps you should take:
+
+-   Before opening a new issue, ensure your bug has not already been reported on the [GitHub Issues page](https://github.com/libsdl-org/SDL/issues).
+-   On the issue tracker, click on [New Issue](https://github.com/libsdl-org/SDL/issues/new).
+-   Include details about your environment, such as your Operating System and SDL version.
+-   If possible, provide a small example that reproduces your bug.
+
+### Suggesting enhancements
+
+If you want to suggest changes for the project, here are the steps you should take:
+
+-   Check if the suggestion has already been made on:
+    -   the [issue tracker](https://github.com/libsdl-org/SDL/issues);
+    -   the [discourse forum](https://discourse.libsdl.org/);
+    -   or if a [pull request](https://github.com/libsdl-org/SDL/pulls) already exists.
+-   On the issue tracker, click on [New Issue](https://github.com/libsdl-org/SDL/issues/new).
+-   Describe what change you would like to happen.
+
+## Contributing code
+
+This section will cover how the process of forking the project, making a change and opening a pull request.
+
+### Forking the project
+
+The first step consists in making a fork of the project, this is only necessary for the first contribution.
+
+Head over to https://github.com/libsdl-org/SDL and click on the `Fork` button in the top right corner of your screen, you may leave the fields unchanged and click `Create Fork`.
+
+You will be redirected to your fork of the repository, click the green `Code` button and copy the git clone link.
+
+If you had already forked the repository, you may update it from the web page using the `Fetch upstream` button.
+
+### Following the style guide
+
+Code formatting is done using a custom `.clang-format` file, you can learn more about how to run it [here](https://clang.llvm.org/docs/ClangFormat.html).
+
+Some legacy code may not be formatted, as such avoid formatting the whole file at once and only format around your changes.
+
+For your commit message to be properly displayed on GitHub, it should contain:
+
+-   A short description of the commit of 50 characters or less on the first line.
+-   If necessary, add a blank line followed by a long description, each line should be 72 characters or less.
+
+For example:
+
+```
+Fix crash in SDL_FooBar.
+
+This addresses the issue #123456 by making sure Foo was successful
+before calling Bar.
+```
+
+### Running the tests
+
+Tests allow you to verify if your changes did not break any behaviour, here are the steps to follow:
+
+-   Before pushing, run the `testautomation` suite on your machine, there should be no more failing tests after your change than before.
+-   After pushing to your fork, Continuous Integration (GitHub Actions) will ensure compilation and tests still pass on other systems.
+
+### Opening a pull request
+
+-   Head over to your fork's GitHub page.
+-   Click on the `Contribute` button and `Open Pull Request`.
+-   Fill out the pull request template.
+-   If any changes are requested, you can add new commits to your fork and they will be automatically added to the pull request.
+
+## Contributing to the documentation
+
+### Editing a function documentation
+
+The wiki documentation for API functions is synchronised from the headers' doxygen comments. As such, all modifications to syntax; function parameters; return value; version; related functions should be done in the header directly.
+
+### Editing the wiki
+
+Other changes to the wiki should done directly from https://wiki.libsdl.org/

+ 1 - 1
Engine/lib/sdl/docs/README-android.md

@@ -13,7 +13,7 @@ supported, but you can use the "android-project-ant" directory as a template.
 Requirements
 Requirements
 ================================================================================
 ================================================================================
 
 
-Android SDK (version 26 or later)
+Android SDK (version 31 or later)
 https://developer.android.com/sdk/index.html
 https://developer.android.com/sdk/index.html
 
 
 Android NDK r15c or later
 Android NDK r15c or later

+ 107 - 28
Engine/lib/sdl/docs/README-cmake.md

@@ -1,40 +1,102 @@
-CMake
-================================================================================
+# CMake
+
 (www.cmake.org)
 (www.cmake.org)
 
 
 SDL's build system was traditionally based on autotools. Over time, this
 SDL's build system was traditionally based on autotools. Over time, this
 approach has suffered from several issues across the different supported 
 approach has suffered from several issues across the different supported 
 platforms.
 platforms.
-To solve these problems, a new build system based on CMake is under development.
-It works in parallel to the legacy system, so users can experiment with it
-without complication.
-While still experimental, the build system should be usable on the following
-platforms:
+To solve these problems, a new build system based on CMake was introduced.
+It is developed in parallel to the legacy autotools build system, so users 
+can experiment with it without complication.
+
+The CMake build system is supported on the following platforms:
 
 
 * FreeBSD
 * FreeBSD
 * Linux
 * Linux
-* VS.NET 2010
+* Microsoft Visual C
 * MinGW and Msys
 * MinGW and Msys
 * macOS, iOS, and tvOS, with support for XCode
 * macOS, iOS, and tvOS, with support for XCode
+* Android
+* Emscripten
+* RiscOS
+* Playstation Vita
+
+## Building SDL
+
+Assuming the source for SDL is located at `~/sdl`
+```sh
+cd ~
+mkdir build
+cd build
+cmake ~/sdl
+cmake --build .
+```
+
+This will build the static and dynamic versions of SDL in the `~/build` directory.
+Installation can be done using:
+
+```sh
+cmake --install .        # '--install' requires CMake 3.15, or newer
+```
+
+## Including SDL in your project
+
+SDL can be included in your project in 2 major ways:
+- using a system SDL library, provided by your (*nix) distribution or a package manager
+- using a vendored SDL library: this is SDL copied or symlinked in a subfolder.
+
+The following CMake script supports both, depending on the value of `MYGAME_VENDORED`.
 
 
+```cmake
+cmake_minimum_required(VERSION 3.0)
+project(mygame)
 
 
-================================================================================
-Usage
-================================================================================
+# Create an option to switch between a system sdl library and a vendored sdl library
+option(MYGAME_VENDORED "Use vendored libraries" OFF)
 
 
-Assuming the source for SDL is located at ~/sdl
+if(MYGAME_VENDORED)
+    add_subdirectory(vendored/sdl EXCLUDE_FROM_ALL)
+else()
+    # 1. Look for a SDL2 package, 2. look for the SDL2 component and 3. fail if none can be found
+    find_package(SDL2 REQUIRED CONFIG REQUIRED COMPONENTS SDL2)
+    
+    # 1. Look for a SDL2 package, 2. Look for the SDL2maincomponent and 3. DO NOT fail when SDL2main is not available 
+    find_package(SDL2 REQUIRED CONFIG COMPONENTS SDL2main)
+endif()
 
 
-    cd ~
-    mkdir build
-    cd build
-    cmake ../sdl
+# Create your game executable target as usual 
+add_executable(mygame WIN32 mygame.c)
 
 
-This will build the static and dynamic versions of SDL in the ~/build directory.
+# SDL2::SDL2main may or may not be available. It is e.g. required by Windows GUI applications  
+if(TARGET SDL2::SDL2main)
+    # It has an implicit dependency on SDL2 functions, so it MUST be added before SDL2::SDL2 (or SDL2::SDL2-static)
+    target_link_libraries(mygame PRIVATE SDL2::SDL2main)
+endif()
 
 
+# Link to the actual SDL2 library. SDL2::SDL2 is the shared SDL library, SDL2::SDL2-static is the static SDL libarary.
+target_link_libraries(mygame PRIVATE SDL2::SDL2)
+```
 
 
-================================================================================
-Usage, iOS/tvOS
-================================================================================
+### A system SDL library
+
+For CMake to find SDL, it must be installed in [a default location CMake is looking for](https://cmake.org/cmake/help/latest/command/find_package.html#config-mode-search-procedure).
+
+The following components are available, to be used as an argument of `find_package`.
+
+| Component name | Description                                                                                |
+|----------------|--------------------------------------------------------------------------------------------|
+| SDL2           | The SDL2 shared library, available through the `SDL2::SDL2` target [^SDL_TARGET_EXCEPTION] |
+| SDL2-static    | The SDL2 static library, available through the `SDL2::SDL2-static` target                  |
+| SDL2main       | The SDL2main static library, available through the `SDL2::SDL2main` target                 |
+| SDL2test       | The SDL2test static library, available through the `SDL2::SDL2test` target                 |
+
+### Using a vendored SDL
+
+This only requires a copy of SDL in a subdirectory.
+
+## CMake configuration options for platforms
+
+### iOS/tvOS
 
 
 CMake 3.14+ natively includes support for iOS and tvOS.  SDL binaries may be built
 CMake 3.14+ natively includes support for iOS and tvOS.  SDL binaries may be built
 using Xcode or Make, possibly among other build-systems.
 using Xcode or Make, possibly among other build-systems.
@@ -53,32 +115,49 @@ To use, set the following CMake variables when running CMake's configuration sta
 - `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
 - `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
 
 
 
 
-### Examples (for iOS/tvOS):
+#### Examples
 
 
 - for iOS-Simulator, using the latest, installed SDK:
 - for iOS-Simulator, using the latest, installed SDK:
 
 
-    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
+    ```bash
+    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
 - 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`
+    ```bash
+    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
 - 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"`
+    ```cmake
+    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):
 - 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`
+    ```cmake
+    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):
 - 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`
+    ```cmake
+    cmake ~/sdl -DSDL_TESTS=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
+    ```
 
 
 - for tvOS-Simulator, using the latest, installed SDK:
 - for tvOS-Simulator, using the latest, installed SDK:
 
 
-    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
+    ```cmake
+    cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64
+    ```
 
 
 - for tvOS-Device, using the latest, installed SDK:
 - for tvOS-Device, using the latest, installed SDK:
 
 
-    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
+    ```cmake
+    cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
+    ```
+
+
+[^SDL_TARGET_EXCEPTION]: `SDL2::SDL2` can be an ALIAS to a static `SDL2::SDL2-static` target for multiple reasons.

+ 43 - 2
Engine/lib/sdl/docs/README-emscripten.md

@@ -1,5 +1,46 @@
-Emscripten
-================================================================================
+# Emscripten
+
+(This documentation is not very robust; we will update and expand this later.)
+
+## A quick note about audio
+
+Modern web browsers will not permit web pages to produce sound before the
+user has interacted with them; this is for several reasons, not the least
+of which being that no one likes when a random browser tab suddenly starts
+making noise and the user has to scramble to figure out which and silence
+it.
+
+To solve this, most browsers will refuse to let a web app use the audio
+subsystem at all before the user has interacted with (clicked on) the page
+in a meaningful way. SDL-based apps also have to deal with this problem; if
+the user hasn't interacted with the page, SDL_OpenAudioDevice will fail.
+
+There are two reasonable ways to deal with this: if you are writing some
+sort of media player thing, where the user expects there to be a volume
+control when you mouseover the canvas, just default that control to a muted
+state; if the user clicks on the control to unmute it, on this first click,
+open the audio device. This allows the media to play at start, the user can
+reasonably opt-in to listening, and you never get access denied to the audio
+device.
+
+Many games do not have this sort of UI, and are more rigid about starting
+audio along with everything else at the start of the process. For these, your
+best bet is to write a little Javascript that puts up a "Click here to play!"
+UI, and upon the user clicking, remove that UI and then call the Emscripten
+app's main() function. As far as the application knows, the audio device was
+available to be opened as soon as the program started, and since this magic
+happens in a little Javascript, you don't have to change your C/C++ code at
+all to make it happen.
+
+Please see the discussion at https://github.com/libsdl-org/SDL/issues/6385
+for some Javascript code to steal for this approach.
+
+
+## Building SDL/emscripten
+
+SDL currently requires at least Emscripten 2.0.32 to build. Newer versions
+are likely to work, as well.
+
 
 
 Build:
 Build:
 
 

+ 155 - 0
Engine/lib/sdl/docs/README-gdk.md

@@ -0,0 +1,155 @@
+GDK
+=====
+
+This port allows SDL applications to run via Microsoft's Game Development Kit (GDK).
+
+Windows (GDK) and  Xbox One/Xbox Series (GDKX) are supported. Although most of the Xbox code is included in the public SDL source code, NDA access is required for a small number of source files. If you have access to GDKX, these required Xbox files are posted on the GDK forums [here](https://forums.xboxlive.com/questions/130003/).
+
+
+Requirements
+------------
+
+* Microsoft Visual Studio 2022 (in theory, it should also work in 2017 or 2019, but this has not been tested)
+* Microsoft GDK June 2022 or newer (public release [here](https://github.com/microsoft/GDK/releases/tag/June_2022))
+* To publish a package or successfully authenticate a user, you will need to create an app id/configure services in Partner Center. However, for local testing purposes (without authenticating on Xbox Live), the identifiers used by the GDK test programs in the included solution will work.
+
+
+Windows GDK Status
+------
+
+The Windows GDK port supports the full set of Win32 APIs, renderers, controllers, input devices, etc., as the normal Windows x64 build of SDL.
+
+* Additionally, the GDK port adds the following:
+  * Compile-time platform detection for SDL programs. The `__GDK__` is `#define`d on every GDK platform, and the  `__WINGDK__` is `#define`d on Windows GDK, specifically. (This distinction exists because other GDK platforms support a smaller subset of functionality. This allows you to mark code for "any" GDK separate from Windows GDK.)
+  * GDK-specific setup:
+    * Initializing/uninitializing the game runtime, and initializing Xbox Live services
+    * Creating a global task queue and setting it as the default for the process. When running any async operations, passing in `NULL` as the task queue will make the task get added to the global task queue.
+  
+  * An implementation on `WinMain` that performs the above GDK setup (you should link against SDL2main.lib, as in Windows x64). If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
+  * Global task queue callbacks are dispatched during `SDL_PumpEvents` (which is also called internally if using `SDL_PollEvent`).
+  * You can get the handle of the global task queue through `SDL_GDKGetTaskQueue`, if needed. When done with the queue, be sure to use `XTaskQueueCloseHandle` to decrement the reference count (otherwise it will cause a resource leak).
+  
+* What doesn't work:
+  * Compilation with anything other than through the included Visual C++ solution file
+
+## VisualC-GDK Solution
+
+The included `VisualC-GDK/SDL.sln` solution includes the following targets for the Gaming.Desktop.x64 configuration:
+
+* SDL2 (DLL) - This is the typical SDL2.dll, but for Gaming.Desktop.x64.
+* SDL2main (lib) - This contains a drop-in implementation of `WinMain` that is used as the entry point for GDK programs.
+* tests/testgamecontroller - Standard SDL test program demonstrating controller functionality.
+* tests/testgdk - GDK-specific test program that demonstrates using the global task queue to login a user into Xbox Live.
+  *NOTE*: As of the June 2022 GDK, you cannot test user logins without a valid Title ID and MSAAppId. You will need to manually change the identifiers in the `MicrosoftGame.config` to your valid IDs from Partner Center if you wish to test this.
+* tests/testsprite2 - Standard SDL test program demonstrating sprite drawing functionality.
+
+If you set one of the test programs as a startup project, you can run it directly from Visual Studio.
+
+Windows GDK Setup, Detailed Steps
+---------------------
+
+These steps assume you already have a game using SDL that runs on Windows x64 along with a corresponding Visual Studio solution file for the x64 version. If you don't have this, it's easiest to use one of the test program vcxproj files in the `VisualC-GDK` directory as a starting point, though you will still need to do most of the steps below.
+
+### 1. Add a Gaming.Desktop.x64 Configuration ###
+
+In your game's existing Visual Studio Solution, go to Build > Configuration Manager. From the "Active solution platform" drop-down select "New...". From the drop-down list, select Gaming.Desktop.x64 and copy the settings from the x64 configuration.
+
+### 2. Build SDL2 and SDL2main for GDK ###
+
+Open `VisualC-GDK/SDL.sln` in Visual Studio, you need to build the SDL2 and SDL2main targets for the Gaming.Desktop.x64 platform (Release is recommended). You will need to copy/keep track of the `SDL2.dll`, `XCurl.dll` (which is output by Gaming.Desktop.x64), `SDL2.lib`, and `SDL2main.lib` output files for your game project.
+
+*Alternatively*, you could setup your solution file to instead reference the SDL2/SDL2main project file targets from the SDL source, and add those projects as a dependency. This would mean that SDL2 and SDL2main would both be built when your game is built. 
+
+### 3. Configuring Project Settings ###
+
+While the Gaming.Desktop.x64 configuration sets most of the required settings, there are some additional items to configure for your game project under the Gaming.Desktop.x64 Configuration:
+
+*  Under C/C++ > General > Additional Include Directories, make sure the `SDL/include` path is referenced
+* Under Linker > General > Additional Library Directories, make sure to reference the path where the newly-built SDL2.lib and SDL2main.lib are
+* Under Linker > Input > Additional Dependencies, you need the following:
+  * `SDL2.lib`
+  * `SDL2main.lib` (unless not using)
+  * `xgameruntime.lib`
+  * `../Microsoft.Xbox.Services.141.GDK.C.Thunks.lib`
+* Note that in general, the GDK libraries depend on the MSVC C/C++ runtime, so there is no way to remove this dependency from a GDK program that links against GDK.
+
+### 4. Setting up SDL_main ###
+
+Rather than using your own implementation of `WinMain`, it's recommended that you instead `#include "SDL_main.h"` and declare a standard main function. If you are unable to do this, you can instead manually call `SDL_GDKRunApp` from your entry point, passing in your `SDL_main` function and `NULL` as the parameters.
+
+### 5. Required DLLs ###
+
+The game will not launch in the debugger unless required DLLs are included in the directory that contains the game's .exe file. You need to make sure that the following files are copied into the directory:
+
+* Your SDL2.dll
+* "$(Console_GRDKExtLibRoot)Xbox.Services.API.C\DesignTime\CommonConfiguration\Neutral\Lib\Release\Microsoft.Xbox.Services.141.GDK.C.Thunks.dll"
+* XCurl.dll
+
+You can either copy these in a post-build step, or you can add the dlls into the project and set its Configuration Properties > General > Item type to "Copy file," which will also copy them into the output directory.
+
+### 6. Setting up MicrosoftGame.config ###
+
+You can copy `VisualC-GDK/tests/testgdk/MicrosoftGame.config` and use that as a starting point in your project. Minimally, you will want to change the Executable Name attribute, the DefaultDisplayName, and the Description.
+
+This file must be copied into the same directory as the game's .exe file. As with the DLLs, you can either use a post-build step or the "Copy file" item type.
+
+For basic testing, you do not need to change anything else in `MicrosoftGame.config`. However, if you want to test any Xbox Live services (such as logging in users) _or_ publish a package, you will need to setup a Game app on Partner Center.
+
+Then, you need to set the following values to the values from Partner Center:
+
+* Identity tag - Name and Publisher attributes
+* TitleId
+* MSAAppId
+
+### 7. Adding Required Logos
+
+Several logo PNG files are required to be able to launch the game, even from the debugger. You can use the sample logos provided in `VisualC-GDK/logos`. As with the other files, they must be copied into the same directory as the game's .exe file.
+
+
+### 8. Copying any Data Files ###
+
+When debugging GDK games, there is no way to specify a working directory. Therefore, any required game data must also be copied into the output directory, likely in a post-build step.
+
+
+### 9. Build and Run from Visual Studio ###
+
+At this point, you should be able to build and run your game from the Visual Studio Debugger. If you get any linker errors, make sure you double-check that you referenced all the required libs.
+
+If you are testing Xbox Live functionality, it's likely you will need to change to the Sandbox for your title. To do this:
+
+1. Run "Desktop VS 2022 Gaming Command Prompt" from the Start Menu
+2. Switch the sandbox name with:
+   `XblPCSandbox SANDBOX.#`
+3. (To switch back to the retail sandbox):
+   `XblPCSandbox RETAIL`
+
+### 10. Packaging and Installing Locally
+
+You can use one of the test program's `PackageLayout.xml` as a starting point. Minimally, you will need to change the exe to the correct name and also reference any required game data. As with the other data files, it's easiest if you have this copy to the output directory, although it's not a requirement as you can specify relative paths to files.
+
+To create the package:
+
+1. Run "Desktop VS 2022 Gaming Command Prompt" from the Start Menu
+2. `cd` to the directory containing the `PackageLayout.xml` with the correct paths (if you use the local path as in the sample package layout, this would be from your .exe output directory)
+3. `mkdir Package` to create an output directory
+4. To package the file into the `Package` directory, use:
+    `makepkg pack /f PackageLayout.xml /lt /d . /nogameos /pc /pd Package`
+5. To install the package, use:
+   `wdapp install PACKAGENAME.msixvc`
+6. Once the package is installed, you can run it from the start menu.
+7. As with when running from Visual Studio, if you need to test any Xbox Live functionality you must switch to the correct sandbox.
+
+
+Troubleshooting
+---------------
+
+#### Xbox Live Login does not work
+
+As of June 2022 GDK, you must have a valid Title Id and MSAAppId in order to test Xbox Live functionality such as user login. Make sure these are set correctly in the `MicrosoftGame.config`. This means that even testgdk will not let you login without setting these properties to valid values.
+
+Furthermore, confirm that your PC is set to the correct sandbox.
+
+
+#### "The current user has already installed an unpackaged version of this app. A packaged version cannot replace this." error when installing
+
+Prior to June 2022 GDK, running from the Visual Studio debugger would still locally register the app (and it would appear on the start menu). To fix this, you have to uninstall it (it's simplest to right click on it from the start menu to uninstall it).

+ 35 - 3
Engine/lib/sdl/docs/README-ios.md

@@ -1,10 +1,10 @@
 iOS
 iOS
 ======
 ======
 
 
-Building the Simple DirectMedia Layer for iOS 5.1+
+Building the Simple DirectMedia Layer for iOS 9.0+
 ==============================================================================
 ==============================================================================
 
 
-Requirements: Mac OS X 10.8 or later and the iOS 7+ SDK.
+Requirements: Mac OS X 10.9 or later and the iOS 9.0 or newer SDK.
 
 
 Instructions:
 Instructions:
 
 
@@ -191,6 +191,38 @@ More information on this subject is available here:
 http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html
 http://developer.apple.com/library/ios/#documentation/iPhone/Conceptual/iPhoneOSProgrammingGuide/Introduction/Introduction.html
 
 
 
 
+Notes -- xcFramework
+==============================================================================
+
+The SDL.xcodeproj file now includes a target to build SDL2.xcframework. An xcframework is a new (Xcode 11) uber-framework which can handle any combination of processor type and target OS platform. 
+
+In the past, iOS devices were always an ARM variant processor, and the simulator was always i386 or x86_64, and thus libraries could be combined into a single framework for both simulator and device. With the introduction of the Apple Silicon ARM-based machines, regular frameworks would collide as CPU type was no longer sufficient to differentiate the platform. So Apple created the new xcframework library package.
+
+The xcframework target builds into a Products directory alongside the SDL.xcodeproj file, as SDL2.xcframework. This can be brought in to any iOS project and will function properly for both simulator and device, no matter their CPUs. Note that Intel Macs cannot cross-compile for Apple Silicon Macs. If you need AS compatibility, perform this build on an Apple Silicon Mac.
+
+This target requires Xcode 11 or later. The target will simply fail to build if attempted on older Xcodes.
+
+In addition, on Apple platforms, main() cannot be in a dynamically loaded library. This means that iOS apps which used the statically-linked libSDL2.lib and now link with the xcframwork will need to define their own main() to call SDL_UIKitRunApp(), like this:
+
+#ifndef SDL_MAIN_HANDLED
+#ifdef main
+#undef main
+#endif
+
+int
+main(int argc, char *argv[])
+{
+	return SDL_UIKitRunApp(argc, argv, SDL_main);
+}
+#endif /* !SDL_MAIN_HANDLED */
+
+Using an xcFramework is similar to using a regular framework. However, issues have been seen with the build system not seeing the headers in the xcFramework. To remedy this, add the path to the xcFramework in your app's target ==> Build Settings ==> Framework Search Paths and mark it recursive (this is critical). Also critical is to remove "*.framework" from Build Settings ==> Sub-Directories to Exclude in Recursive Searches. Clean the build folder, and on your next build the build system should be able to see any of these in your code, as expected: 
+
+#include "SDL_main.h"
+#include <SDL.h>
+#include <SDL_main.h>
+
+
 Notes -- iPhone SDL limitations
 Notes -- iPhone SDL limitations
 ==============================================================================
 ==============================================================================
 
 
@@ -261,7 +293,7 @@ e.g.
 Deploying to older versions of iOS
 Deploying to older versions of iOS
 ==============================================================================
 ==============================================================================
 
 
-SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 6.1
+SDL supports deploying to older versions of iOS than are supported by the latest version of Xcode, all the way back to iOS 8.0
 
 
 In order to do that you need to download an older version of Xcode:
 In order to do that you need to download an older version of Xcode:
 https://developer.apple.com/download/more/?name=Xcode
 https://developer.apple.com/download/more/?name=Xcode

+ 10 - 9
Engine/lib/sdl/docs/README-linux.md

@@ -12,15 +12,16 @@ default configuration parameters.
 Build Dependencies
 Build Dependencies
 --------------------------------------------------------------------------------
 --------------------------------------------------------------------------------
 
 
-Ubuntu 20.04, all available features enabled:
-
-    sudo apt-get install build-essential git make cmake autoconf automake \
-    libtool pkg-config libasound2-dev libpulse-dev libaudio-dev libjack-dev \
-    libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev \
-    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 libdrm-dev libgbm-dev
+Ubuntu 18.04, all available features enabled:
+
+    sudo apt-get install build-essential git make autoconf automake libtool \
+    pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev \
+    libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev \
+    libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev \
+    libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev \
+    libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev
+
+Ubuntu 22.04+ can also add `libpipewire-0.3-dev libdecor-0-dev` to that command line.
 
 
 Fedora 35, all available features enabled:
 Fedora 35, all available features enabled:
 
 

+ 3 - 3
Engine/lib/sdl/docs/README-macos.md

@@ -43,13 +43,13 @@ make
 sudo make install
 sudo make install
 ```
 ```
 
 
-This script builds SDL with 10.7 ABI compatibility on 64-bit Intel and 11.0
+This script builds SDL with 10.9 ABI compatibility on 64-bit Intel and 11.0
 ABI compatibility on ARM64 architectures.  For best compatibility you
 ABI compatibility on ARM64 architectures.  For best compatibility you
 should compile your application the same way.
 should compile your application the same way.
 
 
-Please note that building SDL requires at least Xcode 4.6 and the 10.7 SDK.
+Please note that building SDL requires at least Xcode 6 and the 10.9 SDK.
 PowerPC support for macOS has been officially dropped as of SDL 2.0.2.
 PowerPC support for macOS has been officially dropped as of SDL 2.0.2.
-32-bit Intel and macOS 10.6 runtime support has been officially dropped as
+32-bit Intel and macOS 10.8 runtime support has been officially dropped as
 of SDL 2.24.0.
 of SDL 2.24.0.
 
 
 To use the library once it's built, you essential have two possibilities:
 To use the library once it's built, you essential have two possibilities:

+ 27 - 0
Engine/lib/sdl/docs/README-n3ds.md

@@ -0,0 +1,27 @@
+# Nintendo 3DS
+
+SDL port for the Nintendo 3DS [Homebrew toolchain](https://devkitpro.org/) contributed by:
+
+-   [Pierre Wendling](https://github.com/FtZPetruska)
+
+Credits to:
+
+-   The awesome people who ported SDL to other homebrew platforms.
+-   The Devkitpro team for making all the tools necessary to achieve this.
+
+## Building
+
+To build for the Nintendo 3DS, make sure you have devkitARM and cmake installed and run:
+
+```bash
+cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/3DS.cmake" -DCMAKE_BUILD_TYPE=Release
+cmake --build build
+cmake --install build
+```
+
+## Notes
+
+-   Currently only software rendering is supported.
+-   SDL2main should be used to ensure ROMFS is enabled.
+-   By default, the extra L2 cache and higher clock speeds of the New 2/3DS lineup are enabled. If you wish to turn it off, use `osSetSpeedupEnable(false)` in your main function.
+-   `SDL_GetBasePath` returns the romfs root instead of the executable's directory.

+ 51 - 0
Engine/lib/sdl/docs/README-ps2.md

@@ -0,0 +1,51 @@
+PS2
+======
+SDL2 port for the Sony Playstation 2 contributed by:
+- Francisco Javier Trujillo Mata
+
+
+Credit to
+   - The guys that ported SDL to PSP & Vita because I'm taking them as reference.
+   - David G. F. for helping me with several issues and tests.
+
+## Building
+To build SDL2 library for the PS2, make sure you have the latest PS2Dev status and run:
+```bash
+cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=$PS2DEV/ps2sdk/ps2dev.cmake
+cmake --build build
+cmake --install build
+```
+
+## Hints
+The PS2 port has a special Hint for having a dynamic VSYNC. The Hint is `SDL_HINT_PS2_DYNAMIC_VSYNC`.
+If you enabled the dynamic vsync having as well `SDL_RENDERER_PRESENTVSYNC` enabled, then if the app is not able to run at 60 FPS, automatically the `vsync` will be disabled having a better performance, instead of droping FPS to 30.
+
+## Notes
+If you trying to debug a SDL app through [ps2client](https://github.com/ps2dev/ps2client) you need to avoid the IOP reset, otherwise you will lose the conection with your computer.
+So to avoid the reset of the IOP CPU, you need to call to the macro `SDL_PS2_SKIP_IOP_RESET();`.
+It could be something similar as:
+```c
+.....
+
+SDL_PS2_SKIP_IOP_RESET();
+
+int main(int argc, char *argv[])
+{
+.....
+```
+For a release binary is recommendable to reset the IOP always. 
+
+Remember to do a clean compilation everytime you enable or disable the `SDL_PS2_SKIP_IOP_RESET` otherwise the change won't be reflected.
+
+## Getting PS2 Dev
+[Installing PS2 Dev](https://github.com/ps2dev/ps2dev)
+
+## Running on PCSX2 Emulator
+[PCSX2](https://github.com/PCSX2/pcsx2)
+
+[More PCSX2 information](https://pcsx2.net/)
+
+## To Do
+- PS2 Screen Keyboard
+- Dialogs
+- Others

+ 8 - 39
Engine/lib/sdl/docs/README-winrt.md

@@ -5,47 +5,21 @@ This port allows SDL applications to run on Microsoft's platforms that require
 use of "Windows Runtime", aka. "WinRT", APIs.  Microsoft may, in some cases,
 use of "Windows Runtime", aka. "WinRT", APIs.  Microsoft may, in some cases,
 refer to them as either "Windows Store", or for Windows 10, "UWP" apps.
 refer to them as either "Windows Store", or for Windows 10, "UWP" apps.
 
 
-Some of the operating systems that include WinRT, are:
-
-* Windows 10, via its Universal Windows Platform (UWP) APIs
-* Windows 8.x
-* Windows RT 8.x (aka. Windows 8.x for ARM processors)
-* Windows Phone 8.x
+In the past, SDL has supported Windows RT 8.x, Windows Phone, etc, but in
+modern times this port is focused on UWP apps, which run on Windows 10,
+and modern Xbox consoles.
 
 
 
 
 Requirements
 Requirements
 ------------
 ------------
 
 
-* Microsoft Visual C++ (aka Visual Studio), either 2017, 2015, 2013, or 2012
+* Microsoft Visual C++ (aka Visual Studio) 2019.
   - Free, "Community" or "Express" editions may be used, so long as they
   - Free, "Community" or "Express" editions may be used, so long as they
-    include  support for either "Windows Store" or "Windows Phone" apps.
+    include support for either "Windows Store" or "Windows Phone" apps.
     "Express" versions marked as supporting "Windows Desktop" development
     "Express" versions marked as supporting "Windows Desktop" development
     typically do not include support for creating WinRT apps, to note.
     typically do not include support for creating WinRT apps, to note.
     (The "Community" editions of Visual C++ do, however, support both
     (The "Community" editions of Visual C++ do, however, support both
     desktop/Win32 and WinRT development).
     desktop/Win32 and WinRT development).
-  - Visual Studio 2017 can be used, however it is recommended that you install
-    the Visual C++ 2015 build tools.  These build tools can be installed
-    using VS 2017's installer.  Be sure to also install the workload for
-    "Universal Windows Platform development", its optional component, the
-    "C++ Universal Windows Platform tools", and for UWP / Windows 10
-    development, the "Windows 10 SDK (10.0.10240.0)".  Please note that
-    targeting UWP / Windows 10 apps from development machine(s) running
-    earlier versions of Windows, such as Windows 7, is not always supported
-    by Visual Studio, and you may get error(s) when attempting to do so.
-  - Visual C++ 2012 can only build apps that target versions 8.0 of Windows,
-    or  Windows Phone.  8.0-targeted apps will run on devices running 8.1
-    editions of Windows, however they will not be able to take advantage of
-    8.1-specific features.
-  - Visual C++ 2013 cannot create app projects that target Windows 8.0.
-    Visual C++ 2013 Update 4, can create app projects for Windows Phone 8.0,
-    Windows Phone 8.1, and Windows 8.1, but not Windows 8.0.  An optional
-    Visual Studio add-in, "Tools for Maintaining Store apps for Windows 8",
-    allows Visual C++ 2013 to load and build Windows 8.0 projects that were
-    created with Visual C++ 2012, so long as Visual C++ 2012 is installed
-    on the same machine.  More details on targeting different versions of
-    Windows can found at the following web pages:
-      - [Develop apps by using Visual Studio 2013](http://msdn.microsoft.com/en-us/library/windows/apps/br211384.aspx)
-      - [To add the Tools for Maintaining Store apps for Windows 8](http://msdn.microsoft.com/en-us/library/windows/apps/dn263114.aspx#AddMaintenanceTools)
 * A valid Microsoft account - This requirement is not imposed by SDL, but
 * A valid Microsoft account - This requirement is not imposed by SDL, but
   rather by Microsoft's Visual C++ toolchain.  This is required to launch or 
   rather by Microsoft's Visual C++ toolchain.  This is required to launch or 
   debug apps.
   debug apps.
@@ -57,7 +31,7 @@ Status
 Here is a rough list of what works, and what doesn't:
 Here is a rough list of what works, and what doesn't:
 
 
 * What works:
 * What works:
-  * compilation via Visual C++ 2012 through 2015
+  * compilation via Visual C++ 2019.
   * compile-time platform detection for SDL programs.  The C/C++ #define,
   * compile-time platform detection for SDL programs.  The C/C++ #define,
     `__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT.
     `__WINRT__`, will be set to 1 (by SDL) when compiling for WinRT.
   * GPU-accelerated 2D rendering, via SDL_Renderer.
   * GPU-accelerated 2D rendering, via SDL_Renderer.
@@ -234,13 +208,8 @@ To set this up for SDL/WinRT, you'll need to run through the following steps:
    "Solution Explorer")
    "Solution Explorer")
 2. right click on your app's solution.
 2. right click on your app's solution.
 3. navigate to "Add", then to "Existing Project..."
 3. navigate to "Add", then to "Existing Project..."
-4. find SDL/WinRT's Visual C++ project file and open it.  Different project
-   files exist for different WinRT platforms.  All of them are in SDL's
-   source distribution, in the following directories:
-    * `VisualC-WinRT/UWP_VS2015/`        - for Windows 10 / UWP apps
-    * `VisualC-WinRT/WinPhone81_VS2013/` - for Windows Phone 8.1 apps
-    * `VisualC-WinRT/WinRT80_VS2012/`    - for Windows 8.0 apps
-    * `VisualC-WinRT/WinRT81_VS2013/`    - for Windows 8.1 apps
+4. find SDL/WinRT's Visual C++ project file and open it, in the `VisualC-WinRT`
+   directory.
 5. once the project has been added, right-click on your app's project and
 5. once the project has been added, right-click on your app's project and
    select, "References..."
    select, "References..."
 6. click on the button titled, "Add New Reference..."
 6. click on the button titled, "Add New Reference..."

+ 4 - 8
Engine/lib/sdl/docs/README.md

@@ -1,12 +1,6 @@
-Simple DirectMedia Layer {#mainpage}
-========================
+# Simple DirectMedia Layer
 
 
-                                  (SDL)
-
-                                Version 2.0
-
----
-http://www.libsdl.org/
+https://www.libsdl.org/
 
 
 Simple DirectMedia Layer is a cross-platform development library designed
 Simple DirectMedia Layer is a cross-platform development library designed
 to provide low level access to audio, keyboard, mouse, joystick, and graphics
 to provide low level access to audio, keyboard, mouse, joystick, and graphics
@@ -34,6 +28,7 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
 - [DirectFB](README-directfb.md)
 - [DirectFB](README-directfb.md)
 - [DynAPI](README-dynapi.md)
 - [DynAPI](README-dynapi.md)
 - [Emscripten](README-emscripten.md)
 - [Emscripten](README-emscripten.md)
+- [GDK](README-gdk.md)
 - [Gesture](README-gesture.md)
 - [Gesture](README-gesture.md)
 - [Git](README-git.md)
 - [Git](README-git.md)
 - [iOS](README-ios.md)
 - [iOS](README-ios.md)
@@ -45,6 +40,7 @@ More documentation and FAQs are available online at [the wiki](http://wiki.libsd
 - [Supported Platforms](README-platforms.md)
 - [Supported Platforms](README-platforms.md)
 - [Porting information](README-porting.md)
 - [Porting information](README-porting.md)
 - [PSP](README-psp.md)
 - [PSP](README-psp.md)
+- [PS2](README-ps2.md)
 - [Raspberry Pi](README-raspberrypi.md)
 - [Raspberry Pi](README-raspberrypi.md)
 - [Touch](README-touch.md)
 - [Touch](README-touch.md)
 - [Versions](README-versions.md)
 - [Versions](README-versions.md)

+ 15 - 57
Engine/lib/sdl/docs/release_checklist.md

@@ -1,36 +1,23 @@
 # Release checklist
 # Release checklist
 
 
-## New feature release
-
-* Update `WhatsNew.txt`
+When changing the version, run `build-scripts/update-version.sh X Y Z`,
+where `X Y Z` are the major version, minor version, and patch level. So
+`2 28 1` means "change the version to 2.28.1". This script does much of the
+mechanical work.
 
 
-* Bump version number to 2.EVEN.0 in all these locations:
 
 
-    * `configure.ac`, `CMakeLists.txt`: `SDL_*_VERSION`
-    * `Xcode/SDL/Info-Framework.plist`: `CFBundleShortVersionString`,
-        `CFBundleVersion`
-    * `Makefile.os2`: `VERSION`
-    * `build-scripts/winrtbuild.ps1`: `$SDLVersion`
-    * `include/SDL_version.h`: `SDL_*_VERSION`, `SDL_PATCHLEVEL`
-    * `src/main/windows/version.rc`: `FILEVERSION`, `PRODUCTVERSION`,
-        `FileVersion`, `ProductVersion`
-
-* Bump ABI version information
+## New feature release
 
 
-    * `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
-        `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
-        * set first number in `DYLIB_CURRENT_VERSION` to
-            (100 * *minor*) + 1
-        * set second number in `DYLIB_CURRENT_VERSION` to 0
-        * if backwards compatibility has been broken,
-            increase `DYLIB_COMPATIBILITY_VERSION` (?)
+* Update `WhatsNew.txt`
 
 
-* Run test/versioning.sh to verify that everything is consistent
+* Bump version number to 2.EVEN.0:
 
 
-* Regenerate `configure`
+    * `./build-scripts/update-version.sh 2 EVEN 0`
 
 
 * Do the release
 * Do the release
 
 
+* Update the website file include/header.inc.php to reflect the new version
+
 ## New bugfix release
 ## New bugfix release
 
 
 * Check that no new API/ABI was added
 * Check that no new API/ABI was added
@@ -39,53 +26,24 @@
 
 
 * Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
 * Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
 
 
-    * Same places as listed above
-
-* Bump ABI version information
-
-    * `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
-        `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
-        * set second number in `DYLIB_CURRENT_VERSION` to *patchlevel*
-
-* Run test/versioning.sh to verify that everything is consistent
-
-* Regenerate `configure`
+    * `./build-scripts/update-version.sh 2 Y Z+1`
 
 
 * Do the release
 * Do the release
 
 
+* Update the website file include/header.inc.php to reflect the new version
+
 ## After a feature release
 ## After a feature release
 
 
 * Create a branch like `release-2.24.x`
 * Create a branch like `release-2.24.x`
 
 
 * Bump version number to 2.ODD.0 for next development branch
 * Bump version number to 2.ODD.0 for next development branch
 
 
-    * Same places as listed above
-
-* Bump ABI version information
-
-    * Same places as listed above
-    * Assume that the next feature release will contain new API/ABI
-
-* Run test/versioning.sh to verify that everything is consistent
+    * `./build-scripts/update-version.sh 2 ODD 0`
 
 
 ## New development prerelease
 ## New development prerelease
 
 
 * Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
 * Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
 
 
-    * Same places as listed above
-
-* Bump ABI version information
-
-    * `CMakeLists.txt`, `Xcode/SDL/SDL.xcodeproj/project.pbxproj`:
-        `DYLIB_CURRENT_VERSION`, `DYLIB_COMPATIBILITY_VERSION`
-        * set first number in `DYLIB_CURRENT_VERSION` to
-            (100 * *minor*) + *patchlevel* + 1
-        * set second number in `DYLIB_CURRENT_VERSION` to 0
-        * if backwards compatibility has been broken,
-            increase `DYLIB_COMPATIBILITY_VERSION` (?)
-
-* Run test/versioning.sh to verify that everything is consistent
-
-* Regenerate `configure`
+    * `./build-scripts/update-version.sh 2 Y Z+1`
 
 
 * Do the release
 * Do the release

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