Mac and Linux SDL2 binary snapshots
Edward Rudd
2020-05-02 03f8528315fa46c95991a34f3325d7b33ae5538c

Update source to SDL2 2.0.12

6 files renamed
882 files modified
64 files added
16 files deleted
6 files copied
156009 ■■■■ changed files
source/.hgignore 28 ●●●●● patch | view | raw | blame | history
source/.hgtags 3 ●●●●● patch | view | raw | blame | history
source/Android.mk 28 ●●●●● patch | view | raw | blame | history
source/CMakeLists.txt 477 ●●●● patch | view | raw | blame | history
source/COPYING.txt 2 ●●● patch | view | raw | blame | history
source/Makefile.in 21 ●●●● patch | view | raw | blame | history
source/Makefile.os2 26 ●●●● patch | view | raw | blame | history
source/Makefile.psp 3 ●●●● patch | view | raw | blame | history
source/SDL2.spec.in 3 ●●●● patch | view | raw | blame | history
source/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj 1 ●●●● patch | view | raw | blame | history
source/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj.filters 3 ●●●●● patch | view | raw | blame | history
source/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj 1 ●●●● patch | view | raw | blame | history
source/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj.filters 3 ●●●●● patch | view | raw | blame | history
source/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj 1 ●●●● patch | view | raw | blame | history
source/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj.filters 3 ●●●●● patch | view | raw | blame | history
source/VisualC/SDL/SDL.vcxproj 22 ●●●● patch | view | raw | blame | history
source/VisualC/SDL/SDL.vcxproj.filters 6 ●●●● patch | view | raw | blame | history
source/VisualC/SDLmain/SDLmain.vcxproj 2 ●●●●● patch | view | raw | blame | history
source/VisualC/SDLtest/SDLtest.vcxproj 2 ●●●●● patch | view | raw | blame | history
source/VisualC/tests/testgesture/testgesture.vcxproj 6 ●●●●● patch | view | raw | blame | history
source/VisualC/visualtest/unittest/testquit/testquit_VS2012.vcxproj patch | view | raw | blame | history
source/VisualC/visualtest/visualtest_VS2012.vcxproj patch | view | raw | blame | history
source/WhatsNew.txt 95 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj 182 ●●●● patch | view | raw | blame | history
source/Xcode-iOS/Demos/data/bitmapfont/license.txt patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj 1445 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/All-iOS.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/All-tvOS.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/PrepareXcodeProjectTemplate.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-iOS-dylib.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-iOS.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-tvOS-dylib.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-tvOS.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDLmain-iOS.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDLmain-tvOS.xcscheme 80 ●●●●● patch | view | raw | blame | history
source/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj patch | view | raw | blame | history
source/Xcode-iOS/Test/Info.plist 2 ●●● patch | view | raw | blame | history
source/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj 523 ●●●●● patch | view | raw | blame | history
source/Xcode/SDL/Info-Framework.plist 4 ●●●● patch | view | raw | blame | history
source/Xcode/SDL/SDL.xcodeproj/project.pbxproj 11772 ●●●● patch | view | raw | blame | history
source/Xcode/SDL/SDL.xcodeproj/project.xcworkspace/contents.xcworkspacedata 7 ●●●●● patch | view | raw | blame | history
source/Xcode/SDL/hidapi/Info.plist 22 ●●●●● patch | view | raw | blame | history
source/Xcode/SDL/pkg-support/SDL.info patch | view | raw | blame | history
source/Xcode/SDL/pkg-support/resources/License.txt 2 ●●● patch | view | raw | blame | history
source/Xcode/SDL/pkg-support/resources/ReadMe.txt patch | view | raw | blame | history
source/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj.orig 4434 ●●●●● patch | view | raw | blame | history
source/Xcode/SDLTest/SDLTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata 7 ●●●●● patch | view | raw | blame | history
source/Xcode/SDLTest/SDLTest.xcodeproj/project.xcworkspace/xcshareddata/SDLTest.xccheckout 41 ●●●●● patch | view | raw | blame | history
source/acinclude/pkg_config.m4 133 ●●●●● patch | view | raw | blame | history
source/android-project/app/build.gradle 12 ●●●● patch | view | raw | blame | history
source/android-project/app/jni/Application.mk 2 ●●● patch | view | raw | blame | history
source/android-project/app/jni/CMakeLists.txt 20 ●●●●● patch | view | raw | blame | history
source/android-project/app/jni/src/CMakeLists.txt 13 ●●●●● patch | view | raw | blame | history
source/android-project/app/src/main/AndroidManifest.xml 18 ●●●●● patch | view | raw | blame | history
source/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java 3 ●●●●● patch | view | raw | blame | history
source/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java 36 ●●●●● patch | view | raw | blame | history
source/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java 141 ●●●● patch | view | raw | blame | history
source/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java 35 ●●●● patch | view | raw | blame | history
source/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java 642 ●●●●● patch | view | raw | blame | history
source/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java 23 ●●●●● patch | view | raw | blame | history
source/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java 138 ●●●● patch | view | raw | blame | history
source/build-scripts/androidbuildlibs.sh 2 ●●● patch | view | raw | blame | history
source/build-scripts/ltmain.sh 7 ●●●● patch | view | raw | blame | history
source/build-scripts/os2-buildbot.sh 42 ●●●●● patch | view | raw | blame | history
source/build-scripts/raspberrypi-buildbot.sh 2 ●●● patch | view | raw | blame | history
source/build-scripts/winrtbuild.ps1 2 ●●● patch | view | raw | blame | history
source/cmake/sdlchecks.cmake 82 ●●●● patch | view | raw | blame | history
source/configure 2284 ●●●●● patch | view | raw | blame | history
source/configure.ac 959 ●●●●● patch | view | raw | blame | history
source/debian/changelog 18 ●●●●● patch | view | raw | blame | history
source/debian/copyright 12 ●●●● patch | view | raw | blame | history
source/debian/libsdl2-dev.install 1 ●●●● patch | view | raw | blame | history
source/debian/rules 19 ●●●● patch | view | raw | blame | history
source/docs/README-android.md 49 ●●●● patch | view | raw | blame | history
source/docs/README-cmake.md 58 ●●●●● patch | view | raw | blame | history
source/docs/README-directfb.md 2 ●●● patch | view | raw | blame | history
source/docs/README-linux.md 3 ●●●●● patch | view | raw | blame | history
source/docs/README-macosx.md 2 ●●● patch | view | raw | blame | history
source/docs/README-nacl.md 206 ●●●● patch | view | raw | blame | history
source/docs/README-pandora.md 6 ●●●● patch | view | raw | blame | history
source/docs/README-platforms.md 16 ●●●● patch | view | raw | blame | history
source/docs/README-porting.md 2 ●●● patch | view | raw | blame | history
source/docs/README-psp.md 4 ●●●● patch | view | raw | blame | history
source/docs/README-wince.md 4 ●●●● patch | view | raw | blame | history
source/docs/README-winrt.md 7 ●●●● patch | view | raw | blame | history
source/include/SDL.h 3 ●●●● patch | view | raw | blame | history
source/include/SDL_assert.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_atomic.h 22 ●●●●● patch | view | raw | blame | history
source/include/SDL_audio.h 61 ●●●● patch | view | raw | blame | history
source/include/SDL_bits.h 11 ●●●●● patch | view | raw | blame | history
source/include/SDL_blendmode.h 17 ●●●●● patch | view | raw | blame | history
source/include/SDL_clipboard.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_config.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_config.h.cmake 27 ●●●● patch | view | raw | blame | history
source/include/SDL_config.h.in 20 ●●●● patch | view | raw | blame | history
source/include/SDL_config_android.h 4 ●●● patch | view | raw | blame | history
source/include/SDL_config_iphoneos.h 9 ●●●● patch | view | raw | blame | history
source/include/SDL_config_macosx.h 42 ●●●● patch | view | raw | blame | history
source/include/SDL_config_minimal.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_config_os2.h 12 ●●●●● patch | view | raw | blame | history
source/include/SDL_config_pandora.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_config_psp.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_config_windows.h 7 ●●●● patch | view | raw | blame | history
source/include/SDL_config_winrt.h 4 ●●●● patch | view | raw | blame | history
source/include/SDL_config_wiz.h 3 ●●●● patch | view | raw | blame | history
source/include/SDL_copying.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_cpuinfo.h 103 ●●●●● patch | view | raw | blame | history
source/include/SDL_egl.h 5 ●●●● patch | view | raw | blame | history
source/include/SDL_endian.h 9 ●●●●● patch | view | raw | blame | history
source/include/SDL_error.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_events.h 8 ●●●● patch | view | raw | blame | history
source/include/SDL_filesystem.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_gamecontroller.h 32 ●●●●● patch | view | raw | blame | history
source/include/SDL_gesture.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_haptic.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_hints.h 255 ●●●●● patch | view | raw | blame | history
source/include/SDL_joystick.h 14 ●●●● patch | view | raw | blame | history
source/include/SDL_keyboard.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_keycode.h 6 ●●●● patch | view | raw | blame | history
source/include/SDL_loadso.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_log.h 6 ●●●● patch | view | raw | blame | history
source/include/SDL_main.h 44 ●●●●● patch | view | raw | blame | history
source/include/SDL_messagebox.h 6 ●●●●● patch | view | raw | blame | history
source/include/SDL_metal.h 91 ●●●●● patch | view | raw | blame | history
source/include/SDL_mouse.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_mutex.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_name.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_opengl.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_opengl_glext.h 3 ●●●●● patch | view | raw | blame | history
source/include/SDL_opengles.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_opengles2.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_pixels.h 29 ●●●●● patch | view | raw | blame | history
source/include/SDL_platform.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_power.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_quit.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_rect.h 32 ●●●●● patch | view | raw | blame | history
source/include/SDL_render.h 233 ●●●●● patch | view | raw | blame | history
source/include/SDL_rwops.h 65 ●●●● patch | view | raw | blame | history
source/include/SDL_scancode.h 4 ●●●● patch | view | raw | blame | history
source/include/SDL_sensor.h 8 ●●●● patch | view | raw | blame | history
source/include/SDL_shape.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_stdinc.h 16 ●●●● patch | view | raw | blame | history
source/include/SDL_surface.h 3 ●●●● patch | view | raw | blame | history
source/include/SDL_system.h 45 ●●●●● patch | view | raw | blame | history
source/include/SDL_syswm.h 25 ●●●●● patch | view | raw | blame | history
source/include/SDL_test.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_assert.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_common.h 34 ●●●●● patch | view | raw | blame | history
source/include/SDL_test_compare.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_crc32.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_font.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_fuzzer.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_harness.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_images.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_log.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_md5.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_test_memory.h 6 ●●●● patch | view | raw | blame | history
source/include/SDL_test_random.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_thread.h 38 ●●●● patch | view | raw | blame | history
source/include/SDL_timer.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_touch.h 18 ●●●●● patch | view | raw | blame | history
source/include/SDL_types.h 2 ●●● patch | view | raw | blame | history
source/include/SDL_version.h 4 ●●●● patch | view | raw | blame | history
source/include/SDL_video.h 3 ●●●● patch | view | raw | blame | history
source/include/SDL_vulkan.h 4 ●●●● patch | view | raw | blame | history
source/include/begin_code.h 5 ●●●● patch | view | raw | blame | history
source/include/close_code.h 5 ●●●● patch | view | raw | blame | history
source/sdl2-config-version.cmake.in 11 ●●●●● patch | view | raw | blame | history
source/sdl2-config.cmake.in 28 ●●●●● patch | view | raw | blame | history
source/sdl2.m4 2 ●●● patch | view | raw | blame | history
source/src/SDL.c 50 ●●●●● patch | view | raw | blame | history
source/src/SDL_assert.c 42 ●●●●● patch | view | raw | blame | history
source/src/SDL_assert_c.h 2 ●●● patch | view | raw | blame | history
source/src/SDL_dataqueue.c 2 ●●● patch | view | raw | blame | history
source/src/SDL_dataqueue.h 2 ●●● patch | view | raw | blame | history
source/src/SDL_error.c 16 ●●●● patch | view | raw | blame | history
source/src/SDL_error_c.h 2 ●●● patch | view | raw | blame | history
source/src/SDL_hints.c 17 ●●●● patch | view | raw | blame | history
source/src/SDL_hints_c.h 19 ●●●●● patch | view | raw | blame | history
source/src/SDL_internal.h 71 ●●●●● patch | view | raw | blame | history
source/src/SDL_log.c 14 ●●●●● patch | view | raw | blame | history
source/src/atomic/SDL_atomic.c 6 ●●●● patch | view | raw | blame | history
source/src/atomic/SDL_spinlock.c 19 ●●●● patch | view | raw | blame | history
source/src/audio/SDL_audio.c 73 ●●●●● patch | view | raw | blame | history
source/src/audio/SDL_audio_c.h 3 ●●●● patch | view | raw | blame | history
source/src/audio/SDL_audiocvt.c 26 ●●●●● patch | view | raw | blame | history
source/src/audio/SDL_audiodev.c 2 ●●● patch | view | raw | blame | history
source/src/audio/SDL_audiodev_c.h 2 ●●● patch | view | raw | blame | history
source/src/audio/SDL_audiotypecvt.c 45 ●●●● patch | view | raw | blame | history
source/src/audio/SDL_mixer.c 2 ●●● patch | view | raw | blame | history
source/src/audio/SDL_sysaudio.h 4 ●●●● patch | view | raw | blame | history
source/src/audio/SDL_wave.c 2520 ●●●● patch | view | raw | blame | history
source/src/audio/SDL_wave.h 136 ●●●● patch | view | raw | blame | history
source/src/audio/alsa/SDL_alsa_audio.c 38 ●●●●● patch | view | raw | blame | history
source/src/audio/alsa/SDL_alsa_audio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/android/SDL_androidaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/android/SDL_androidaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/arts/SDL_artsaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/arts/SDL_artsaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/coreaudio/SDL_coreaudio.h 10 ●●●●● patch | view | raw | blame | history
source/src/audio/coreaudio/SDL_coreaudio.m 363 ●●●●● patch | view | raw | blame | history
source/src/audio/directsound/SDL_directsound.c 2 ●●● patch | view | raw | blame | history
source/src/audio/directsound/SDL_directsound.h 2 ●●● patch | view | raw | blame | history
source/src/audio/disk/SDL_diskaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/disk/SDL_diskaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/dsp/SDL_dspaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/dsp/SDL_dspaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/dummy/SDL_dummyaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/dummy/SDL_dummyaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/emscripten/SDL_emscriptenaudio.c 26 ●●●●● patch | view | raw | blame | history
source/src/audio/emscripten/SDL_emscriptenaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/esd/SDL_esdaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/esd/SDL_esdaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/fusionsound/SDL_fsaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/fusionsound/SDL_fsaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/haiku/SDL_haikuaudio.cc 2 ●●● patch | view | raw | blame | history
source/src/audio/haiku/SDL_haikuaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/jack/SDL_jackaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/jack/SDL_jackaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/nacl/SDL_naclaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/nacl/SDL_naclaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/nas/SDL_nasaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/nas/SDL_nasaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/netbsd/SDL_netbsdaudio.c 171 ●●●● patch | view | raw | blame | history
source/src/audio/netbsd/SDL_netbsdaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/openslES/SDL_openslES.c 766 ●●●●● patch | view | raw | blame | history
source/src/audio/openslES/SDL_openslES.h 31 ●●●●● patch | view | raw | blame | history
source/src/audio/paudio/SDL_paudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/paudio/SDL_paudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/psp/SDL_pspaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/psp/SDL_pspaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/pulseaudio/SDL_pulseaudio.c 4 ●●●● patch | view | raw | blame | history
source/src/audio/pulseaudio/SDL_pulseaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/qsa/SDL_qsa_audio.c 10 ●●●● patch | view | raw | blame | history
source/src/audio/qsa/SDL_qsa_audio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/sndio/SDL_sndioaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/sndio/SDL_sndioaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/sun/SDL_sunaudio.c 2 ●●● patch | view | raw | blame | history
source/src/audio/sun/SDL_sunaudio.h 2 ●●● patch | view | raw | blame | history
source/src/audio/wasapi/SDL_wasapi.c 24 ●●●● patch | view | raw | blame | history
source/src/audio/wasapi/SDL_wasapi.h 2 ●●● patch | view | raw | blame | history
source/src/audio/wasapi/SDL_wasapi_win32.c 2 ●●● patch | view | raw | blame | history
source/src/audio/wasapi/SDL_wasapi_winrt.cpp 23 ●●●●● patch | view | raw | blame | history
source/src/audio/winmm/SDL_winmm.c 4 ●●●● patch | view | raw | blame | history
source/src/audio/winmm/SDL_winmm.h 2 ●●● patch | view | raw | blame | history
source/src/core/android/SDL_android.c 1402 ●●●●● patch | view | raw | blame | history
source/src/core/android/SDL_android.h 24 ●●●● patch | view | raw | blame | history
source/src/core/android/keyinfotable.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_dbus.c 30 ●●●● patch | view | raw | blame | history
source/src/core/linux/SDL_dbus.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_evdev.c 146 ●●●● patch | view | raw | blame | history
source/src/core/linux/SDL_evdev.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_evdev_kbd.c 16 ●●●●● patch | view | raw | blame | history
source/src/core/linux/SDL_evdev_kbd.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_evdev_kbd_default_accents.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_evdev_kbd_default_keymap.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_fcitx.c 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_fcitx.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_ibus.c 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_ibus.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_ime.c 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_ime.h 2 ●●● patch | view | raw | blame | history
source/src/core/linux/SDL_threadprio.c 116 ●●●●● patch | view | raw | blame | history
source/src/core/linux/SDL_udev.c 9 ●●●● patch | view | raw | blame | history
source/src/core/linux/SDL_udev.h 2 ●●● patch | view | raw | blame | history
source/src/core/unix/SDL_poll.c 2 ●●● patch | view | raw | blame | history
source/src/core/unix/SDL_poll.h 2 ●●● patch | view | raw | blame | history
source/src/core/windows/SDL_directx.h 2 ●●● patch | view | raw | blame | history
source/src/core/windows/SDL_windows.c 2 ●●● patch | view | raw | blame | history
source/src/core/windows/SDL_windows.h 2 ●●● patch | view | raw | blame | history
source/src/core/windows/SDL_xinput.c 2 ●●● patch | view | raw | blame | history
source/src/core/windows/SDL_xinput.h 2 ●●● patch | view | raw | blame | history
source/src/core/winrt/SDL_winrtapp_common.cpp 7 ●●●●● patch | view | raw | blame | history
source/src/core/winrt/SDL_winrtapp_common.h 2 ●●● patch | view | raw | blame | history
source/src/core/winrt/SDL_winrtapp_direct3d.cpp 2 ●●● patch | view | raw | blame | history
source/src/core/winrt/SDL_winrtapp_direct3d.h 2 ●●● patch | view | raw | blame | history
source/src/core/winrt/SDL_winrtapp_xaml.cpp 2 ●●● patch | view | raw | blame | history
source/src/core/winrt/SDL_winrtapp_xaml.h 2 ●●● patch | view | raw | blame | history
source/src/cpuinfo/SDL_cpuinfo.c 177 ●●●●● patch | view | raw | blame | history
source/src/cpuinfo/SDL_simd.h 88 ●●●●● patch | view | raw | blame | history
source/src/dynapi/SDL_dynapi.c 57 ●●●● patch | view | raw | blame | history
source/src/dynapi/SDL_dynapi.h 4 ●●● patch | view | raw | blame | history
source/src/dynapi/SDL_dynapi_overrides.h 50 ●●●●● patch | view | raw | blame | history
source/src/dynapi/SDL_dynapi_procs.h 62 ●●●●● patch | view | raw | blame | history
source/src/dynapi/gendynapi.pl 8 ●●●● patch | view | raw | blame | history
source/src/events/SDL_clipboardevents.c 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_clipboardevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_displayevents.c 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_displayevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_dropevents.c 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_dropevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_events.c 176 ●●●●● patch | view | raw | blame | history
source/src/events/SDL_events_c.h 12 ●●●●● patch | view | raw | blame | history
source/src/events/SDL_gesture.c 97 ●●●●● patch | view | raw | blame | history
source/src/events/SDL_gesture_c.h 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_keyboard.c 6 ●●●● patch | view | raw | blame | history
source/src/events/SDL_keyboard_c.h 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_mouse.c 137 ●●●● patch | view | raw | blame | history
source/src/events/SDL_mouse_c.h 4 ●●● patch | view | raw | blame | history
source/src/events/SDL_quit.c 203 ●●●●● patch | view | raw | blame | history
source/src/events/SDL_sysevents.h 2 ●●● patch | view | raw | blame | history
source/src/events/SDL_touch.c 118 ●●●●● patch | view | raw | blame | history
source/src/events/SDL_touch_c.h 9 ●●●●● patch | view | raw | blame | history
source/src/events/SDL_windowevents.c 4 ●●●● patch | view | raw | blame | history
source/src/events/SDL_windowevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/events/blank_cursor.h 2 ●●● patch | view | raw | blame | history
source/src/events/default_cursor.h 2 ●●● patch | view | raw | blame | history
source/src/events/scancodes_darwin.h 2 ●●● patch | view | raw | blame | history
source/src/events/scancodes_linux.h 2 ●●● patch | view | raw | blame | history
source/src/events/scancodes_windows.h 2 ●●● patch | view | raw | blame | history
source/src/events/scancodes_xfree86.h 20 ●●●● patch | view | raw | blame | history
source/src/file/SDL_rwops.c 69 ●●●●● patch | view | raw | blame | history
source/src/file/cocoa/SDL_rwopsbundlesupport.h 2 ●●● patch | view | raw | blame | history
source/src/file/cocoa/SDL_rwopsbundlesupport.m 2 ●●● patch | view | raw | blame | history
source/src/filesystem/android/SDL_sysfilesystem.c 2 ●●● patch | view | raw | blame | history
source/src/filesystem/cocoa/SDL_sysfilesystem.m 23 ●●●●● patch | view | raw | blame | history
source/src/filesystem/dummy/SDL_sysfilesystem.c 2 ●●● patch | view | raw | blame | history
source/src/filesystem/emscripten/SDL_sysfilesystem.c 2 ●●● patch | view | raw | blame | history
source/src/filesystem/haiku/SDL_sysfilesystem.cc 2 ●●● patch | view | raw | blame | history
source/src/filesystem/nacl/SDL_sysfilesystem.c 2 ●●● patch | view | raw | blame | history
source/src/filesystem/unix/SDL_sysfilesystem.c 4 ●●●● patch | view | raw | blame | history
source/src/filesystem/windows/SDL_sysfilesystem.c 2 ●●● patch | view | raw | blame | history
source/src/filesystem/winrt/SDL_sysfilesystem.cpp 2 ●●● patch | view | raw | blame | history
source/src/haptic/SDL_haptic.c 6 ●●●● patch | view | raw | blame | history
source/src/haptic/SDL_haptic_c.h 2 ●●● patch | view | raw | blame | history
source/src/haptic/SDL_syshaptic.h 2 ●●● patch | view | raw | blame | history
source/src/haptic/android/SDL_syshaptic.c 2 ●●● patch | view | raw | blame | history
source/src/haptic/darwin/SDL_syshaptic.c 13 ●●●● patch | view | raw | blame | history
source/src/haptic/darwin/SDL_syshaptic_c.h 2 ●●● patch | view | raw | blame | history
source/src/haptic/dummy/SDL_syshaptic.c 2 ●●● patch | view | raw | blame | history
source/src/haptic/linux/SDL_syshaptic.c 16 ●●●● patch | view | raw | blame | history
source/src/haptic/windows/SDL_dinputhaptic.c 2 ●●● patch | view | raw | blame | history
source/src/haptic/windows/SDL_dinputhaptic_c.h 2 ●●● patch | view | raw | blame | history
source/src/haptic/windows/SDL_windowshaptic.c 2 ●●● patch | view | raw | blame | history
source/src/haptic/windows/SDL_windowshaptic_c.h 2 ●●● patch | view | raw | blame | history
source/src/haptic/windows/SDL_xinputhaptic.c 2 ●●● patch | view | raw | blame | history
source/src/haptic/windows/SDL_xinputhaptic_c.h 2 ●●● patch | view | raw | blame | history
source/src/hidapi/AUTHORS.txt 2 ●●● patch | view | raw | blame | history
source/src/hidapi/README.txt 2 ●●● patch | view | raw | blame | history
source/src/hidapi/SDL_hidapi.c 752 ●●●●● patch | view | raw | blame | history
source/src/hidapi/android/hid.cpp 114 ●●●●● patch | view | raw | blame | history
source/src/hidapi/hidapi/hidapi.h 12 ●●●●● patch | view | raw | blame | history
source/src/hidapi/ios/hid.m 1 ●●●● patch | view | raw | blame | history
source/src/hidapi/libusb/hid.c 400 ●●●● patch | view | raw | blame | history
source/src/hidapi/linux/hid.c 4 ●●●● patch | view | raw | blame | history
source/src/hidapi/mac/hid.c 144 ●●●● patch | view | raw | blame | history
source/src/hidapi/windows/hid.c 75 ●●●● patch | view | raw | blame | history
source/src/joystick/SDL_gamecontroller.c 130 ●●●● patch | view | raw | blame | history
source/src/joystick/SDL_gamecontrollerdb.h 164 ●●●● patch | view | raw | blame | history
source/src/joystick/SDL_joystick.c 613 ●●●● patch | view | raw | blame | history
source/src/joystick/SDL_joystick_c.h 24 ●●●● patch | view | raw | blame | history
source/src/joystick/SDL_sysjoystick.h 24 ●●●● patch | view | raw | blame | history
source/src/joystick/android/SDL_sysjoystick.c 16 ●●●●● patch | view | raw | blame | history
source/src/joystick/android/SDL_sysjoystick_c.h 2 ●●● patch | view | raw | blame | history
source/src/joystick/bsd/SDL_sysjoystick.c 86 ●●●●● patch | view | raw | blame | history
source/src/joystick/controller_type.h 855 ●●●●● patch | view | raw | blame | history
source/src/joystick/darwin/SDL_sysjoystick.c 95 ●●●● patch | view | raw | blame | history
source/src/joystick/darwin/SDL_sysjoystick_c.h 2 ●●● patch | view | raw | blame | history
source/src/joystick/dummy/SDL_sysjoystick.c 10 ●●●● patch | view | raw | blame | history
source/src/joystick/emscripten/SDL_sysjoystick.c 21 ●●●● patch | view | raw | blame | history
source/src/joystick/emscripten/SDL_sysjoystick_c.h 2 ●●● patch | view | raw | blame | history
source/src/joystick/haiku/SDL_haikujoystick.cc 9 ●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_gamecube.c 414 ●●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_ps4.c 275 ●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_rumble.c 253 ●●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_rumble.h 39 ●●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_steam.c 1176 ●●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_switch.c 487 ●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_xbox360.c 318 ●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_xbox360w.c 306 ●●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapi_xboxone.c 646 ●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapijoystick.c 719 ●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/SDL_hidapijoystick_c.h 72 ●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/steam/controller_constants.h 484 ●●●●● patch | view | raw | blame | history
source/src/joystick/hidapi/steam/controller_structs.h 255 ●●●●● patch | view | raw | blame | history
source/src/joystick/iphoneos/SDL_sysjoystick.m 287 ●●●● patch | view | raw | blame | history
source/src/joystick/iphoneos/SDL_sysjoystick_c.h 4 ●●● patch | view | raw | blame | history
source/src/joystick/linux/SDL_sysjoystick.c 404 ●●●● patch | view | raw | blame | history
source/src/joystick/linux/SDL_sysjoystick_c.h 8 ●●●● patch | view | raw | blame | history
source/src/joystick/psp/SDL_sysjoystick.c 2 ●●● patch | view | raw | blame | history
source/src/joystick/sort_controllers.py 6 ●●●● patch | view | raw | blame | history
source/src/joystick/steam/SDL_steamcontroller.c 2 ●●● patch | view | raw | blame | history
source/src/joystick/steam/SDL_steamcontroller.h 2 ●●● patch | view | raw | blame | history
source/src/joystick/usb_ids.h 51 ●●●●● patch | view | raw | blame | history
source/src/joystick/windows/SDL_dinputjoystick.c 213 ●●●● patch | view | raw | blame | history
source/src/joystick/windows/SDL_dinputjoystick_c.h 4 ●●●● patch | view | raw | blame | history
source/src/joystick/windows/SDL_mmjoystick.c 2 ●●● patch | view | raw | blame | history
source/src/joystick/windows/SDL_windowsjoystick.c 16 ●●●●● patch | view | raw | blame | history
source/src/joystick/windows/SDL_windowsjoystick_c.h 3 ●●●● patch | view | raw | blame | history
source/src/joystick/windows/SDL_xinputjoystick.c 137 ●●●●● patch | view | raw | blame | history
source/src/joystick/windows/SDL_xinputjoystick_c.h 4 ●●●● patch | view | raw | blame | history
source/src/libm/e_exp.c 4 ●●●● patch | view | raw | blame | history
source/src/libm/e_pow.c 4 ●●●● patch | view | raw | blame | history
source/src/libm/k_rem_pio2.c 2 ●●● patch | view | raw | blame | history
source/src/libm/math_libm.h 2 ●●● patch | view | raw | blame | history
source/src/libm/math_private.h 2 ●●● patch | view | raw | blame | history
source/src/libm/s_atan.c 4 ●●●● patch | view | raw | blame | history
source/src/libm/s_floor.c 4 ●●●● patch | view | raw | blame | history
source/src/libm/s_scalbn.c 6 ●●●● patch | view | raw | blame | history
source/src/loadso/dlopen/SDL_sysloadso.c 9 ●●●●● patch | view | raw | blame | history
source/src/loadso/dummy/SDL_sysloadso.c 2 ●●● patch | view | raw | blame | history
source/src/loadso/windows/SDL_sysloadso.c 2 ●●● patch | view | raw | blame | history
source/src/main/haiku/SDL_BApp.h 24 ●●●● patch | view | raw | blame | history
source/src/main/haiku/SDL_BeApp.cc 7 ●●●●● patch | view | raw | blame | history
source/src/main/haiku/SDL_BeApp.h 5 ●●●● patch | view | raw | blame | history
source/src/main/nacl/SDL_nacl_main.c 2 ●●● patch | view | raw | blame | history
source/src/main/uikit/SDL_uikit_main.c 19 ●●●●● patch | view | raw | blame | history
source/src/main/windows/SDL_windows_main.c 153 ●●●● patch | view | raw | blame | history
source/src/main/windows/version.rc 10 ●●●● patch | view | raw | blame | history
source/src/power/SDL_power.c 2 ●●● patch | view | raw | blame | history
source/src/power/SDL_syspower.h 2 ●●● patch | view | raw | blame | history
source/src/power/android/SDL_syspower.c 2 ●●● patch | view | raw | blame | history
source/src/power/emscripten/SDL_syspower.c 2 ●●● patch | view | raw | blame | history
source/src/power/haiku/SDL_syspower.c 2 ●●● patch | view | raw | blame | history
source/src/power/linux/SDL_syspower.c 19 ●●●●● patch | view | raw | blame | history
source/src/power/macosx/SDL_syspower.c 2 ●●● patch | view | raw | blame | history
source/src/power/psp/SDL_syspower.c 2 ●●● patch | view | raw | blame | history
source/src/power/uikit/SDL_syspower.h 2 ●●● patch | view | raw | blame | history
source/src/power/uikit/SDL_syspower.m 2 ●●● patch | view | raw | blame | history
source/src/power/windows/SDL_syspower.c 2 ●●● patch | view | raw | blame | history
source/src/power/winrt/SDL_syspower.cpp 2 ●●● patch | view | raw | blame | history
source/src/render/SDL_d3dmath.c 2 ●●● patch | view | raw | blame | history
source/src/render/SDL_d3dmath.h 2 ●●● patch | view | raw | blame | history
source/src/render/SDL_render.c 1475 ●●●● patch | view | raw | blame | history
source/src/render/SDL_sysrender.h 126 ●●●●● patch | view | raw | blame | history
source/src/render/SDL_yuv_sw.c 6 ●●●● patch | view | raw | blame | history
source/src/render/SDL_yuv_sw_c.h 2 ●●● patch | view | raw | blame | history
source/src/render/direct3d/SDL_render_d3d.c 1645 ●●●● patch | view | raw | blame | history
source/src/render/direct3d/SDL_shaders_d3d.c 2 ●●● patch | view | raw | blame | history
source/src/render/direct3d/SDL_shaders_d3d.h 2 ●●● patch | view | raw | blame | history
source/src/render/direct3d11/SDL_render_d3d11.c 1387 ●●●● patch | view | raw | blame | history
source/src/render/direct3d11/SDL_render_winrt.cpp 2 ●●● patch | view | raw | blame | history
source/src/render/direct3d11/SDL_render_winrt.h 2 ●●● patch | view | raw | blame | history
source/src/render/direct3d11/SDL_shaders_d3d11.c 2 ●●● patch | view | raw | blame | history
source/src/render/direct3d11/SDL_shaders_d3d11.h 2 ●●● patch | view | raw | blame | history
source/src/render/metal/SDL_render_metal.m 1738 ●●●●● patch | view | raw | blame | history
source/src/render/metal/SDL_shaders_metal.metal 38 ●●●●● patch | view | raw | blame | history
source/src/render/metal/SDL_shaders_metal_ios.h 3051 ●●●● patch | view | raw | blame | history
source/src/render/metal/SDL_shaders_metal_osx.h 3053 ●●●● patch | view | raw | blame | history
source/src/render/metal/SDL_shaders_metal_tvos.h 1854 ●●●●● patch | view | raw | blame | history
source/src/render/metal/build-metal-shaders.sh 18 ●●●●● patch | view | raw | blame | history
source/src/render/opengl/SDL_glfuncs.h 2 ●●● patch | view | raw | blame | history
source/src/render/opengl/SDL_render_gl.c 1527 ●●●● patch | view | raw | blame | history
source/src/render/opengl/SDL_shaders_gl.c 24 ●●●● patch | view | raw | blame | history
source/src/render/opengl/SDL_shaders_gl.h 4 ●●● patch | view | raw | blame | history
source/src/render/opengles/SDL_glesfuncs.h 2 ●●● patch | view | raw | blame | history
source/src/render/opengles/SDL_render_gles.c 1167 ●●●● patch | view | raw | blame | history
source/src/render/opengles2/SDL_gles2funcs.h 5 ●●●●● patch | view | raw | blame | history
source/src/render/opengles2/SDL_render_gles2.c 2199 ●●●● patch | view | raw | blame | history
source/src/render/opengles2/SDL_shaders_gles2.c 30 ●●●● patch | view | raw | blame | history
source/src/render/opengles2/SDL_shaders_gles2.h 2 ●●● patch | view | raw | blame | history
source/src/render/psp/SDL_render_psp.c 1013 ●●●● patch | view | raw | blame | history
source/src/render/software/SDL_blendfillrect.c 27 ●●●● patch | view | raw | blame | history
source/src/render/software/SDL_blendfillrect.h 2 ●●● patch | view | raw | blame | history
source/src/render/software/SDL_blendline.c 104 ●●●●● patch | view | raw | blame | history
source/src/render/software/SDL_blendline.h 2 ●●● patch | view | raw | blame | history
source/src/render/software/SDL_blendpoint.c 27 ●●●● patch | view | raw | blame | history
source/src/render/software/SDL_blendpoint.h 2 ●●● patch | view | raw | blame | history
source/src/render/software/SDL_draw.h 58 ●●●●● patch | view | raw | blame | history
source/src/render/software/SDL_drawline.c 6 ●●●● patch | view | raw | blame | history
source/src/render/software/SDL_drawline.h 2 ●●● patch | view | raw | blame | history
source/src/render/software/SDL_drawpoint.c 6 ●●●● patch | view | raw | blame | history
source/src/render/software/SDL_drawpoint.h 2 ●●● patch | view | raw | blame | history
source/src/render/software/SDL_render_sw.c 853 ●●●● patch | view | raw | blame | history
source/src/render/software/SDL_render_sw_c.h 2 ●●● patch | view | raw | blame | history
source/src/render/software/SDL_rotate.c 8 ●●●● patch | view | raw | blame | history
source/src/render/software/SDL_rotate.h 2 ●●● patch | view | raw | blame | history
source/src/sensor/SDL_sensor.c 13 ●●●●● patch | view | raw | blame | history
source/src/sensor/SDL_sensor_c.h 2 ●●● patch | view | raw | blame | history
source/src/sensor/SDL_syssensor.h 2 ●●● patch | view | raw | blame | history
source/src/sensor/android/SDL_androidsensor.c 2 ●●● patch | view | raw | blame | history
source/src/sensor/android/SDL_androidsensor.h 2 ●●● patch | view | raw | blame | history
source/src/sensor/coremotion/SDL_coremotionsensor.h 2 ●●● patch | view | raw | blame | history
source/src/sensor/coremotion/SDL_coremotionsensor.m 2 ●●● patch | view | raw | blame | history
source/src/sensor/dummy/SDL_dummysensor.c 2 ●●● patch | view | raw | blame | history
source/src/sensor/dummy/SDL_dummysensor.h 2 ●●● patch | view | raw | blame | history
source/src/stdlib/SDL_getenv.c 2 ●●● patch | view | raw | blame | history
source/src/stdlib/SDL_iconv.c 14 ●●●● patch | view | raw | blame | history
source/src/stdlib/SDL_malloc.c 67 ●●●●● patch | view | raw | blame | history
source/src/stdlib/SDL_qsort.c 19 ●●●●● patch | view | raw | blame | history
source/src/stdlib/SDL_stdlib.c 6 ●●●● patch | view | raw | blame | history
source/src/stdlib/SDL_string.c 86 ●●●● patch | view | raw | blame | history
source/src/stdlib/SDL_strtokr.c 103 ●●●●● patch | view | raw | blame | history
source/src/test/SDL_test_assert.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_common.c 161 ●●●● patch | view | raw | blame | history
source/src/test/SDL_test_compare.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_crc32.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_font.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_fuzzer.c 6 ●●●● patch | view | raw | blame | history
source/src/test/SDL_test_harness.c 16 ●●●● patch | view | raw | blame | history
source/src/test/SDL_test_imageBlit.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_imageBlitBlend.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_imageFace.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_imagePrimitives.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_imagePrimitivesBlend.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_log.c 2 ●●● patch | view | raw | blame | history
source/src/test/SDL_test_md5.c 6 ●●●● patch | view | raw | blame | history
source/src/test/SDL_test_memory.c 6 ●●●● patch | view | raw | blame | history
source/src/test/SDL_test_random.c 2 ●●● patch | view | raw | blame | history
source/src/thread/SDL_systhread.h 2 ●●● patch | view | raw | blame | history
source/src/thread/SDL_thread.c 8 ●●●● patch | view | raw | blame | history
source/src/thread/SDL_thread_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/generic/SDL_syscond.c 2 ●●● patch | view | raw | blame | history
source/src/thread/generic/SDL_sysmutex.c 2 ●●● patch | view | raw | blame | history
source/src/thread/generic/SDL_sysmutex_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/generic/SDL_syssem.c 2 ●●● patch | view | raw | blame | history
source/src/thread/generic/SDL_systhread.c 2 ●●● patch | view | raw | blame | history
source/src/thread/generic/SDL_systhread_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/generic/SDL_systls.c 2 ●●● patch | view | raw | blame | history
source/src/thread/psp/SDL_syscond.c 2 ●●● patch | view | raw | blame | history
source/src/thread/psp/SDL_sysmutex.c 2 ●●● patch | view | raw | blame | history
source/src/thread/psp/SDL_sysmutex_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/psp/SDL_syssem.c 2 ●●● patch | view | raw | blame | history
source/src/thread/psp/SDL_systhread.c 2 ●●● patch | view | raw | blame | history
source/src/thread/psp/SDL_systhread_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/pthread/SDL_syscond.c 2 ●●● patch | view | raw | blame | history
source/src/thread/pthread/SDL_sysmutex.c 2 ●●● patch | view | raw | blame | history
source/src/thread/pthread/SDL_sysmutex_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/pthread/SDL_syssem.c 2 ●●● patch | view | raw | blame | history
source/src/thread/pthread/SDL_systhread.c 85 ●●●●● patch | view | raw | blame | history
source/src/thread/pthread/SDL_systhread_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/pthread/SDL_systls.c 2 ●●● patch | view | raw | blame | history
source/src/thread/stdcpp/SDL_syscond.cpp 2 ●●● patch | view | raw | blame | history
source/src/thread/stdcpp/SDL_sysmutex.cpp 2 ●●● patch | view | raw | blame | history
source/src/thread/stdcpp/SDL_sysmutex_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/stdcpp/SDL_systhread.cpp 39 ●●●●● patch | view | raw | blame | history
source/src/thread/stdcpp/SDL_systhread_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/windows/SDL_sysmutex.c 2 ●●● patch | view | raw | blame | history
source/src/thread/windows/SDL_syssem.c 2 ●●● patch | view | raw | blame | history
source/src/thread/windows/SDL_systhread.c 2 ●●● patch | view | raw | blame | history
source/src/thread/windows/SDL_systhread_c.h 2 ●●● patch | view | raw | blame | history
source/src/thread/windows/SDL_systls.c 14 ●●●●● patch | view | raw | blame | history
source/src/timer/SDL_timer.c 2 ●●● patch | view | raw | blame | history
source/src/timer/SDL_timer_c.h 2 ●●● patch | view | raw | blame | history
source/src/timer/dummy/SDL_systimer.c 2 ●●● patch | view | raw | blame | history
source/src/timer/haiku/SDL_systimer.c 2 ●●● patch | view | raw | blame | history
source/src/timer/psp/SDL_systimer.c 2 ●●● patch | view | raw | blame | history
source/src/timer/unix/SDL_systimer.c 5 ●●●●● patch | view | raw | blame | history
source/src/timer/windows/SDL_systimer.c 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_RLEaccel.c 50 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_RLEaccel_c.h 6 ●●●● patch | view | raw | blame | history
source/src/video/SDL_blit.c 66 ●●●● patch | view | raw | blame | history
source/src/video/SDL_blit.h 3 ●●●● patch | view | raw | blame | history
source/src/video/SDL_blit_0.c 6 ●●●● patch | view | raw | blame | history
source/src/video/SDL_blit_1.c 6 ●●●● patch | view | raw | blame | history
source/src/video/SDL_blit_A.c 116 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_blit_N.c 866 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_blit_auto.c 1286 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_blit_auto.h 6 ●●●● patch | view | raw | blame | history
source/src/video/SDL_blit_copy.c 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_blit_copy.h 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_blit_slow.c 20 ●●●● patch | view | raw | blame | history
source/src/video/SDL_blit_slow.h 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_bmp.c 211 ●●●● patch | view | raw | blame | history
source/src/video/SDL_clipboard.c 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_egl.c 287 ●●●● patch | view | raw | blame | history
source/src/video/SDL_egl_c.h 20 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_fillrect.c 247 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_pixels.c 11 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_pixels_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_rect.c 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_rect_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_shape.c 6 ●●●● patch | view | raw | blame | history
source/src/video/SDL_shape_internals.h 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_stretch.c 2 ●●● patch | view | raw | blame | history
source/src/video/SDL_surface.c 223 ●●●● patch | view | raw | blame | history
source/src/video/SDL_sysvideo.h 20 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_video.c 97 ●●●● patch | view | raw | blame | history
source/src/video/SDL_vulkan_internal.h 12 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_vulkan_utils.c 345 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_yuv.c 13 ●●●●● patch | view | raw | blame | history
source/src/video/SDL_yuv_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidclipboard.c 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidclipboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidevents.c 246 ●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidevents.h 5 ●●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidgl.c 39 ●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidgl.h 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidkeyboard.c 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidkeyboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidmessagebox.c 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidmessagebox.h 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidmouse.c 24 ●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidmouse.h 4 ●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidtouch.c 83 ●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidtouch.h 4 ●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidvideo.c 109 ●●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidvideo.h 13 ●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidvulkan.c 4 ●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidvulkan.h 2 ●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidwindow.c 143 ●●●●● patch | view | raw | blame | history
source/src/video/android/SDL_androidwindow.h 18 ●●●●● patch | view | raw | blame | history
source/src/video/arm/pixman-arm-asm.h 36 ●●●●● patch | view | raw | blame | history
source/src/video/arm/pixman-arm-neon-asm.S 375 ●●●●● patch | view | raw | blame | history
source/src/video/arm/pixman-arm-neon-asm.h 1184 ●●●●● patch | view | raw | blame | history
source/src/video/arm/pixman-arm-simd-asm.S 532 ●●●●● patch | view | raw | blame | history
source/src/video/arm/pixman-arm-simd-asm.h 1034 ●●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoaclipboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoaclipboard.m 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoaevents.h 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoaevents.m 74 ●●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoakeyboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoakeyboard.m 119 ●●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoamessagebox.h 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoamessagebox.m 20 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoametalview.h 23 ●●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoametalview.m 92 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoamodes.h 4 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoamodes.m 361 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoamouse.h 4 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoamouse.m 40 ●●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoamousetap.h 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoamousetap.m 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoaopengl.h 13 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoaopengl.m 29 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoaopengles.h 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoaopengles.m 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoashape.h 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoashape.m 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoavideo.h 7 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoavideo.m 15 ●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoavulkan.h 2 ●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoavulkan.m 38 ●●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoawindow.h 5 ●●●●● patch | view | raw | blame | history
source/src/video/cocoa/SDL_cocoawindow.m 275 ●●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_WM.c 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_WM.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_dyn.c 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_dyn.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_events.c 6 ●●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_events.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_modes.c 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_modes.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_mouse.c 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_mouse.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_opengl.c 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_opengl.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_render.c 933 ●●●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_render.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_shape.c 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_shape.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_video.c 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_video.h 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_window.c 2 ●●● patch | view | raw | blame | history
source/src/video/directfb/SDL_DirectFB_window.h 2 ●●● patch | view | raw | blame | history
source/src/video/dummy/SDL_nullevents.c 2 ●●● patch | view | raw | blame | history
source/src/video/dummy/SDL_nullevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/dummy/SDL_nullframebuffer.c 2 ●●● patch | view | raw | blame | history
source/src/video/dummy/SDL_nullframebuffer_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/dummy/SDL_nullvideo.c 2 ●●● patch | view | raw | blame | history
source/src/video/dummy/SDL_nullvideo.h 2 ●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenevents.c 161 ●●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenevents.h 2 ●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenframebuffer.c 2 ●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenframebuffer.h 2 ●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenmouse.c 4 ●●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenmouse.h 2 ●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenopengles.c 15 ●●●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenopengles.h 4 ●●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenvideo.c 30 ●●●●● patch | view | raw | blame | history
source/src/video/emscripten/SDL_emscriptenvideo.h 7 ●●●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_BWin.h 54 ●●●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bclipboard.cc 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bclipboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bevents.cc 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bevents.h 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bframebuffer.cc 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bframebuffer.h 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bkeyboard.cc 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bkeyboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bmessagebox.cc 425 ●●●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bmessagebox.h 30 ●●●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bmodes.cc 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bmodes.h 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bopengl.cc 6 ●●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bopengl.h 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bvideo.cc 32 ●●●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bvideo.h 2 ●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bwindow.cc 14 ●●●● patch | view | raw | blame | history
source/src/video/haiku/SDL_bwindow.h 2 ●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vk_icd.h 170 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vk_layer.h 195 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vk_platform.h 28 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vk_sdk_platform.h 69 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan.h 6473 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan.hpp 53056 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_android.h 126 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_core.h 8823 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_fuchsia.h 58 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_ios.h 58 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_macos.h 58 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_mir.h 65 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_vi.h 58 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_wayland.h 65 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_win32.h 276 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_xcb.h 66 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_xlib.h 66 ●●●●● patch | view | raw | blame | history
source/src/video/khronos/vulkan/vulkan_xlib_xrandr.h 54 ●●●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmdyn.c 6 ●●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmdyn.h 2 ●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmevents.c 2 ●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmevents.h 2 ●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmmouse.c 85 ●●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmmouse.h 2 ●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmopengles.c 145 ●●●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmopengles.h 2 ●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmsym.h 2 ●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmvideo.c 711 ●●●●● patch | view | raw | blame | history
source/src/video/kmsdrm/SDL_kmsdrmvideo.h 31 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirdyn.c 170 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirdyn.h 53 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirevents.c 321 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirframebuffer.c 134 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirframebuffer.h 47 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirmouse.c 292 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_miropengl.c 78 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_miropengl.h 53 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirsym.h 143 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirvideo.c 423 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirvideo.h 49 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirwindow.c 374 ●●●●● patch | view | raw | blame | history
source/src/video/mir/SDL_mirwindow.h 93 ●●●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclevents.c 2 ●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclglue.c 2 ●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclopengles.c 2 ●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclopengles.h 2 ●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclvideo.c 2 ●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclvideo.h 2 ●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclwindow.c 2 ●●● patch | view | raw | blame | history
source/src/video/nacl/SDL_naclwindow.h 2 ●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenevents.c 27 ●●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenevents_c.h 17 ●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenframebuffer.c 90 ●●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenframebuffer_c.h 19 ●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenopengl.c 102 ●●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenopengl.h 54 ●●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenvideo.c 166 ●●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenvideo.h 19 ●●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenwindow.c 87 ●●●●● patch | view | raw | blame | history
source/src/video/offscreen/SDL_offscreenwindow.h 27 ●●●●● patch | view | raw | blame | history
source/src/video/pandora/SDL_pandora.c 2 ●●● patch | view | raw | blame | history
source/src/video/pandora/SDL_pandora.h 2 ●●● patch | view | raw | blame | history
source/src/video/pandora/SDL_pandora_events.c 2 ●●● patch | view | raw | blame | history
source/src/video/pandora/SDL_pandora_events.h 2 ●●● patch | view | raw | blame | history
source/src/video/psp/SDL_pspevents.c 2 ●●● patch | view | raw | blame | history
source/src/video/psp/SDL_pspevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/psp/SDL_pspgl.c 2 ●●● patch | view | raw | blame | history
source/src/video/psp/SDL_pspgl_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/psp/SDL_pspmouse.c 2 ●●● patch | view | raw | blame | history
source/src/video/psp/SDL_pspmouse_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/psp/SDL_pspvideo.c 2 ●●● patch | view | raw | blame | history
source/src/video/psp/SDL_pspvideo.h 2 ●●● patch | view | raw | blame | history
source/src/video/raspberry/SDL_rpievents.c 2 ●●● patch | view | raw | blame | history
source/src/video/raspberry/SDL_rpievents_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/raspberry/SDL_rpimouse.c 46 ●●●●● patch | view | raw | blame | history
source/src/video/raspberry/SDL_rpimouse.h 2 ●●● patch | view | raw | blame | history
source/src/video/raspberry/SDL_rpiopengles.c 2 ●●● patch | view | raw | blame | history
source/src/video/raspberry/SDL_rpiopengles.h 2 ●●● patch | view | raw | blame | history
source/src/video/raspberry/SDL_rpivideo.c 47 ●●●●● patch | view | raw | blame | history
source/src/video/raspberry/SDL_rpivideo.h 2 ●●● patch | view | raw | blame | history
source/src/video/sdlgenblit.pl 128 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitappdelegate.h 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitappdelegate.m 17 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitclipboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitclipboard.m 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitevents.h 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitevents.m 4 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitmessagebox.h 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitmessagebox.m 49 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitmetalview.h 15 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitmetalview.m 45 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitmodes.h 10 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitmodes.m 188 ●●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitopengles.h 6 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitopengles.m 11 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitopenglview.h 6 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitopenglview.m 4 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitvideo.h 4 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitvideo.m 54 ●●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitview.h 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitview.m 80 ●●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitviewcontroller.h 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitviewcontroller.m 66 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitvulkan.h 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitvulkan.m 61 ●●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitwindow.h 2 ●●● patch | view | raw | blame | history
source/src/video/uikit/SDL_uikitwindow.m 34 ●●●● patch | view | raw | blame | history
source/src/video/uikit/keyinfotable.h 2 ●●● patch | view | raw | blame | history
source/src/video/vivante/SDL_vivanteopengles.c 2 ●●● patch | view | raw | blame | history
source/src/video/vivante/SDL_vivanteopengles.h 2 ●●● patch | view | raw | blame | history
source/src/video/vivante/SDL_vivanteplatform.c 2 ●●● patch | view | raw | blame | history
source/src/video/vivante/SDL_vivanteplatform.h 2 ●●● patch | view | raw | blame | history
source/src/video/vivante/SDL_vivantevideo.c 10 ●●●●● patch | view | raw | blame | history
source/src/video/vivante/SDL_vivantevideo.h 2 ●●● patch | view | raw | blame | history
source/src/video/vivante/SDL_vivantevulkan.c 97 ●●●●● patch | view | raw | blame | history
source/src/video/vivante/SDL_vivantevulkan.h 23 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandclipboard.c 2 ●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandclipboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylanddatamanager.c 13 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylanddatamanager.h 2 ●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylanddyn.c 5 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylanddyn.h 7 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandevents.c 208 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandmouse.c 2 ●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandmouse.h 2 ●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandopengles.c 35 ●●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandopengles.h 3 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandsym.h 3 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandtouch.c 20 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandtouch.h 2 ●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandvideo.c 44 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandvideo.h 12 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandvulkan.c 20 ●●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandvulkan.h 3 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandwindow.c 377 ●●●● patch | view | raw | blame | history
source/src/video/wayland/SDL_waylandwindow.h 22 ●●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_msctf.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_vkeys.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsclipboard.c 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsclipboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsevents.c 175 ●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsevents.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsframebuffer.c 7 ●●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsframebuffer.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowskeyboard.c 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowskeyboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsmessagebox.c 49 ●●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsmessagebox.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsmodes.c 4 ●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsmodes.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsmouse.c 7 ●●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsmouse.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsopengl.c 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsopengl.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsopengles.c 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsopengles.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsshape.c 3 ●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsshape.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowstaskdialog.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsvideo.c 4 ●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsvideo.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsvulkan.c 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowsvulkan.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowswindow.c 63 ●●●●● patch | view | raw | blame | history
source/src/video/windows/SDL_windowswindow.h 2 ●●● patch | view | raw | blame | history
source/src/video/windows/wmmsg.h 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtevents.cpp 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtevents_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtgamebar.cpp 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtgamebar_cpp.h 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtkeyboard.cpp 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtmessagebox.cpp 18 ●●●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtmessagebox.h 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtmouse.cpp 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtmouse_c.h 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtopengles.cpp 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtopengles.h 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtpointerinput.cpp 28 ●●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtvideo.cpp 2 ●●● patch | view | raw | blame | history
source/src/video/winrt/SDL_winrtvideo_cpp.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11clipboard.c 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11clipboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11dyn.c 5 ●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11dyn.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11events.c 40 ●●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11events.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11framebuffer.c 12 ●●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11framebuffer.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11keyboard.c 7 ●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11keyboard.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11messagebox.c 27 ●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11messagebox.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11modes.c 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11modes.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11mouse.c 4 ●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11mouse.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11opengl.c 14 ●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11opengl.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11opengles.c 6 ●●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11opengles.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11shape.c 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11shape.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11sym.h 3 ●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11touch.c 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11touch.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11video.c 30 ●●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11video.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11vulkan.c 6 ●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11vulkan.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11window.c 103 ●●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11window.h 2 ●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11xinput2.c 97 ●●●●● patch | view | raw | blame | history
source/src/video/x11/SDL_x11xinput2.h 2 ●●● patch | view | raw | blame | history
source/src/video/yuv2rgb/yuv_rgb.c 3 ●●●●● patch | view | raw | blame | history
source/test/CMakeLists.txt 69 ●●●● patch | view | raw | blame | history
source/test/Makefile.in 10 ●●●●● patch | view | raw | blame | history
source/test/Makefile.os2 91 ●●●●● patch | view | raw | blame | history
source/test/aclocal.m4 359 ●●●●● patch | view | raw | blame | history
source/test/checkkeys.c 2 ●●● patch | view | raw | blame | history
source/test/configure 38 ●●●● patch | view | raw | blame | history
source/test/configure.ac 35 ●●●●● patch | view | raw | blame | history
source/test/controllermap.c 34 ●●●●● patch | view | raw | blame | history
source/test/loopwave.c 2 ●●● patch | view | raw | blame | history
source/test/loopwavequeue.c 2 ●●● patch | view | raw | blame | history
source/test/testatomic.c 6 ●●●● patch | view | raw | blame | history
source/test/testaudiocapture.c 2 ●●● patch | view | raw | blame | history
source/test/testaudiohotplug.c 2 ●●● patch | view | raw | blame | history
source/test/testaudioinfo.c 2 ●●● patch | view | raw | blame | history
source/test/testautomation.c 6 ●●●● patch | view | raw | blame | history
source/test/testautomation_pixels.c 4 ●●● patch | view | raw | blame | history
source/test/testautomation_rwops.c 4 ●●●● patch | view | raw | blame | history
source/test/testautomation_surface.c 1 ●●●● patch | view | raw | blame | history
source/test/testbounds.c 2 ●●● patch | view | raw | blame | history
source/test/testcustomcursor.c 4 ●●●● patch | view | raw | blame | history
source/test/testdisplayinfo.c 2 ●●● patch | view | raw | blame | history
source/test/testdraw2.c 6 ●●●● patch | view | raw | blame | history
source/test/testdrawchessboard.c 2 ●●● patch | view | raw | blame | history
source/test/testdropfile.c 11 ●●●● patch | view | raw | blame | history
source/test/testerror.c 2 ●●● patch | view | raw | blame | history
source/test/testfile.c 2 ●●● patch | view | raw | blame | history
source/test/testfilesystem.c 20 ●●●● patch | view | raw | blame | history
source/test/testgamecontroller.c 41 ●●●● patch | view | raw | blame | history
source/test/testgesture.c 440 ●●●● patch | view | raw | blame | history
source/test/testgl2.c 32 ●●●● patch | view | raw | blame | history
source/test/testgles.c 6 ●●●● patch | view | raw | blame | history
source/test/testgles2.c 6 ●●●● patch | view | raw | blame | history
source/test/testhaptic.c 2 ●●● patch | view | raw | blame | history
source/test/testhotplug.c 2 ●●● patch | view | raw | blame | history
source/test/testiconv.c 2 ●●● patch | view | raw | blame | history
source/test/testime.c 2 ●●● patch | view | raw | blame | history
source/test/testintersections.c 6 ●●●● patch | view | raw | blame | history
source/test/testjoystick.c 4 ●●●● patch | view | raw | blame | history
source/test/testkeys.c 2 ●●● patch | view | raw | blame | history
source/test/testloadso.c 2 ●●● patch | view | raw | blame | history
source/test/testlock.c 2 ●●● patch | view | raw | blame | history
source/test/testmessage.c 2 ●●● patch | view | raw | blame | history
source/test/testmultiaudio.c 2 ●●● patch | view | raw | blame | history
source/test/testnative.c 2 ●●● patch | view | raw | blame | history
source/test/testnative.h 2 ●●● patch | view | raw | blame | history
source/test/testnativew32.c 2 ●●● patch | view | raw | blame | history
source/test/testnativex11.c 2 ●●● patch | view | raw | blame | history
source/test/testoffscreen.c 170 ●●●●● patch | view | raw | blame | history
source/test/testoverlay2.c 26 ●●●● patch | view | raw | blame | history
source/test/testplatform.c 2 ●●● patch | view | raw | blame | history
source/test/testpower.c 2 ●●● patch | view | raw | blame | history
source/test/testqsort.c 8 ●●●●● patch | view | raw | blame | history
source/test/testrelative.c 2 ●●● patch | view | raw | blame | history
source/test/testrendercopyex.c 16 ●●●● patch | view | raw | blame | history
source/test/testrendertarget.c 6 ●●●● patch | view | raw | blame | history
source/test/testresample.c 2 ●●● patch | view | raw | blame | history
source/test/testrumble.c 4 ●●●● patch | view | raw | blame | history
source/test/testscale.c 16 ●●●● patch | view | raw | blame | history
source/test/testsem.c 2 ●●● patch | view | raw | blame | history
source/test/testsensor.c 2 ●●● patch | view | raw | blame | history
source/test/testshader.c 2 ●●● patch | view | raw | blame | history
source/test/testshape.c 2 ●●● patch | view | raw | blame | history
source/test/testsprite2.c 31 ●●●●● patch | view | raw | blame | history
source/test/testspriteminimal.c 2 ●●● patch | view | raw | blame | history
source/test/teststreaming.c 2 ●●● patch | view | raw | blame | history
source/test/testthread.c 2 ●●● patch | view | raw | blame | history
source/test/testtimer.c 2 ●●● patch | view | raw | blame | history
source/test/testver.c 2 ●●● patch | view | raw | blame | history
source/test/testviewport.c 100 ●●●● patch | view | raw | blame | history
source/test/testvulkan.c 22 ●●●● patch | view | raw | blame | history
source/test/testwm2.c 19 ●●●● patch | view | raw | blame | history
source/test/testyuv.c 2 ●●● patch | view | raw | blame | history
source/test/testyuv_cvt.c 2 ●●● patch | view | raw | blame | history
source/test/testyuv_cvt.h 2 ●●● patch | view | raw | blame | history
source/test/torturethread.c 2 ●●● patch | view | raw | blame | history
source/visualtest/unittest/testquit.c 3 ●●●● patch | view | raw | blame | history
source/wayland-protocols/org-kde-kwin-server-decoration-manager.xml 94 ●●●●● patch | view | raw | blame | history
source/wayland-protocols/xdg-decoration-unstable-v1.xml 156 ●●●●● patch | view | raw | blame | history
source/.hgignore
@@ -4,12 +4,33 @@
config.cache
config.log
config.status
libtool
Makefile
sdl-config
Makefile.rules
sdl2-config
sdl2-config.cmake
sdl2.pc
SDL2.spec
build
gen
Build
# for CMake
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
cmake_uninstall.cmake
SDL2ConfigVersion.cmake
*.a
*.la
*.so
*.so.*
.ninja_*
*.ninja
# for CLion
.idea
cmake-build-*
# for Xcode
*.orig
@@ -58,7 +79,7 @@
# for Android
android-project/local.properties
sdl.pc
test/aclocal.m4
test/autom4te*
test/config.cache
test/config.log
@@ -122,10 +143,13 @@
test/testtimer
test/testver
test/testviewport
test/testvulkan
test/testwm2
test/testyuv
test/torturethread
test/*.exe
test/*,e1f
test/*,ff8
test/*.dSYM
buildbot
test/buildbot
source/.hgtags
@@ -33,3 +33,6 @@
8df7a59b55283aa09889522369a2b32674c048de release-2.0.6
2088cd828335797d73d151e3288d899f77204862 release-2.0.7
f1084c419f33610cf274e309a8b2798d2ae665c7 release-2.0.8
8feb5da6f2fb75703bde2c06813375af984a57f0 release-2.0.9
bc90ce38f1e27ace54b83bebf987993002504f7f release-2.0.10
78d0bb6f3b8f9b8f2a76cb357a407bc7ace57234 release-2.0.12
source/Android.mk
@@ -20,6 +20,7 @@
    $(wildcard $(LOCAL_PATH)/src/audio/*.c) \
    $(wildcard $(LOCAL_PATH)/src/audio/android/*.c) \
    $(wildcard $(LOCAL_PATH)/src/audio/dummy/*.c) \
    $(wildcard $(LOCAL_PATH)/src/audio/openslES/*.c) \
    $(LOCAL_PATH)/src/atomic/SDL_atomic.c.arm \
    $(LOCAL_PATH)/src/atomic/SDL_spinlock.c.arm \
    $(wildcard $(LOCAL_PATH)/src/core/android/*.c) \
@@ -53,11 +54,33 @@
LOCAL_SHARED_LIBRARIES := hidapi
LOCAL_CFLAGS += -DGL_GLEXT_PROTOTYPES
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -llog -landroid
LOCAL_CFLAGS += \
    -Wall -Wextra \
    -Wdocumentation \
    -Wdocumentation-unknown-command \
    -Wmissing-prototypes \
    -Wunreachable-code-break \
    -Wunneeded-internal-declaration \
    -Wmissing-variable-declarations \
    -Wfloat-conversion \
    -Wshorten-64-to-32 \
    -Wunreachable-code-return \
    -Wshift-sign-overflow \
    -Wstrict-prototypes \
    -Wkeyword-macro \
# Warnings we haven't fixed (yet)
LOCAL_CFLAGS += -Wno-unused-parameter -Wno-sign-compare
LOCAL_LDLIBS := -ldl -lGLESv1_CM -lGLESv2 -lOpenSLES -llog -landroid
ifeq ($(NDK_DEBUG),1)
    cmd-strip :=
endif
LOCAL_STATIC_LIBRARIES := cpufeatures
include $(BUILD_SHARED_LIBRARY)
@@ -108,3 +131,6 @@
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
$(call import-module,android/cpufeatures)
source/CMakeLists.txt
@@ -3,7 +3,7 @@
endif()
cmake_minimum_required(VERSION 2.8.11)
project(SDL2 C)
project(SDL2 C CXX)
# !!! FIXME: this should probably do "MACOSX_RPATH ON" as a target property
# !!! FIXME:  for the SDL2 shared library (so you get an
@@ -42,12 +42,12 @@
# set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
set(SDL_MAJOR_VERSION 2)
set(SDL_MINOR_VERSION 0)
set(SDL_MICRO_VERSION 9)
set(SDL_MICRO_VERSION 12)
set(SDL_INTERFACE_AGE 0)
set(SDL_BINARY_AGE 9)
set(SDL_BINARY_AGE 12)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
# the following should match the versions in Xcode project file:
set(DYLIB_CURRENT_VERSION 10.0.0)
set(DYLIB_CURRENT_VERSION 12.0.0)
set(DYLIB_COMPATIBILITY_VERSION 1.0.0)
# Set defaults preventing destination file conflicts
@@ -64,7 +64,7 @@
set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}")
message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")
#message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")
# General settings & flags
set(LIBRARY_OUTPUT_DIRECTORY "build")
@@ -118,6 +118,8 @@
    set(DARWIN TRUE)
  elseif(CMAKE_SYSTEM_NAME MATCHES ".*MacOS.*")
    set(MACOSX TRUE)
  elseif(CMAKE_SYSTEM_NAME MATCHES ".*tvOS.*")
    set(TVOS TRUE)
  endif()
  # TODO: iOS?
elseif(CMAKE_SYSTEM_NAME MATCHES "BeOS.*")
@@ -127,7 +129,7 @@
endif()
# Don't mistake osx for unix
if(UNIX AND NOT APPLE)
if(UNIX AND NOT APPLE AND NOT RISCOS)
  set(UNIX_SYS ON)
else()
  set(UNIX_SYS OFF)
@@ -153,6 +155,27 @@
endif()
if(UNIX OR MINGW OR MSYS)
  set(OPT_DEF_LIBC ON)
endif()
# The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
#  so we'll just use libusb when it's available. libusb does not support iOS,
#  so we default to yes on iOS.
#  TODO: Windows can support libusb, the hid.c file just depends on Unix APIs
if(WINDOWS OR IOS OR TVOS OR ANDROID)
  set(HIDAPI_SKIP_LIBUSB TRUE)
else()
  set(HIDAPI_SKIP_LIBUSB FALSE)
endif()
if (HIDAPI_SKIP_LIBUSB)
  set(OPT_DEF_HIDAPI ON)
endif()
# On the other hand, *BSD specifically uses libusb only, so we make a special
#  case just for them.
if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
  set(HIDAPI_ONLY_LIBUSB TRUE)
else()
  set(HIDAPI_ONLY_LIBUSB FALSE)
endif()
# Compiler info
@@ -264,8 +287,23 @@
  set(SDL_DLOPEN_ENABLED_BY_DEFAULT OFF)
endif()
# When defined, respect CMake's BUILD_SHARED_LIBS setting:
set(SDL_STATIC_ENABLED_BY_DEFAULT ON)
if (NOT DEFINED SDL_SHARED_ENABLED_BY_DEFAULT)
  # ...unless decided already (as for EMSCRIPTEN)
  set(SDL_SHARED_ENABLED_BY_DEFAULT OFF)
  if (NOT DEFINED BUILD_SHARED_LIBS)
    # No preference? Build both, just like the AC/AM configure
    set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
  elseif (BUILD_SHARED_LIBS)
    # In this case, we assume the user wants a shared lib and don't build
    # the static one
    set(SDL_SHARED_ENABLED_BY_DEFAULT ON)
    set(SDL_STATIC_ENABLED_BY_DEFAULT OFF)
  endif()
endif()
set(SDL_SUBSYSTEMS
@@ -291,6 +329,8 @@
set_option(SSE2                "Use SSE2 assembly routines" ${OPT_DEF_SSEMATH})
set_option(SSE3                "Use SSE3 assembly routines" ${OPT_DEF_SSEMATH})
set_option(ALTIVEC             "Use Altivec assembly routines" ${OPT_DEF_ASM})
set_option(ARMSIMD             "use SIMD assembly blitters on ARM" ON)
set_option(ARMNEON             "use NEON assembly blitters on ARM" ON)
set_option(DISKAUDIO           "Support the disk writer audio driver" ON)
set_option(DUMMYAUDIO          "Support the dummy audio driver" ON)
set_option(VIDEO_DIRECTFB      "Use DirectFB video driver" OFF)
@@ -301,7 +341,7 @@
set_option(PTHREADS            "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
dep_option(PTHREADS_SEM        "Use pthread semaphores" ON "PTHREADS" OFF)
set_option(SDL_DLOPEN          "Use dlopen for shared object loading" ${SDL_DLOPEN_ENABLED_BY_DEFAULT})
set_option(OSS                 "Support the OSS audio API" ${UNIX_SYS})
dep_option(OSS                 "Support the OSS audio API" ON "UNIX_SYS OR RISCOS" OFF)
set_option(ALSA                "Support the ALSA audio API" ${UNIX_SYS})
dep_option(ALSA_SHARED         "Dynamically load ALSA audio support" ON "ALSA" OFF)
set_option(JACK                "Support the JACK audio API" ${UNIX_SYS})
@@ -326,8 +366,6 @@
set_option(VIDEO_WAYLAND       "Use Wayland video driver" ${UNIX_SYS})
dep_option(WAYLAND_SHARED      "Dynamically load Wayland support" ON "VIDEO_WAYLAND" OFF)
dep_option(VIDEO_WAYLAND_QT_TOUCH  "QtWayland server support for Wayland video driver" ON "VIDEO_WAYLAND" OFF)
set_option(VIDEO_MIR           "Use Mir video driver" ${UNIX_SYS})
dep_option(MIR_SHARED          "Dynamically load Mir support" ON "VIDEO_MIR" OFF)
set_option(VIDEO_RPI           "Use Raspberry Pi video driver" ${UNIX_SYS})
dep_option(X11_SHARED          "Dynamically load X11 support" ON "VIDEO_X11" OFF)
set(SDL_X11_OPTIONS Xcursor Xinerama XInput Xrandr Xscrnsaver XShape Xvm)
@@ -339,15 +377,19 @@
set_option(DIRECTX             "Use DirectX for Windows audio/video" ${WINDOWS})
set_option(WASAPI              "Use the Windows WASAPI audio driver" ${WINDOWS})
set_option(RENDER_D3D          "Enable the Direct3D render driver" ${WINDOWS})
set_option(RENDER_METAL        "Enable the Metal render driver" ${APPLE})
set_option(VIDEO_VIVANTE       "Use Vivante EGL video driver" ${UNIX_SYS})
dep_option(VIDEO_VULKAN        "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF)
set_option(VIDEO_METAL         "Enable Metal support" ${APPLE})
set_option(VIDEO_KMSDRM        "Use KMS DRM video driver" ${UNIX_SYS})
dep_option(KMSDRM_SHARED       "Dynamically load KMS DRM support" ON "VIDEO_KMSDRM" OFF)
set_option(VIDEO_OFFSCREEN     "Use offscreen video driver" OFF)
option_string(BACKGROUNDING_SIGNAL "number to use for magic backgrounding signal or 'OFF'" "OFF")
option_string(FOREGROUNDING_SIGNAL "number to use for magic foregrounding signal or 'OFF'" "OFF")
set_option(HIDAPI              "Use HIDAPI for low level joystick drivers" ${OPT_DEF_HIDAPI})
# TODO: We should (should we?) respect cmake's ${BUILD_SHARED_LIBS} flag here
# The options below are for compatibility to configure's default behaviour.
set(SDL_SHARED ${SDL_SHARED_ENABLED_BY_DEFAULT} CACHE BOOL "Build a shared version of the library")
set(SDL_STATIC ON CACHE BOOL "Build a static version of the library")
set(SDL_STATIC ${SDL_STATIC_ENABLED_BY_DEFAULT} CACHE BOOL "Build a static version of the library")
dep_option(SDL_STATIC_PIC      "Static version of the library should be built with Position Independent Code" OFF "SDL_STATIC" OFF)
set_option(SDL_TEST            "Build the test directory" OFF)
@@ -386,6 +428,14 @@
endif()
set(HAVE_ASSERTIONS ${ASSERTIONS})
if(NOT BACKGROUNDING_SIGNAL STREQUAL "OFF")
  add_definitions("-DSDL_BACKGROUNDING_SIGNAL=${BACKGROUNDING_SIGNAL}")
endif()
if(NOT FOREGROUNDING_SIGNAL STREQUAL "OFF")
  add_definitions("-DSDL_FOREGROUNDING_SIGNAL=${FOREGROUNDING_SIGNAL}")
endif()
# Compiler option evaluation
if(USE_GCC OR USE_CLANG)
  # Check for -Wall first, so later things can override pieces of it.
@@ -395,6 +445,11 @@
    if(HAIKU)
      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-multichar")
    endif()
  endif()
  check_c_compiler_flag(-fno-strict-aliasing HAVE_GCC_NO_STRICT_ALIASING)
  if(HAVE_GCC_NO_STRICT_ALIASING)
    list(APPEND EXTRA_CFLAGS "-fno-strict-aliasing")
  endif()
  check_c_compiler_flag(-Wdeclaration-after-statement HAVE_GCC_WDECLARATION_AFTER_STATEMENT)
@@ -618,6 +673,61 @@
        endif()
      endif()
    endif()
    if(ARMSIMD)
      set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
      set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
      check_c_source_compiles("
        .text
        .arch armv6
        .object_arch armv4
        .arm
        .altmacro
        #ifndef __ARM_EABI__
        #error EABI is required (to be sure that calling conventions are compatible)
        #endif
        pld [r0]
        uqadd8 r0, r0, r0
      " ARMSIMD_FOUND)
      set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
      if(ARMSIMD_FOUND)
        set(HAVE_ARMSIMD TRUE)
        set(SDL_ARM_SIMD_BLITTERS 1)
        file(GLOB ARMSIMD_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-simd*.S)
        set(SOURCE_FILES ${SOURCE_FILES} ${ARMSIMD_SOURCES})
        set(WARN_ABOUT_ARM_SIMD_ASM_MIT TRUE)
      endif()
    endif()
    if(ARMNEON)
      set(ORIG_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
      set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x assembler-with-cpp")
      check_c_source_compiles("
        .text
        .fpu neon
        .arch armv7a
        .object_arch armv4
        .eabi_attribute 10, 0
        .arm
        .altmacro
        #ifndef __ARM_EABI__
        #error EABI is required (to be sure that calling conventions are compatible)
        #endif
        pld [r0]
        vmovn.u16 d0, q0
      " ARMNEON_FOUND)
      set(CMAKE_REQUIRED_FLAGS "${ORIG_CMAKE_REQUIRED_FLAGS}")
      if(ARMNEON_FOUND)
        set(HAVE_ARMNEON TRUE)
        set(SDL_ARM_NEON_BLITTERS 1)
        file(GLOB ARMNEON_SOURCES ${SDL2_SOURCE_DIR}/src/video/arm/pixman-arm-neon*.S)
        set(SOURCE_FILES ${SOURCE_FILES} ${ARMNEON_SOURCES})
        set(WARN_ABOUT_ARM_NEON_ASM_MIT TRUE)
      endif()
    endif()
  elseif(MSVC_VERSION GREATER 1500)
    # TODO: SDL_cpuinfo.h needs to support the user's configuration wish
    # for MSVC - right now it is always activated
@@ -650,10 +760,10 @@
    set(HAVE_SIGNAL_H 1)
    foreach(_FN
            malloc calloc realloc free qsort abs memset memcpy memmove memcmp
            wcslen wcscmp
            wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp
            strlen _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
            _ultoa strtol strtoul strtoll strtod atoi atof strcmp strncmp
            _stricmp _strnicmp sscanf
            _stricmp _strnicmp strtok_s sscanf
            acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf
            copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf
            log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
@@ -687,11 +797,12 @@
    foreach(_FN
            strtod malloc calloc realloc free getenv setenv putenv unsetenv
            qsort abs bcopy memset memcpy memmove memcmp strlen strlcpy strlcat
            _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa
            _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa
            _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull
            atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp
            vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
            nanosleep sysconf sysctlbyname getauxval poll
            wcscmp wcsdup wcslcat wcslcpy wcslen wcsncmp wcsstr
            sscanf vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp
            nanosleep sysconf sysctlbyname getauxval poll _Exit
            )
      string(TOUPPER ${_FN} _UPPER)
      set(_HAVEVAR "HAVE_${_UPPER}")
@@ -702,8 +813,10 @@
    if(HAVE_LIBM)
      set(CMAKE_REQUIRED_LIBRARIES m)
      foreach(_FN
              atan atan2 ceil copysign cos cosf fabs floor log pow scalbn sin
              sinf sqrt sqrtf tan tanf acos asin)
              atan atan2 atanf atan2f ceil ceilf copysign copysignf cos cosf
              exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f
              pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf acos acosf
              asin asinf)
        string(TOUPPER ${_FN} _UPPER)
        set(_HAVEVAR "HAVE_${_UPPER}")
        check_function_exists("${_FN}" ${_HAVEVAR})
@@ -763,7 +876,7 @@
  file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/*.c)
  set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
endif()
# TODO: in configure.in, the test for LOADSO and SDL_DLOPEN is a bit weird:
# TODO: in configure.ac, the test for LOADSO and SDL_DLOPEN is a bit weird:
# if LOADSO is not wanted, SDL_LOADSO_DISABLED is set
# If however on Unix or APPLE dlopen() is detected via CheckDLOPEN(),
# SDL_LOADSO_DISABLED will not be set, regardless of the LOADSO settings
@@ -800,8 +913,16 @@
    set(HAVE_VIDEO_DUMMY TRUE)
    set(HAVE_SDL_VIDEO TRUE)
  endif()
  if(VIDEO_OFFSCREEN)
    set(SDL_VIDEO_DRIVER_OFFSCREEN 1)
    file(GLOB VIDEO_OFFSCREEN_SOURCES ${SDL2_SOURCE_DIR}/src/video/offscreen/*.c)
    set(SOURCE_FILES ${SOURCE_FILES} ${VIDEO_OFFSCREEN_SOURCES})
    set(HAVE_VIDEO_OFFSCREEN TRUE)
    set(HAVE_SDL_VIDEO TRUE)
  endif()
endif()
# Platform-specific options and settings
if(ANDROID)
  file(GLOB ANDROID_CORE_SOURCES ${SDL2_SOURCE_DIR}/src/core/android/*.c)
  set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_CORE_SOURCES})
@@ -837,6 +958,7 @@
    set(HAVE_SDL_HAPTIC TRUE)
  endif()
  if(SDL_JOYSTICK)
    CheckHIDAPI()
    set(SDL_JOYSTICK_ANDROID 1)
    file(GLOB ANDROID_JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/android/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
    set(SOURCE_FILES ${SOURCE_FILES} ${ANDROID_JOYSTICK_SOURCES})
@@ -873,16 +995,24 @@
    set(HAVE_SDL_VIDEO TRUE)
    # Core stuff
    find_library(ANDROID_DL_LIBRARY dl)
    # find_library(ANDROID_DL_LIBRARY dl)
    # FIXME failing dlopen https://github.com/android-ndk/ndk/issues/929
    find_library(ANDROID_DL_LIBRARY NAMES libdl.so dl)
    find_library(ANDROID_LOG_LIBRARY log)
    find_library(ANDROID_LIBRARY_LIBRARY android)
    list(APPEND EXTRA_LIBS ${ANDROID_DL_LIBRARY} ${ANDROID_LOG_LIBRARY} ${ANDROID_LIBRARY_LIBRARY})
    add_definitions(-DGL_GLEXT_PROTOTYPES)
    if (HAVE_HIDAPI)
        list(APPEND EXTRA_LIBS hidapi)
    endif()
    #enable gles
    if(VIDEO_OPENGLES)
      set(SDL_VIDEO_OPENGL_EGL 1)
      set(HAVE_VIDEO_OPENGLES TRUE)
      set(SDL_VIDEO_OPENGL_ES 1)
      set(SDL_VIDEO_RENDER_OGL_ES 1)
      set(SDL_VIDEO_OPENGL_ES2 1)
      set(SDL_VIDEO_RENDER_OGL_ES2 1)
@@ -908,10 +1038,7 @@
  CheckPTHREAD()
endif()
# Platform-specific options and settings
if(EMSCRIPTEN)
elseif(EMSCRIPTEN)
  # Hide noisy warnings that intend to aid mostly during initial stages of porting a new
  # project. Uncomment at will for verbose cross-compiling -I/../ path info.
  add_definitions(-Wno-warn-absolute-paths)
@@ -963,7 +1090,8 @@
      set(SDL_VIDEO_RENDER_OGL_ES2 1)
    endif()
  endif()
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
  if(SDL_AUDIO)
    if(SYSV5 OR SOLARIS OR HPUX)
        set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
@@ -997,7 +1125,6 @@
    # Need to check for Raspberry PI first and add platform specific compiler flags, otherwise the test for GLES fails!
    CheckRPI()
    CheckX11()
    CheckMir()
    CheckDirectFB()
    CheckOpenGLX11()
    CheckOpenGLESX11()
@@ -1063,6 +1190,7 @@
        set(HAVE_IBUS_IBUS_H TRUE)
        include_directories(${IBUS_INCLUDE_DIRS})
        list(APPEND EXTRA_LIBS ${IBUS_LIBRARIES})
        add_definitions(-DSDL_USE_IME)
      endif()
      if(HAVE_LIBUNWIND_H)
        # We've already found the header, so REQUIRE the lib to be present
@@ -1086,7 +1214,10 @@
  endif()
  if(SDL_JOYSTICK)
    CheckUSBHID()   # seems to be BSD specific - limit the test to BSD only?
    if(FREEBSD OR NETBSD OR OPENBSD OR BSDI)
      CheckUSBHID()
    endif()
    CheckHIDAPI()
    if(LINUX AND NOT ANDROID)
      set(SDL_JOYSTICK_LINUX 1)
      file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/linux/*.c ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
@@ -1223,10 +1354,9 @@
    set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
  endif()
  # headers needed elsewhere ...
  # headers needed elsewhere
  check_include_file(mmdeviceapi.h HAVE_MMDEVICEAPI_H)
  check_include_file(audioclient.h HAVE_AUDIOCLIENT_H)
  check_include_file(endpointvolume.h HAVE_ENDPOINTVOLUME_H)
  if(SDL_AUDIO)
    set(SDL_AUDIO_DRIVER_WINMM 1)
@@ -1292,9 +1422,9 @@
  endif()
  # Libraries for Win32 native and MinGW
  list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 shell32)
  list(APPEND EXTRA_LIBS user32 gdi32 winmm imm32 ole32 oleaut32 version uuid advapi32 setupapi shell32)
  # TODO: in configure.in the check for timers is set on
  # TODO: in configure.ac the check for timers is set on
  # cygwin | mingw32* - does this include mingw32CE?
  if(SDL_TIMERS)
    set(SDL_TIMER_WINDOWS 1)
@@ -1330,6 +1460,11 @@
  endif()
  if(SDL_JOYSTICK)
    CheckHIDAPI()
    # TODO: Remove this hid.c block when SDL_hidapi.c is supported on Windows!
    if(HAVE_HIDAPI)
      set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/windows/hid.c)
    endif()
    file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/windows/*.c)
    set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
    if(HAVE_DINPUT_H)
@@ -1375,6 +1510,7 @@
    set(SDL_CFLAGS "${SDL_CFLAGS} -Dmain=SDL_main")
    list(APPEND SDL_LIBS "-lmingw32" "-lSDL2main" "-mwindows")
  endif()
elseif(APPLE)
  # TODO: rework this all for proper MacOS X, iOS and Darwin support
@@ -1382,10 +1518,11 @@
  # !!! FIXME: we need Carbon for some very old API calls in
  # !!! FIXME:  src/video/cocoa/SDL_cocoakeyboard.c, but we should figure out
  # !!! FIXME:  how to dump those.
  if(NOT IOS)
  if(DARWIN OR MACOSX)
    set(SDL_FRAMEWORK_COCOA 1)
    set(SDL_FRAMEWORK_CARBON 1)
  endif()
  set(SDL_FRAMEWORK_FOUNDATION 1)
  # Requires the darwin file implementation
  if(SDL_FILE)
@@ -1409,48 +1546,63 @@
    set(HAVE_SDL_AUDIO TRUE)
    set(SDL_FRAMEWORK_COREAUDIO 1)
    set(SDL_FRAMEWORK_AUDIOTOOLBOX 1)
    set(SDL_FRAMEWORK_AVFOUNDATION 1)
  endif()
  if(SDL_JOYSTICK)
    set(SDL_JOYSTICK_IOKIT 1)
    if (IOS)
    CheckHIDAPI()
    if(HAVE_HIDAPI)
      if(IOS OR TVOS)
        set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/ios/hid.m)
        set(SDL_FRAMEWORK_COREBLUETOOTH 1)
      endif()
    endif()
    if(IOS OR TVOS)
      file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/iphoneos/*.m ${SDL2_SOURCE_DIR}/src/joystick/steam/*.c)
      set(SDL_JOYSTICK_MFI 1)
      if(IOS)
        set(SDL_FRAMEWORK_COREMOTION 1)
      endif()
      set(SDL_FRAMEWORK_GAMECONTROLLER 1)
      set(HAVE_SDL_SENSORS 1)
    else()
      file(GLOB JOYSTICK_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/darwin/*.c)
      set(SDL_JOYSTICK_IOKIT 1)
      set(SDL_FRAMEWORK_IOKIT 1)
      set(SDL_FRAMEWORK_FF 1)
    endif()
    set(SOURCE_FILES ${SOURCE_FILES} ${JOYSTICK_SOURCES})
    set(HAVE_SDL_JOYSTICK TRUE)
    set(SDL_FRAMEWORK_IOKIT 1)
    set(SDL_FRAMEWORK_FF 1)
  endif()
  if(SDL_HAPTIC)
    set(SDL_HAPTIC_IOKIT 1)
    if (IOS)
    if (IOS OR TVOS)
      file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/dummy/*.c)
      set(SDL_HAPTIC_DUMMY 1)
    else()
      file(GLOB HAPTIC_SOURCES ${SDL2_SOURCE_DIR}/src/haptic/darwin/*.c)
      set(SDL_HAPTIC_IOKIT 1)
      set(SDL_FRAMEWORK_IOKIT 1)
      set(SDL_FRAMEWORK_FF 1)
    endif()
    set(SOURCE_FILES ${SOURCE_FILES} ${HAPTIC_SOURCES})
    set(HAVE_SDL_HAPTIC TRUE)
    set(SDL_FRAMEWORK_IOKIT 1)
    set(SDL_FRAMEWORK_FF 1)
    if(NOT SDL_JOYSTICK)
      message(FATAL_ERROR "SDL_HAPTIC requires SDL_JOYSTICK to be enabled")
    endif()
  endif()
  if(SDL_POWER)
    set(SDL_POWER_MACOSX 1)
    if (IOS)
    if (IOS OR TVOS)
      file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/uikit/*.m)
      set(SDL_POWER_UIKIT 1)
    else()
      file(GLOB POWER_SOURCES ${SDL2_SOURCE_DIR}/src/power/macosx/*.c)
      set(SDL_POWER_MACOSX 1)
      set(SDL_FRAMEWORK_IOKIT 1)
    endif()
    set(SOURCE_FILES ${SOURCE_FILES} ${POWER_SOURCES})
    set(HAVE_SDL_POWER TRUE)
    set(SDL_FRAMEWORK_IOKIT 1)
  endif()
  if(SDL_TIMERS)
@@ -1467,6 +1619,89 @@
    set_source_files_properties(${FILESYSTEM_SOURCES} PROPERTIES LANGUAGE C)
    set(SOURCE_FILES ${SOURCE_FILES} ${FILESYSTEM_SOURCES})
    set(HAVE_SDL_FILESYSTEM TRUE)
  endif()
  if(SDL_SENSOR)
    if(IOS)
      set(SDL_SENSOR_COREMOTION 1)
      set(HAVE_SDL_SENSORS TRUE)
      file(GLOB SENSOR_SOURCES ${SDL2_SOURCE_DIR}/src/sensor/coremotion/*.m)
      set(SOURCE_FILES ${SOURCE_FILES} ${SENSOR_SOURCES})
    endif()
  endif()
  # iOS hack needed - http://code.google.com/p/ios-cmake/ ?
  if(SDL_VIDEO)
    if (IOS OR TVOS)
      set(SDL_VIDEO_DRIVER_UIKIT 1)
      set(SDL_FRAMEWORK_COREGRAPHICS 1)
      set(SDL_FRAMEWORK_QUARTZCORE 1)
      set(SDL_FRAMEWORK_UIKIT 1)
      set(SDL_IPHONE_KEYBOARD 1)
      set(SDL_IPHONE_LAUNCHSCREEN 1)
      file(GLOB UIKITVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/uikit/*.m)
      set(SOURCE_FILES ${SOURCE_FILES} ${UIKITVIDEO_SOURCES})
    else()
      CheckCOCOA()
      if(VIDEO_OPENGL)
        set(SDL_VIDEO_OPENGL 1)
        set(SDL_VIDEO_OPENGL_CGL 1)
        set(SDL_VIDEO_RENDER_OGL 1)
        set(HAVE_VIDEO_OPENGL TRUE)
      endif()
    endif()
    if(VIDEO_OPENGLES)
      if(IOS OR TVOS)
        set(SDL_FRAMEWORK_OPENGLES 1)
        set(SDL_VIDEO_OPENGL_ES 1)
        set(SDL_VIDEO_RENDER_OGL_ES 1)
      else()
        set(SDL_VIDEO_OPENGL_EGL 1)
      endif()
      set(SDL_VIDEO_OPENGL_ES2 1)
      set(SDL_VIDEO_RENDER_OGL_ES2 1)
      set(HAVE_VIDEO_OPENGLES TRUE)
    endif()
    if(VIDEO_VULKAN OR VIDEO_METAL OR RENDER_METAL)
      set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
      set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -x objective-c")
      check_c_source_compiles("
        #include <AvailabilityMacros.h>
        #import <Metal/Metal.h>
        #import <QuartzCore/CAMetalLayer.h>
        #if TARGET_OS_SIMULATOR || (!TARGET_CPU_X86_64 && !TARGET_CPU_ARM64)
        #error Metal doesn't work on this configuration
        #endif
        int main()
        {
            return 0;
        }
        " HAVE_FRAMEWORK_METAL)
      set(CMAKE_REQUIRED_FLAGS ${ORIG_CMAKE_REQUIRED_FLAGS})
      if(HAVE_FRAMEWORK_METAL)
        set(SDL_FRAMEWORK_METAL 1)
        set(SDL_FRAMEWORK_QUARTZCORE 1)
      else()
        set(VIDEO_VULKAN 0)
        set(VIDEO_METAL 0)
        set(RENDER_METAL 0)
      endif()
    endif()
    if(VIDEO_METAL)
      set(SDL_VIDEO_METAL 1)
      set(HAVE_VIDEO_METAL TRUE)
    endif()
    if(RENDER_METAL)
      file(GLOB RENDER_METAL_SOURCES ${SDL2_SOURCE_DIR}/src/render/metal/*.m)
      set(SOURCE_FILES ${SOURCE_FILES} ${RENDER_METAL_SOURCES})
      set(SDL_VIDEO_RENDER_METAL 1)
      set(HAVE_RENDER_METAL TRUE)
    endif()
  endif()
  # Actually load the frameworks at the end so we don't duplicate include.
@@ -1498,32 +1733,57 @@
    find_library(AUDIOTOOLBOX AudioToolbox)
    list(APPEND EXTRA_LIBS ${AUDIOTOOLBOX})
  endif()
  # iOS hack needed - http://code.google.com/p/ios-cmake/ ?
  if(SDL_VIDEO)
    if (IOS)
      set(SDL_VIDEO_DRIVER_UIKIT 1)
      file(GLOB UIKITVIDEO_SOURCES ${SDL2_SOURCE_DIR}/src/video/uikit/*.m)
      set(SOURCE_FILES ${SOURCE_FILES} ${UIKITVIDEO_SOURCES})
  if(SDL_FRAMEWORK_AVFOUNDATION)
    find_library(AVFOUNDATION AVFoundation)
    list(APPEND EXTRA_LIBS ${AVFOUNDATION})
  endif()
  if(SDL_FRAMEWORK_COREBLUETOOTH)
    find_library(COREBLUETOOTH CoreBluetooth)
    list(APPEND EXTRA_LIBS ${COREBLUETOOTH})
  endif()
  if(SDL_FRAMEWORK_COREGRAPHICS)
    find_library(COREGRAPHICS CoreGraphics)
    list(APPEND EXTRA_LIBS ${COREGRAPHICS})
  endif()
  if(SDL_FRAMEWORK_COREMOTION)
    find_library(COREMOTION CoreMotion)
    list(APPEND EXTRA_LIBS ${COREMOTION})
  endif()
  if(SDL_FRAMEWORK_FOUNDATION)
    find_library(FOUNDATION Foundation)
    list(APPEND EXTRA_LIBS ${FOUNDATION})
  endif()
  if(SDL_FRAMEWORK_GAMECONTROLLER)
    find_library(GAMECONTROLLER GameController)
    list(APPEND EXTRA_LIBS ${GAMECONTROLLER})
  endif()
  if(SDL_FRAMEWORK_METAL)
    if(IOS OR TVOS)
      find_library(METAL Metal)
      list(APPEND EXTRA_LIBS ${METAL})
    else()
      CheckCOCOA()
      if(VIDEO_OPENGL)
        set(SDL_VIDEO_OPENGL 1)
        set(SDL_VIDEO_OPENGL_CGL 1)
        set(SDL_VIDEO_RENDER_OGL 1)
        set(HAVE_VIDEO_OPENGL TRUE)
      endif()
      if(VIDEO_OPENGLES)
        set(SDL_VIDEO_OPENGL_EGL 1)
        set(SDL_VIDEO_OPENGL_ES2 1)
        set(SDL_VIDEO_RENDER_OGL_ES2 1)
        set(HAVE_VIDEO_OPENGLES TRUE)
      endif()
      list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,Metal")
    endif()
  endif()
  if(SDL_FRAMEWORK_OPENGLES)
    find_library(OPENGLES OpenGLES)
    list(APPEND EXTRA_LIBS ${OPENGLES})
  endif()
  if(SDL_FRAMEWORK_QUARTZCORE)
    if(IOS OR TVOS)
      find_library(QUARTZCORE QuartzCore)
      list(APPEND EXTRA_LIBS ${QUARTZCORE})
    else()
      list(APPEND EXTRA_LDFLAGS "-Wl,-weak_framework,QuartzCore")
    endif()
  endif()
  if(SDL_FRAMEWORK_UIKIT)
    find_library(UIKIT UIKit)
    list(APPEND EXTRA_LIBS ${UIKIT})
  endif()
  CheckPTHREAD()
elseif(HAIKU)
  if(SDL_VIDEO)
    set(SDL_VIDEO_DRIVER_HAIKU 1)
@@ -1554,6 +1814,24 @@
  endif()
  CheckPTHREAD()
elseif(RISCOS)
  if(SDL_TIMERS)
    set(SDL_TIMER_UNIX 1)
    file(GLOB TIMER_SOURCES ${SDL2_SOURCE_DIR}/src/timer/unix/*.c)
    set(SOURCE_FILES ${SOURCE_FILES} ${TIMER_SOURCES})
    set(HAVE_SDL_TIMERS TRUE)
    if(CLOCK_GETTIME)
      set(HAVE_CLOCK_GETTIME 1)
    endif()
  endif()
  CheckPTHREAD()
  if(SDL_AUDIO)
    CheckOSS()
  endif()
endif()
if(VIDEO_VULKAN)
@@ -1562,7 +1840,7 @@
endif()
# Dummies
# configure.in does it differently:
# configure.ac does it differently:
# if not have X
#   if enable_X {  SDL_X_DISABLED = 1 }
#   [add dummy sources]
@@ -1727,15 +2005,37 @@
  message(STATUS "")
endif()
if(WARN_ABOUT_ARM_SIMD_ASM_MIT)
  message(STATUS "")
  message(STATUS "SDL is being built with ARM SIMD optimizations, which")
  message(STATUS "uses code licensed under the MIT license. If this is a")
  message(STATUS "problem, please disable that code by rerunning CMake with:")
  message(STATUS "")
  message(STATUS "    -DARMSIMD=OFF")
endif()
if(WARN_ABOUT_ARM_NEON_ASM_MIT)
  message(STATUS "")
  message(STATUS "SDL is being built with ARM NEON optimizations, which")
  message(STATUS "uses code licensed under the MIT license. If this is a")
  message(STATUS "problem, please disable that code by rerunning CMake with:")
  message(STATUS "")
  message(STATUS "    -DARMNEON=OFF")
endif()
# Ensure that the extra cflags are used at compile time
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS}")
# Always build SDLmain
add_library(SDL2main STATIC ${SDLMAIN_SOURCES})
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
target_include_directories(SDL2main PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
set(_INSTALL_LIBS "SDL2main")
if (NOT ANDROID)
  set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
  set_target_properties(SDL2main PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
endif()
if (ANDROID AND HAVE_HIDAPI)
  set(_INSTALL_LIBS ${_INSTALL_LIBS} "hidapi")
endif()
if(SDL_SHARED)
@@ -1763,9 +2063,29 @@
  endif()
  set(_INSTALL_LIBS "SDL2" ${_INSTALL_LIBS})
  target_link_libraries(SDL2 ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
  target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
  target_include_directories(SDL2 PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
  if (NOT ANDROID)
    set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
    set_target_properties(SDL2 PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
  endif()
  if(IOS OR TVOS)
    set_property(TARGET SDL2 APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")
    target_compile_definitions(SDL2 PRIVATE IOS_DYLIB=1)
  endif()
endif()
if(ANDROID)
  if(HAVE_HIDAPI)
    add_library(hidapi SHARED ${SDL2_SOURCE_DIR}/src/hidapi/android/hid.cpp)
  endif()
  if(MSVC AND NOT LIBC)
    # Don't try to link with the default set of libraries.
    set_target_properties(hidapi PROPERTIES LINK_FLAGS_RELEASE "/NODEFAULTLIB")
    set_target_properties(hidapi PROPERTIES LINK_FLAGS_DEBUG "/NODEFAULTLIB")
    set_target_properties(hidapi PROPERTIES STATIC_LIBRARY_FLAGS "/NODEFAULTLIB")
  endif()
  if(HAVE_HIDAPI)
    target_link_libraries(hidapi log)
  endif()
endif()
@@ -1789,9 +2109,12 @@
  # libraries - do we need to consider this?
  set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
  target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
  target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
  target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include> $<INSTALL_INTERFACE:include/SDL2>)
  if (NOT ANDROID)
    set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX ${SDL_CMAKE_DEBUG_POSTFIX})
    set_target_properties(SDL2-static PROPERTIES DEBUG_POSTFIX "${SDL_CMAKE_DEBUG_POSTFIX}")
  endif()
  if(IOS OR TVOS)
    set_property(TARGET SDL2-static APPEND_STRING PROPERTY COMPILE_FLAGS "-fobjc-arc")
  endif()
endif()
@@ -1811,12 +2134,10 @@
  RUNTIME DESTINATION bin)
##### Export files #####
if (APPLE)
  set(PKG_PREFIX "SDL2.framework/Resources")
elseif (WINDOWS)
if (WINDOWS)
  set(PKG_PREFIX "cmake")
else ()
  set(PKG_PREFIX "lib/cmake/SDL2")
  set(PKG_PREFIX "lib${LIB_SUFFIX}/cmake/SDL2")
endif ()
include(CMakePackageConfigHelpers)
@@ -1861,8 +2182,8 @@
    if(NOT ANDROID)
        install(CODE "
          execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
            \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\")"
            WORKING_DIR "${SDL2_BINARY_DIR}")
            \"lib${SONAME}${SOPOSTFIX}${SOEXT}\" \"libSDL2${SOPOSTFIX}${SOEXT}\"
            WORKING_DIRECTORY \"${SDL2_BINARY_DIR}\")")
        install(FILES ${SDL2_BINARY_DIR}/libSDL2${SOPOSTFIX}${SOEXT} DESTINATION "lib${LIB_SUFFIX}")
    endif()
  endif()
source/COPYING.txt
@@ -1,6 +1,6 @@
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  
This software is provided 'as-is', without any express or implied
warranty.  In no event will the authors be held liable for any damages
source/Makefile.in
@@ -44,7 +44,9 @@
WAYLAND_SCANNER = @WAYLAND_SCANNER@
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.in debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
GEN_DIST = SDL2.spec
ifneq ($V,1)
@@ -82,6 +84,7 @@
    SDL_log.h \
    SDL_main.h \
    SDL_messagebox.h \
    SDL_metal.h \
    SDL_mouse.h \
    SDL_mutex.h \
    SDL_name.h \
@@ -125,9 +128,9 @@
LT_REVISION = @LT_REVISION@
LT_LDFLAGS  = -no-undefined -rpath $(libdir) -release $(LT_RELEASE) -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE)
all: $(srcdir)/configure Makefile $(objects) $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
all: $(srcdir)/configure Makefile $(objects)/$(TARGET) $(objects)/$(SDLMAIN_TARGET) $(objects)/$(SDLTEST_TARGET)
$(srcdir)/configure: $(srcdir)/configure.in
$(srcdir)/configure: $(srcdir)/configure.ac
    @echo "Warning, configure is out of date, please re-run autogen.sh"
Makefile: $(srcdir)/Makefile.in
@@ -135,8 +138,9 @@
Makefile.in:;
$(objects):
    $(SHELL) $(auxdir)/mkinstalldirs $@
$(objects)/.created:
    $(SHELL) $(auxdir)/mkinstalldirs $(objects)
    touch $@
update-revision:
    $(SHELL) $(auxdir)/updaterev.sh
@@ -154,8 +158,11 @@
install: all install-bin install-hdrs install-lib install-data
install-bin:
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
    $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(bindir)
    $(INSTALL) -m 755 sdl2-config $(DESTDIR)$(bindir)/sdl2-config
endif
install-hdrs: update-revision
    $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(includedir)/SDL2
    for file in $(HDRS) $(SDLTEST_HDRS); do \
@@ -178,8 +185,11 @@
    $(INSTALL) -m 644 $(srcdir)/sdl2.m4 $(DESTDIR)$(datadir)/aclocal/sdl2.m4
    $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/pkgconfig
    $(INSTALL) -m 644 sdl2.pc $(DESTDIR)$(libdir)/pkgconfig
ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
    $(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
    $(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
    $(INSTALL) -m 644 sdl2-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL2
endif
uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
uninstall-bin:
@@ -199,6 +209,7 @@
    rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
    rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
    rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
    rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
clean:
    rm -rf $(objects)
source/Makefile.os2
@@ -1,8 +1,8 @@
# Open Watcom makefile to build SDL2.dll for OS/2:
# Open Watcom makefile to build SDL2.dll for OS/2
# wmake -f Makefile.os2
LIBNAME = SDL2
VERSION = 2.0.9
VERSION = 2.0.12
DESCRIPTION = Simple DirectMedia Layer 2
LIBHOME = .
@@ -15,7 +15,8 @@
INCPATH+= -I"$(LIBHOME)/h"
INCPATH+= -Iinclude
LIBS = mmpm2.lib libuls.lib libconv.lib
LIBM = libm.lib
LIBS = mmpm2.lib libuls.lib libconv.lib $(LIBM)
CFLAGS = -bt=os2 -d0 -q -bm -5s -fp5 -fpi87 -sg -oteanbmier -ei
# max warnings:
@@ -24,11 +25,15 @@
CFLAGS+= -bd
# the include paths :
CFLAGS+= $(INCPATH)
# building SDL itself:
# building SDL itself (for DECLSPEC):
CFLAGS+= -DBUILD_SDL
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
SRCS = SDL.c SDL_assert.c SDL_error.c SDL_log.c SDL_dataqueue.c SDL_hints.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c
SRCS+= SDL_getenv.c SDL_iconv.c SDL_malloc.c SDL_qsort.c SDL_stdlib.c SDL_string.c SDL_strtokr.c
SRCS+= SDL_cpuinfo.c SDL_atomic.c SDL_spinlock.c SDL_thread.c SDL_timer.c
SRCS+= SDL_rwops.c SDL_power.c
SRCS+= SDL_audio.c SDL_audiocvt.c SDL_audiodev.c SDL_audiotypecvt.c SDL_mixer.c SDL_wave.c
@@ -56,6 +61,7 @@
SRCS+= SDL_dynapi.c
OBJS = $(SRCS:.c=.obj)
MOBJS= $(MSRCS:.c=.obj)
.extensions:
.extensions: .lib .dll .obj .c .asm
@@ -66,7 +72,7 @@
all: $(DLLFILE) $(LIBFILE) .symbolic
$(DLLFILE): $(OBJS) $(LNKFILE)
$(DLLFILE): $(OBJS) $(LIBM) $(LNKFILE)
    @echo * Linking: $@
    wlink @$(LNKFILE)
@@ -83,6 +89,9 @@
SDL_rwops.obj: SDL_rwops.c
    wcc386 $(CFLAGS) -wcd=136 -fo=$^@ $<
SDL_wave.obj: SDL_wave.c
    wcc386 $(CFLAGS) -wcd=124 -fo=$^@ $<
SDL_blendfillrect.obj: SDL_blendfillrect.c
    wcc386 $(CFLAGS) -wcd=200 -fo=$^@ $<
@@ -94,6 +103,10 @@
SDL_RLEaccel.obj: SDL_RLEaccel.c
    wcc386 $(CFLAGS) -wcd=201 -fo=$^@ $<
.c: ./src/libm;
$(LIBM): $(MOBJS)
    wlib -q -b -n -c -pa -s -t -zld -ii -io $@ $(MOBJS)
$(LNKFILE):
    @echo * Creating linker file: $@
@@ -118,6 +131,7 @@
    @if exist *.obj rm *.obj
    @if exist *.err rm *.err
    @if exist $(LNKFILE) rm $(LNKFILE)
    @if exist $(LIBM) rm $(LIBM)
distclean: .SYMBOLIC clean
    @if exist $(LIBHOME)/*.exp rm $(LIBHOME)/*.exp
source/Makefile.psp
@@ -50,6 +50,7 @@
      src/stdlib/SDL_qsort.o \
      src/stdlib/SDL_stdlib.o \
      src/stdlib/SDL_string.o \
      src/stdlib/SDL_strtokr.o \
      src/thread/SDL_thread.o \
      src/thread/generic/SDL_systls.o \
      src/thread/psp/SDL_syssem.o \
@@ -78,7 +79,7 @@
      src/video/psp/SDL_pspevents.o \
      src/video/psp/SDL_pspvideo.o \
      src/video/psp/SDL_pspgl.o \
      src/video/psp/SDL_pspmouse.o \
      src/video/psp/SDL_pspmouse.o
INCDIR = ./include
CFLAGS = -g -O2 -G0 -Wall -D__PSP__ -DHAVE_OPENGL
source/SDL2.spec.in
@@ -74,7 +74,8 @@
%{_libdir}/lib*.la
%{_libdir}/lib*.%{__soext}
%{_includedir}/*/*.h
%{_libdir}/pkgconfig/*
%{_libdir}/cmake/*
%{_libdir}/pkgconfig/SDL2/*
%{_datadir}/aclocal/*
%changelog
source/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj
@@ -285,6 +285,7 @@
    <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_string.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
    <ClCompile Include="..\..\src\thread\generic\SDL_syssem.c" />
    <ClCompile Include="..\..\src\thread\SDL_thread.c" />
    <ClCompile Include="..\..\src\thread\stdcpp\SDL_syscond.cpp" />
source/VisualC-WinRT/UWP_VS2015/SDL-UWP.vcxproj.filters
@@ -626,6 +626,9 @@
    <ClCompile Include="..\..\src\stdlib\SDL_string.c">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\src\thread\generic\SDL_syssem.c">
      <Filter>Source Files</Filter>
    </ClCompile>
source/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj
@@ -251,6 +251,7 @@
    <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_string.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
    <ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
    <ClCompile Include="..\..\src\thread\SDL_thread.c" />
    <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
source/VisualC-WinRT/WinPhone81_VS2013/SDL-WinPhone81.vcxproj.filters
@@ -593,6 +593,9 @@
    <ClCompile Include="..\..\src\stdlib\SDL_string.c">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\src\thread\SDL_thread.c">
      <Filter>Source Files</Filter>
    </ClCompile>
source/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj
@@ -283,6 +283,7 @@
    <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_string.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
    <ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
    <ClCompile Include="..\..\src\thread\SDL_thread.c" />
    <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
source/VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj.filters
@@ -611,6 +611,9 @@
    <ClCompile Include="..\..\src\stdlib\SDL_string.c">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\src\stdlib\SDL_strtokr.c">
      <Filter>Source Files</Filter>
    </ClCompile>
    <ClCompile Include="..\..\src\thread\SDL_thread.c">
      <Filter>Source Files</Filter>
    </ClCompile>
source/VisualC/SDL/SDL.vcxproj
@@ -80,18 +80,6 @@
    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
    <LibraryPath Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">C:\Program Files %28x86%29\Microsoft DirectX SDK %28June 2010%29\Lib\x86;$(LibraryPath)</LibraryPath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
    <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
    <IncludePath>D:\dev\steam\rel\streaming_client\SDL\src\hidapi\hidapi;$(IncludePath)</IncludePath>
  </PropertyGroup>
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
    <PreBuildEvent>
      <Command>
@@ -142,7 +130,6 @@
      <PreprocessorDefinitions>_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <BufferSecurityCheck>false</BufferSecurityCheck>
      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>OldStyle</DebugInformationFormat>
      <OmitDefaultLibName>true</OmitDefaultLibName>
@@ -208,7 +195,6 @@
      <PreprocessorDefinitions>NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <BufferSecurityCheck>false</BufferSecurityCheck>
      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
      <OmitDefaultLibName>true</OmitDefaultLibName>
@@ -332,7 +318,7 @@
    <ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
    <ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
    <ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
    <ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
    <ClInclude Include="..\..\src\joystick\controller_type.h" />
    <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
    <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
    <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
@@ -433,9 +419,12 @@
    <ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
    <ClCompile Include="..\..\src\hidapi\windows\hid.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
    <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
    <ClCompile Include="..\..\src\joystick\SDL_joystick.c" />
@@ -498,6 +487,7 @@
    <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_string.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
    <ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
    <ClCompile Include="..\..\src\thread\SDL_thread.c" />
    <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
@@ -551,4 +541,4 @@
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets">
  </ImportGroup>
</Project>
</Project>
source/VisualC/SDL/SDL.vcxproj.filters
@@ -259,7 +259,7 @@
    <ClInclude Include="..\..\src\haptic\windows\SDL_dinputhaptic_c.h" />
    <ClInclude Include="..\..\src\haptic\windows\SDL_windowshaptic_c.h" />
    <ClInclude Include="..\..\src\haptic\windows\SDL_xinputhaptic_c.h" />
    <ClInclude Include="..\..\src\joystick\hidapi\controller_type.h" />
    <ClInclude Include="..\..\src\joystick\controller_type.h" />
    <ClInclude Include="..\..\src\joystick\hidapi\SDL_hidapijoystick_c.h" />
    <ClInclude Include="..\..\src\joystick\SDL_joystick_c.h" />
    <ClInclude Include="..\..\src\joystick\SDL_sysjoystick.h" />
@@ -360,9 +360,12 @@
    <ClCompile Include="..\..\src\haptic\windows\SDL_windowshaptic.c" />
    <ClCompile Include="..\..\src\haptic\windows\SDL_xinputhaptic.c" />
    <ClCompile Include="..\..\src\hidapi\windows\hid.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_gamecube.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_ps4.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_rumble.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_switch.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xbox360w.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapi_xboxone.c" />
    <ClCompile Include="..\..\src\joystick\hidapi\SDL_hidapijoystick.c" />
    <ClCompile Include="..\..\src\joystick\SDL_gamecontroller.c" />
@@ -426,6 +429,7 @@
    <ClCompile Include="..\..\src\stdlib\SDL_qsort.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_stdlib.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_string.c" />
    <ClCompile Include="..\..\src\stdlib\SDL_strtokr.c" />
    <ClCompile Include="..\..\src\thread\generic\SDL_syscond.c" />
    <ClCompile Include="..\..\src\thread\SDL_thread.c" />
    <ClCompile Include="..\..\src\thread\windows\SDL_sysmutex.c" />
source/VisualC/SDLmain/SDLmain.vcxproj
@@ -108,7 +108,6 @@
      <StringPooling>true</StringPooling>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <BufferSecurityCheck>false</BufferSecurityCheck>
      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>OldStyle</DebugInformationFormat>
      <OmitDefaultLibName>true</OmitDefaultLibName>
@@ -143,7 +142,6 @@
      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <BufferSecurityCheck>false</BufferSecurityCheck>
      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>OldStyle</DebugInformationFormat>
      <OmitDefaultLibName>true</OmitDefaultLibName>
source/VisualC/SDLtest/SDLtest.vcxproj
@@ -108,7 +108,6 @@
      <StringPooling>true</StringPooling>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <BufferSecurityCheck>false</BufferSecurityCheck>
      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>OldStyle</DebugInformationFormat>
      <OmitDefaultLibName>true</OmitDefaultLibName>
@@ -143,7 +142,6 @@
      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
      <BufferSecurityCheck>false</BufferSecurityCheck>
      <EnableEnhancedInstructionSet>StreamingSIMDExtensions</EnableEnhancedInstructionSet>
      <WarningLevel>Level3</WarningLevel>
      <DebugInformationFormat>OldStyle</DebugInformationFormat>
      <OmitDefaultLibName>true</OmitDefaultLibName>
source/VisualC/tests/testgesture/testgesture.vcxproj
@@ -189,6 +189,12 @@
      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
    </ProjectReference>
    <ProjectReference Include="..\..\SDLtest\SDLtest.vcxproj">
      <Project>{da956fd3-e143-46f2-9fe5-c77bebc56b1a}</Project>
      <Private>false</Private>
      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
      <ReferenceOutputAssembly>true</ReferenceOutputAssembly>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="..\..\..\test\testgesture.c" />
source/VisualC/visualtest/unittest/testquit/testquit_VS2012.vcxproj
old mode 100755 new mode 100644
source/VisualC/visualtest/visualtest_VS2012.vcxproj
old mode 100755 new mode 100644
source/WhatsNew.txt
@@ -2,6 +2,101 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
2.0.12:
---------------------------------------------------------------------------
General:
* Added SDL_GetTextureScaleMode() and SDL_SetTextureScaleMode() to get and set the scaling mode used for a texture
* Added SDL_LockTextureToSurface(), similar to SDL_LockTexture() but the locked area is exposed as a SDL surface.
* Added new blend mode, SDL_BLENDMODE_MUL, which does a modulate and blend operation
* Added the hint SDL_HINT_DISPLAY_USABLE_BOUNDS to override the results of SDL_GetDisplayUsableBounds() for display index 0.
* Added the window underneath the finger to the SDL_TouchFingerEvent
* Added SDL_GameControllerTypeForIndex(), SDL_GameControllerGetType() to return the type of a game controller (Xbox 360, Xbox One, PS3, PS4, or Nintendo Switch Pro)
* Added the hint SDL_HINT_GAMECONTROLLERTYPE to override the automatic game controller type detection
* Added SDL_JoystickFromPlayerIndex() and SDL_GameControllerFromPlayerIndex() to get the device associated with a player index
* Added SDL_JoystickSetPlayerIndex() and SDL_GameControllerSetPlayerIndex() to set the player index associated with a device
* Added the hint SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS to specify whether Nintendo Switch Pro controllers should use the buttons as labeled or swapped to match positional layout. The default is to use the buttons as labeled.
* Added support for Nintendo GameCube controllers to the HIDAPI driver, and a hint SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE to control whether this is used.
* Improved support for Xbox 360 and Xbox One controllers when using the HIDAPI driver
* Added support for many game controllers, including:
    * 8BitDo FC30 Pro
    * 8BitDo M30 GamePad
    * BDA PS4 Fightpad
    * HORI Fighting Commander
    * Hyperkin Duke
    * Hyperkin X91
    * MOGA XP5-A Plus
    * NACON GC-400ES
    * NVIDIA Controller v01.04
    * PDP Versus Fighting Pad
    * Razer Raion Fightpad for PS4
    * Razer Serval
    * Stadia Controller
    * SteelSeries Stratus Duo
    * Victrix Pro Fight Stick for PS4
    * Xbox One Elite Series 2
* Fixed blocking game controller rumble calls when using the HIDAPI driver
* Added SDL_zeroa() macro to zero an array of elements
* Added SDL_HasARMSIMD() which returns true if the CPU has ARM SIMD (ARMv6+) features
Windows:
* Fixed crash when using the release SDL DLL with applications built with gcc
* Fixed performance regression in event handling introduced in 2.0.10
* Added support for SDL_SetThreadPriority() for UWP applications
Linux:
* Added the hint SDL_HINT_VIDEO_X11_WINDOW_VISUALID to specify the visual chosen for new X11 windows
* Added the hint SDL_HINT_VIDEO_X11_FORCE_EGL to specify whether X11 should use GLX or EGL by default
iOS / tvOS / macOS:
* Added SDL_Metal_CreateView() and SDL_Metal_DestroyView() to create CAMetalLayer-backed NSView/UIView and attach it to the specified window.
iOS/ tvOS:
* Added support for Bluetooth Steam Controllers as game controllers
tvOS:
* Fixed support for surround sound on Apple TV
Android:
* Added SDL_GetAndroidSDKVersion() to return the API level of the current device
* Added support for audio capture using OpenSL-ES
* Added support for Bluetooth Steam Controllers as game controllers
* Fixed rare crashes when the app goes into the background or terminates
---------------------------------------------------------------------------
2.0.10:
---------------------------------------------------------------------------
General:
* The SDL_RW* macros have been turned into functions that are available only in 2.0.10 and onward
* Added SDL_SIMDGetAlignment(), SDL_SIMDAlloc(), and SDL_SIMDFree(), to allocate memory aligned for SIMD operations for the current CPU
* Added SDL_RenderDrawPointF(), SDL_RenderDrawPointsF(), SDL_RenderDrawLineF(), SDL_RenderDrawLinesF(), SDL_RenderDrawRectF(), SDL_RenderDrawRectsF(), SDL_RenderFillRectF(), SDL_RenderFillRectsF(), SDL_RenderCopyF(), SDL_RenderCopyExF(), to allow floating point precision in the SDL rendering API.
* Added SDL_GetTouchDeviceType() to get the type of a touch device, which can be a touch screen or a trackpad in relative or absolute coordinate mode.
* The SDL rendering API now uses batched rendering by default, for improved performance
* Added SDL_RenderFlush() to force batched render commands to execute, if you're going to mix SDL rendering with native rendering
* Added the hint SDL_HINT_RENDER_BATCHING to control whether batching should be used for the rendering API. This defaults to "1" if you don't specify what rendering driver to use when creating the renderer.
* Added the hint SDL_HINT_EVENT_LOGGING to enable logging of SDL events for debugging purposes
* Added the hint SDL_HINT_GAMECONTROLLERCONFIG_FILE to specify a file that will be loaded at joystick initialization with game controller bindings
* Added the hint SDL_HINT_MOUSE_TOUCH_EVENTS to control whether SDL will synthesize touch events from mouse events
* Improved handling of malformed WAVE and BMP files, fixing potential security exploits
Linux:
* Removed the Mir video driver in favor of Wayland
iOS / tvOS:
* Added support for Xbox and PS4 wireless controllers in iOS 13 and tvOS 13
* Added support for text input using Bluetooth keyboards
Android:
* Added low latency audio using OpenSL ES
* Removed SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH (replaced by SDL_HINT_MOUSE_TOUCH_EVENTS and SDL_HINT_TOUCH_MOUSE_EVENTS)
  SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=1, should be replaced by setting both previous hints to 0.
  SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH=0, should be replaced by setting both previous hints to 1.
* Added the hint SDL_HINT_ANDROID_BLOCK_ON_PAUSE to set whether the event loop will block itself when the app is paused.
---------------------------------------------------------------------------
2.0.9:
---------------------------------------------------------------------------
source/Xcode-iOS/Demos/Demos.xcodeproj/project.pbxproj
@@ -10,6 +10,13 @@
        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 */; };
        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 */; };
        FA30DEB11BBF5A93009C397F /* happy.c in Sources */ = {isa = PBXBuildFile; fileRef = FD77A0080E26BC0500F39101 /* happy.c */; };
        FA30DEB31BBF5AD7009C397F /* icon.bmp in Resources */ = {isa = PBXBuildFile; fileRef = FDB651CC0E43D19800F688B5 /* icon.bmp */; };
@@ -40,7 +47,6 @@
        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 */; };
        FABA34D81D8B5E7700915323 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FABA34D71D8B5E7700915323 /* 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 */; };
@@ -197,6 +203,34 @@
            remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
            remoteInfo = libSDL;
        };
        F3F758F722AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
            proxyType = 2;
            remoteGlobalIDString = 52ED1E5C222889500061FCE0;
            remoteInfo = "libSDL-iOS-dylib";
        };
        F3F758F922AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
            proxyType = 2;
            remoteGlobalIDString = F3E3C7572241389A007D243C;
            remoteInfo = "libSDL-tvOS-dylib";
        };
        F3F758FB22AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
            proxyType = 2;
            remoteGlobalIDString = F3E3C65222406928007D243C;
            remoteInfo = "libSDLmain-iOS";
        };
        F3F758FD22AC5E8F001D97F2 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
            proxyType = 2;
            remoteGlobalIDString = F3E3C75F224138AE007D243C;
            remoteInfo = "libSDLmain-tvOS";
        };
        FA30DEAB1BBF59D9009C397F /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48920E313154007AB34E /* SDL.xcodeproj */;
@@ -226,6 +260,7 @@
        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>"; };
        F3F758FF22AC5EC7001D97F2 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
        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>"; };
        FA8B4BA21967070A00F8EB7C /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
@@ -271,17 +306,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */,
                FD1B48DD0E313255007AB34E /* libSDL2.a in Frameworks */,
                FAE0E96A1BAF96A00098DFA4 /* GameController.framework in Frameworks */,
                FA8B4BA31967070A00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */,
                FDF0D7AC0E12D53800247964 /* AudioToolbox.framework in Frameworks */,
                1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
                1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
                FABA34D41D8B5E5600915323 /* AVFoundation.framework in Frameworks */,
                FDF0D7AB0E12D53800247964 /* CoreAudio.framework in Frameworks */,
                1D3623EC0D0F72F000981E51 /* CoreGraphics.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;
        };
@@ -289,16 +325,15 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34D81D8B5E7700915323 /* AVFoundation.framework in Frameworks */,
                FA30DEB71BBF5BB8009C397F /* libSDL2.a in Frameworks */,
                FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */,
                FA30DEC91BBF5C14009C397F /* AudioToolbox.framework in Frameworks */,
                FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */,
                FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */,
                FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */,
                FA30DEC81BBF5C14009C397F /* GameController.framework in Frameworks */,
                FA30DECA1BBF5C14009C397F /* QuartzCore.framework in Frameworks */,
                FA30DECB1BBF5C14009C397F /* OpenGLES.framework in Frameworks */,
                FA30DECC1BBF5C14009C397F /* CoreGraphics.framework in Frameworks */,
                FA30DECD1BBF5C14009C397F /* UIKit.framework in Frameworks */,
                FA30DECE1BBF5C14009C397F /* Foundation.framework in Frameworks */,
                FA30DECF1BBF5C14009C397F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -306,17 +341,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */,
                FD1B49980E313261007AB34E /* libSDL2.a in Frameworks */,
                FAE0E96C1BAF96A90098DFA4 /* GameController.framework in Frameworks */,
                FA8B4BA41967071300F8EB7C /* CoreMotion.framework in Frameworks */,
                FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */,
                FDF0D7AA0E12D53500247964 /* AudioToolbox.framework in Frameworks */,
                FD15FD690E086911003BDF25 /* Foundation.framework in Frameworks */,
                FD15FD6A0E086911003BDF25 /* UIKit.framework in Frameworks */,
                FABA34D61D8B5E5A00915323 /* AVFoundation.framework in Frameworks */,
                FDF0D7A90E12D53500247964 /* CoreAudio.framework in Frameworks */,
                FD15FD6B0E086911003BDF25 /* CoreGraphics.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;
        };
@@ -324,17 +360,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */,
                FD1B499C0E313269007AB34E /* libSDL2.a in Frameworks */,
                FAE0E96D1BAF96AF0098DFA4 /* GameController.framework in Frameworks */,
                FA8B4BA51967071A00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */,
                FDF0D7A80E12D53200247964 /* AudioToolbox.framework in Frameworks */,
                FABA34D91D8B5E7B00915323 /* AVFoundation.framework in Frameworks */,
                FDF0D7A70E12D53200247964 /* CoreAudio.framework in Frameworks */,
                FD5F9CEA0E0E0741008E885B /* CoreGraphics.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 */,
                FD5F9CE80E0E0741008E885B /* Foundation.framework in Frameworks */,
                FD5F9CE90E0E0741008E885B /* UIKit.framework in Frameworks */,
                FD5F9CEA0E0E0741008E885B /* CoreGraphics.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -342,17 +379,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */,
                FDB652000E43D1F300F688B5 /* libSDL2.a in Frameworks */,
                FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */,
                FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */,
                FABA34DD1D8B5E8D00915323 /* AVFoundation.framework in Frameworks */,
                FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */,
                FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */,
                FA8B4BA91967073D00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDB652020E43D1F300F688B5 /* Foundation.framework in Frameworks */,
                FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */,
                FDB652040E43D1F300F688B5 /* CoreGraphics.framework in Frameworks */,
                FAE0E9711BAF96BB0098DFA4 /* GameController.framework in Frameworks */,
                F3F7590622AC5FD1001D97F2 /* Metal.framework in Frameworks */,
                FDB652050E43D1F300F688B5 /* OpenGLES.framework in Frameworks */,
                FDB652060E43D1F300F688B5 /* QuartzCore.framework in Frameworks */,
                FDB652070E43D1F300F688B5 /* CoreAudio.framework in Frameworks */,
                FDB652080E43D1F300F688B5 /* AudioToolbox.framework in Frameworks */,
                FDB652030E43D1F300F688B5 /* UIKit.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -360,17 +398,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */,
                FD1B499E0E31326C007AB34E /* libSDL2.a in Frameworks */,
                FAE0E96E1BAF96B10098DFA4 /* GameController.framework in Frameworks */,
                FA8B4BA61967072100F8EB7C /* CoreMotion.framework in Frameworks */,
                FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */,
                FDF0D7960E12D52900247964 /* AudioToolbox.framework in Frameworks */,
                FDC202E60E107B1200ABAC90 /* Foundation.framework in Frameworks */,
                FDC202E70E107B1200ABAC90 /* UIKit.framework in Frameworks */,
                FABA34DA1D8B5E7F00915323 /* AVFoundation.framework in Frameworks */,
                FDF0D7950E12D52900247964 /* CoreAudio.framework in Frameworks */,
                FDC202E80E107B1200ABAC90 /* CoreGraphics.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;
        };
@@ -378,17 +417,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */,
                FD1B49A20E313273007AB34E /* libSDL2.a in Frameworks */,
                FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */,
                FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */,
                FABA34DC1D8B5E8900915323 /* AVFoundation.framework in Frameworks */,
                FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */,
                FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */,
                FA8B4BA81967073400F8EB7C /* CoreMotion.framework in Frameworks */,
                FDC52ED40E2843D6008D768C /* Foundation.framework in Frameworks */,
                FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */,
                FDC52ED60E2843D6008D768C /* CoreGraphics.framework in Frameworks */,
                FAE0E9701BAF96B80098DFA4 /* GameController.framework in Frameworks */,
                F3F7590522AC5FB3001D97F2 /* Metal.framework in Frameworks */,
                FDC52ED70E2843D6008D768C /* OpenGLES.framework in Frameworks */,
                FDC52ED80E2843D6008D768C /* QuartzCore.framework in Frameworks */,
                FDC52ED90E2843D6008D768C /* CoreAudio.framework in Frameworks */,
                FDC52EDA0E2843D6008D768C /* AudioToolbox.framework in Frameworks */,
                FDC52ED50E2843D6008D768C /* UIKit.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -396,17 +436,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */,
                FD1B49A00E313270007AB34E /* libSDL2.a in Frameworks */,
                FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */,
                FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */,
                FABA34DB1D8B5E8500915323 /* AVFoundation.framework in Frameworks */,
                FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */,
                FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */,
                FA8B4BA71967072800F8EB7C /* CoreMotion.framework in Frameworks */,
                FDF0D69C0E12D05400247964 /* Foundation.framework in Frameworks */,
                FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */,
                FDF0D69E0E12D05400247964 /* CoreGraphics.framework in Frameworks */,
                FAE0E96F1BAF96B50098DFA4 /* GameController.framework in Frameworks */,
                F3F7590422AC5F8D001D97F2 /* Metal.framework in Frameworks */,
                FDF0D69F0E12D05400247964 /* OpenGLES.framework in Frameworks */,
                FDF0D6A00E12D05400247964 /* QuartzCore.framework in Frameworks */,
                FDF0D71E0E12D2AB00247964 /* CoreAudio.framework in Frameworks */,
                FDF0D7230E12D31800247964 /* AudioToolbox.framework in Frameworks */,
                FDF0D69D0E12D05400247964 /* UIKit.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -455,6 +496,7 @@
        29B97323FDCFA39411CA2CEA /* Frameworks */ = {
            isa = PBXGroup;
            children = (
                F3F758FF22AC5EC7001D97F2 /* Metal.framework */,
                FABA34D71D8B5E7700915323 /* AVFoundation.framework */,
                FABA34D31D8B5E5600915323 /* AVFoundation.framework */,
                FAE0E9691BAF96A00098DFA4 /* GameController.framework */,
@@ -474,7 +516,11 @@
            isa = PBXGroup;
            children = (
                FD1B489E0E313154007AB34E /* libSDL2.a */,
                F3F758F822AC5E8F001D97F2 /* libSDL2.dylib */,
                FA30DEAC1BBF59D9009C397F /* libSDL2.a */,
                F3F758FA22AC5E8F001D97F2 /* libSDL2.dylib */,
                F3F758FC22AC5E8F001D97F2 /* libSDLmain.a */,
                F3F758FE22AC5E8F001D97F2 /* libSDLmain.a */,
            );
            name = Products;
            sourceTree = "<group>";
@@ -725,6 +771,34 @@
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
        F3F758F822AC5E8F001D97F2 /* libSDL2.dylib */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
            path = libSDL2.dylib;
            remoteRef = F3F758F722AC5E8F001D97F2 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        F3F758FA22AC5E8F001D97F2 /* libSDL2.dylib */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
            path = libSDL2.dylib;
            remoteRef = F3F758F922AC5E8F001D97F2 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        F3F758FC22AC5E8F001D97F2 /* libSDLmain.a */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
            path = libSDLmain.a;
            remoteRef = F3F758FB22AC5E8F001D97F2 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        F3F758FE22AC5E8F001D97F2 /* libSDLmain.a */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
            path = libSDLmain.a;
            remoteRef = F3F758FD22AC5E8F001D97F2 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        FA30DEAC1BBF59D9009C397F /* libSDL2.a */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
@@ -957,6 +1031,7 @@
        1D6058940D05DD3E006BFB54 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
                PRODUCT_NAME = Rectangles;
@@ -966,6 +1041,7 @@
        1D6058950D05DD3E006BFB54 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Rectangles;
                PRODUCT_NAME = Rectangles;
@@ -1089,6 +1165,7 @@
        FD15FCB50E086866003BDF25 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                GCC_DYNAMIC_NO_PIC = NO;
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
@@ -1100,6 +1177,7 @@
        FD15FCB60E086866003BDF25 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Happy;
                PRODUCT_NAME = Happy;
@@ -1110,6 +1188,7 @@
        FD5F9BE70E0DEBEB008E885B /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
                PRODUCT_NAME = Accel;
@@ -1120,6 +1199,7 @@
        FD5F9BE80E0DEBEB008E885B /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Accel;
                PRODUCT_NAME = Accel;
@@ -1130,6 +1210,7 @@
        FDB6520A0E43D1F300F688B5 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
                PRODUCT_NAME = Keyboard;
@@ -1140,6 +1221,7 @@
        FDB6520B0E43D1F300F688B5 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Keyboard;
                PRODUCT_NAME = Keyboard;
@@ -1150,6 +1232,7 @@
        FDC202EC0E107B1200ABAC90 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
                PRODUCT_NAME = Touch;
@@ -1160,6 +1243,7 @@
        FDC202ED0E107B1200ABAC90 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Touch;
                PRODUCT_NAME = Touch;
@@ -1194,6 +1278,7 @@
        FDF0D6A20E12D05400247964 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
                PRODUCT_NAME = Mixer;
@@ -1204,6 +1289,7 @@
        FDF0D6A30E12D05400247964 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_BUNDLE_IDENTIFIER = com.yourcompany.Mixer;
                PRODUCT_NAME = Mixer;
source/Xcode-iOS/Demos/data/bitmapfont/license.txt
old mode 100755 new mode 100644
source/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
old mode 100644 new mode 100755
@@ -94,6 +94,252 @@
        4D75171A1EE1D32200820EEA /* SDL_uikitmetalview.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */; };
        4D75171F1EE1D98200820EEA /* SDL_vulkan_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */; };
        4D7517201EE1D98200820EEA /* SDL_vulkan_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */; };
        52ED1D6D222889500061FCE0 /* SDL_blit.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683010DF2374E00F98A1A /* SDL_blit.h */; };
        52ED1D6E222889500061FCE0 /* SDL_uikitmetalview.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */; };
        52ED1D6F222889500061FCE0 /* SDL_vulkan_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */; };
        52ED1D70222889500061FCE0 /* SDL_blit_auto.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683060DF2374E00F98A1A /* SDL_blit_auto.h */; };
        52ED1D71222889500061FCE0 /* SDL_blit_copy.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683080DF2374E00F98A1A /* SDL_blit_copy.h */; };
        52ED1D72222889500061FCE0 /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */; };
        52ED1D73222889500061FCE0 /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703218565E760007D20F /* SDL_dynapi_procs.h */; };
        52ED1D74222889500061FCE0 /* SDL_RLEaccel_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683160DF2374E00F98A1A /* SDL_RLEaccel_c.h */; };
        52ED1D75222889500061FCE0 /* SDL_sysvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA6831A0DF2374E00F98A1A /* SDL_sysvideo.h */; };
        52ED1D76222889500061FCE0 /* SDL_nullevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685F60DF244C800F98A1A /* SDL_nullevents_c.h */; };
        52ED1D77222889500061FCE0 /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685FA0DF244C800F98A1A /* SDL_nullvideo.h */; };
        52ED1D78222889500061FCE0 /* SDL_joystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5F9D1F0E0E08B3008E885B /* SDL_joystick_c.h */; };
        52ED1D79222889500061FCE0 /* SDL_sysjoystick.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5F9D200E0E08B3008E885B /* SDL_sysjoystick.h */; };
        52ED1D7A222889500061FCE0 /* SDL_uikitevents.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F0C0E26E5D900F90B21 /* SDL_uikitevents.h */; };
        52ED1D7B222889500061FCE0 /* SDL_uikitopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F0E0E26E5D900F90B21 /* SDL_uikitopengles.h */; };
        52ED1D7C222889500061FCE0 /* SDL_uikitvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F100E26E5D900F90B21 /* SDL_uikitvideo.h */; };
        52ED1D7D222889500061FCE0 /* SDL_uikitwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F140E26E5D900F90B21 /* SDL_uikitwindow.h */; };
        52ED1D7E222889500061FCE0 /* SDL_uikitopenglview.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F160E26E5D900F90B21 /* SDL_uikitopenglview.h */; };
        52ED1D7F222889500061FCE0 /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703418565E760007D20F /* SDL_dynapi.h */; };
        52ED1D80222889500061FCE0 /* SDL_uikitappdelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689FCD0E26E9D400F90B21 /* SDL_uikitappdelegate.h */; };
        52ED1D81222889500061FCE0 /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */; };
        52ED1D82222889500061FCE0 /* yuv_rgb_std_func.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3531FB8B46300D9FEE6 /* yuv_rgb_std_func.h */; };
        52ED1D83222889500061FCE0 /* SDL_syshaptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */; };
        52ED1D84222889500061FCE0 /* SDL_blit_slow.h in Headers */ = {isa = PBXBuildFile; fileRef = 0463873A0F0B5B7D0041FD65 /* SDL_blit_slow.h */; };
        52ED1D85222889500061FCE0 /* SDL_rwopsbundlesupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 006E9886119552DD001DE610 /* SDL_rwopsbundlesupport.h */; };
        52ED1D86222889500061FCE0 /* SDL_clipboardevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0420496E11E6F03D007E7EC9 /* SDL_clipboardevents_c.h */; };
        52ED1D87222889500061FCE0 /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3461FB8B27800D9FEE6 /* SDL_rect_c.h */; };
        52ED1D88222889500061FCE0 /* yuv_rgb_sse_func.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3541FB8B46300D9FEE6 /* yuv_rgb_sse_func.h */; };
        52ED1D89222889500061FCE0 /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D5F11EF474A00B60E01 /* SDL_gesture_c.h */; };
        52ED1D8A222889500061FCE0 /* SDL_touch_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D6111EF474A00B60E01 /* SDL_touch_c.h */; };
        52ED1D8B222889500061FCE0 /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2CEB12FA0F680087D585 /* SDL_sysrender.h */; };
        52ED1D8C222889500061FCE0 /* SDL_yuv_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409BA412FA989600FB9AA8 /* SDL_yuv_sw_c.h */; };
        52ED1D8D222889500061FCE0 /* yuv_rgb.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3551FB8B46300D9FEE6 /* yuv_rgb.h */; };
        52ED1D8E222889500061FCE0 /* SDL_blendfillrect.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806B12FB751400FC43C0 /* SDL_blendfillrect.h */; };
        52ED1D8F222889500061FCE0 /* SDL_blendline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806D12FB751400FC43C0 /* SDL_blendline.h */; };
        52ED1D90222889500061FCE0 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */; };
        52ED1D91222889500061FCE0 /* SDL_blendpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806F12FB751400FC43C0 /* SDL_blendpoint.h */; };
        52ED1D92222889500061FCE0 /* SDL_draw.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807012FB751400FC43C0 /* SDL_draw.h */; };
        52ED1D93222889500061FCE0 /* SDL_drawline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807212FB751400FC43C0 /* SDL_drawline.h */; };
        52ED1D94222889500061FCE0 /* SDL_yuv_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3481FB8B27800D9FEE6 /* SDL_yuv_c.h */; };
        52ED1D95222889500061FCE0 /* SDL_drawpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807412FB751400FC43C0 /* SDL_drawpoint.h */; };
        52ED1D96222889500061FCE0 /* SDL_nullframebuffer_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7808212FB753F00FC43C0 /* SDL_nullframebuffer_c.h */; };
        52ED1D97222889500061FCE0 /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC4E12FE1C1E004C9285 /* SDL_render_sw_c.h */; };
        52ED1D98222889500061FCE0 /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
        52ED1D99222889500061FCE0 /* SDL_shaders_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */; };
        52ED1D9A222889500061FCE0 /* SDL_assert_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BAC09A1300C1290055DE28 /* SDL_assert_c.h */; };
        52ED1D9B222889500061FCE0 /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */; };
        52ED1D9C222889500061FCE0 /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; };
        52ED1D9D222889500061FCE0 /* SDL_rotate.h in Headers */ = {isa = PBXBuildFile; fileRef = AA628ADA159369E3005138DD /* SDL_rotate.h */; };
        52ED1D9E222889500061FCE0 /* begin_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558651595D55500BBD41B /* begin_code.h */; };
        52ED1D9F222889500061FCE0 /* close_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558661595D55500BBD41B /* close_code.h */; };
        52ED1DA0222889500061FCE0 /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558671595D55500BBD41B /* SDL_assert.h */; };
        52ED1DA1222889500061FCE0 /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558681595D55500BBD41B /* SDL_atomic.h */; };
        52ED1DA2222889500061FCE0 /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558691595D55500BBD41B /* SDL_audio.h */; };
        52ED1DA3222889500061FCE0 /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; };
        52ED1DA4222889500061FCE0 /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586A1595D55500BBD41B /* SDL_blendmode.h */; };
        52ED1DA5222889500061FCE0 /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */; };
        52ED1DA6222889500061FCE0 /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586B1595D55500BBD41B /* SDL_clipboard.h */; };
        52ED1DA7222889500061FCE0 /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */; };
        52ED1DA8222889500061FCE0 /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586D1595D55500BBD41B /* SDL_config.h */; };
        52ED1DA9222889500061FCE0 /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586E1595D55500BBD41B /* SDL_copying.h */; };
        52ED1DAA222889500061FCE0 /* SDL_egl_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3431FB8B27700D9FEE6 /* SDL_egl_c.h */; };
        52ED1DAB222889500061FCE0 /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586F1595D55500BBD41B /* SDL_cpuinfo.h */; };
        52ED1DAC222889500061FCE0 /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558701595D55500BBD41B /* SDL_endian.h */; };
        52ED1DAD222889500061FCE0 /* SDL_error.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558711595D55500BBD41B /* SDL_error.h */; };
        52ED1DAE222889500061FCE0 /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; };
        52ED1DAF222889500061FCE0 /* SDL_events.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558721595D55500BBD41B /* SDL_events.h */; };
        52ED1DB0222889500061FCE0 /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558731595D55500BBD41B /* SDL_gesture.h */; };
        52ED1DB1222889500061FCE0 /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558741595D55500BBD41B /* SDL_haptic.h */; };
        52ED1DB2222889500061FCE0 /* SDL_hints.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558751595D55500BBD41B /* SDL_hints.h */; };
        52ED1DB3222889500061FCE0 /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; };
        52ED1DB4222889500061FCE0 /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */; };
        52ED1DB5222889500061FCE0 /* SDL_joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558771595D55500BBD41B /* SDL_joystick.h */; };
        52ED1DB6222889500061FCE0 /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3451FB8B27800D9FEE6 /* SDL_shape_internals.h */; };
        52ED1DB7222889500061FCE0 /* SDL_keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558781595D55500BBD41B /* SDL_keyboard.h */; };
        52ED1DB8222889500061FCE0 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; };
        52ED1DB9222889500061FCE0 /* SDL_keycode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558791595D55500BBD41B /* SDL_keycode.h */; };
        52ED1DBA222889500061FCE0 /* SDL_loadso.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587A1595D55500BBD41B /* SDL_loadso.h */; };
        52ED1DBB222889500061FCE0 /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587B1595D55500BBD41B /* SDL_log.h */; };
        52ED1DBC222889500061FCE0 /* SDL_coremotionsensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */; };
        52ED1DBD222889500061FCE0 /* SDL_main.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587C1595D55500BBD41B /* SDL_main.h */; };
        52ED1DBE222889500061FCE0 /* SDL_mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587D1595D55500BBD41B /* SDL_mouse.h */; };
        52ED1DBF222889500061FCE0 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; };
        52ED1DC0222889500061FCE0 /* SDL_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587E1595D55500BBD41B /* SDL_mutex.h */; };
        52ED1DC1222889500061FCE0 /* SDL_name.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587F1595D55500BBD41B /* SDL_name.h */; };
        52ED1DC2222889500061FCE0 /* SDL_opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558801595D55500BBD41B /* SDL_opengl.h */; };
        52ED1DC3222889500061FCE0 /* SDL_opengles.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558811595D55500BBD41B /* SDL_opengles.h */; };
        52ED1DC4222889500061FCE0 /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */; };
        52ED1DC5222889500061FCE0 /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558821595D55500BBD41B /* SDL_opengles2.h */; };
        52ED1DC6222889500061FCE0 /* SDL_pixels.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558831595D55500BBD41B /* SDL_pixels.h */; };
        52ED1DC7222889500061FCE0 /* SDL_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558841595D55500BBD41B /* SDL_platform.h */; };
        52ED1DC8222889500061FCE0 /* SDL_power.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558851595D55500BBD41B /* SDL_power.h */; };
        52ED1DC9222889500061FCE0 /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558861595D55500BBD41B /* SDL_quit.h */; };
        52ED1DCA222889500061FCE0 /* SDL_rect.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558871595D55500BBD41B /* SDL_rect.h */; };
        52ED1DCB222889500061FCE0 /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558881595D55500BBD41B /* SDL_render.h */; };
        52ED1DCC222889500061FCE0 /* SDL_revision.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558891595D55500BBD41B /* SDL_revision.h */; };
        52ED1DCD222889500061FCE0 /* SDL_rwops.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588A1595D55500BBD41B /* SDL_rwops.h */; };
        52ED1DCE222889500061FCE0 /* SDL_scancode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588B1595D55500BBD41B /* SDL_scancode.h */; };
        52ED1DCF222889500061FCE0 /* SDL_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588C1595D55500BBD41B /* SDL_shape.h */; };
        52ED1DD0222889500061FCE0 /* SDL_stdinc.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588D1595D55500BBD41B /* SDL_stdinc.h */; };
        52ED1DD1222889500061FCE0 /* SDL_sysjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FAD4F7011BA3C4E8008346CE /* SDL_sysjoystick_c.h */; };
        52ED1DD2222889500061FCE0 /* SDL_surface.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588E1595D55500BBD41B /* SDL_surface.h */; };
        52ED1DD3222889500061FCE0 /* SDL_system.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588F1595D55500BBD41B /* SDL_system.h */; };
        52ED1DD4222889500061FCE0 /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C98212CD0360047DF2E /* SDL_sensor.h */; };
        52ED1DD5222889500061FCE0 /* SDL_syswm.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558901595D55500BBD41B /* SDL_syswm.h */; };
        52ED1DD6222889500061FCE0 /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558911595D55500BBD41B /* SDL_thread.h */; };
        52ED1DD7222889500061FCE0 /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558921595D55500BBD41B /* SDL_timer.h */; };
        52ED1DD8222889500061FCE0 /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558931595D55500BBD41B /* SDL_touch.h */; };
        52ED1DD9222889500061FCE0 /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558941595D55500BBD41B /* SDL_types.h */; };
        52ED1DDA222889500061FCE0 /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558951595D55500BBD41B /* SDL_version.h */; };
        52ED1DDB222889500061FCE0 /* SDL_vulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7516FE1EE1C5B400820EEA /* SDL_vulkan.h */; };
        52ED1DDC222889500061FCE0 /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558961595D55500BBD41B /* SDL_video.h */; };
        52ED1DDD222889500061FCE0 /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558971595D55500BBD41B /* SDL.h */; };
        52ED1DDE222889500061FCE0 /* SDL_uikitvulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7516F91EE1C28A00820EEA /* SDL_uikitvulkan.h */; };
        52ED1DDF222889500061FCE0 /* SDL_uikitmodes.h in Headers */ = {isa = PBXBuildFile; fileRef = AA126AD21617C5E6005ABC8F /* SDL_uikitmodes.h */; };
        52ED1DE0222889500061FCE0 /* SDL_dropevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA704DD4162AA90A0076D1C1 /* SDL_dropevents_c.h */; };
        52ED1DE1222889500061FCE0 /* SDL_messagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */; };
        52ED1DE2222889500061FCE0 /* SDL_uikitmessagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AABCC3921640643D00AB8930 /* SDL_uikitmessagebox.h */; };
        52ED1DE3222889500061FCE0 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
        52ED1DE4222889500061FCE0 /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F36839CA214790950000F255 /* SDL_dummysensor.h */; };
        52ED1DE5222889500061FCE0 /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */; };
        52ED1DE6222889500061FCE0 /* SDL_filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */; };
        52ED1DE8222889500061FCE0 /* SDL_systimer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA310DD52EDC00FB1D6B /* SDL_systimer.c */; };
        52ED1DE9222889500061FCE0 /* SDL_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA2E0DD52EDC00FB1D6B /* SDL_timer.c */; };
        52ED1DEA222889500061FCE0 /* SDL_coremotionsensor.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */; };
        52ED1DEB222889500061FCE0 /* SDL_string.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A750DEA620800C5B771 /* SDL_string.c */; };
        52ED1DEC222889500061FCE0 /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B91D0DD52EDC00FB1D6B /* SDL_dummyaudio.c */; };
        52ED1DED222889500061FCE0 /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9440DD52EDC00FB1D6B /* SDL_audio.c */; };
        52ED1DEE222889500061FCE0 /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9460DD52EDC00FB1D6B /* SDL_audiocvt.c */; };
        52ED1DEF222889500061FCE0 /* SDL_audiotypecvt.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B94A0DD52EDC00FB1D6B /* SDL_audiotypecvt.c */; };
        52ED1DF0222889500061FCE0 /* SDL_mixer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B94B0DD52EDC00FB1D6B /* SDL_mixer.c */; };
        52ED1DF1222889500061FCE0 /* SDL_wave.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9530DD52EDC00FB1D6B /* SDL_wave.c */; };
        52ED1DF2222889500061FCE0 /* SDL_uikitvulkan.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516FA1EE1C28A00820EEA /* SDL_uikitvulkan.m */; };
        52ED1DF3222889500061FCE0 /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
        52ED1DF4222889500061FCE0 /* SDL_cpuinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B98B0DD52EDC00FB1D6B /* SDL_cpuinfo.c */; };
        52ED1DF5222889500061FCE0 /* SDL_events.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9930DD52EDC00FB1D6B /* SDL_events.c */; };
        52ED1DF6222889500061FCE0 /* SDL_keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9950DD52EDC00FB1D6B /* SDL_keyboard.c */; };
        52ED1DF7222889500061FCE0 /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6703318565E760007D20F /* SDL_dynapi.c */; };
        52ED1DF8222889500061FCE0 /* SDL_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9970DD52EDC00FB1D6B /* SDL_mouse.c */; };
        52ED1DF9222889500061FCE0 /* SDL_quit.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9990DD52EDC00FB1D6B /* SDL_quit.c */; };
        52ED1DFA222889500061FCE0 /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */; };
        52ED1DFB222889500061FCE0 /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; };
        52ED1DFC222889500061FCE0 /* SDL_rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */; };
        52ED1DFD222889500061FCE0 /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CC5212CE92C0047DF2E /* hid.m */; };
        52ED1DFE222889500061FCE0 /* SDL_vulkan_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */; };
        52ED1DFF222889500061FCE0 /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */; };
        52ED1E00222889500061FCE0 /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D80DD52EDC00FB1D6B /* SDL.c */; };
        52ED1E01222889500061FCE0 /* SDL_syscond.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA070DD52EDC00FB1D6B /* SDL_syscond.c */; };
        52ED1E02222889500061FCE0 /* SDL_render_metal.m in Sources */ = {isa = PBXBuildFile; fileRef = AADC5A621FDA10C800960936 /* SDL_render_metal.m */; };
        52ED1E03222889500061FCE0 /* SDL_sysmutex.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA080DD52EDC00FB1D6B /* SDL_sysmutex.c */; };
        52ED1E04222889500061FCE0 /* SDL_syssem.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA0A0DD52EDC00FB1D6B /* SDL_syssem.c */; };
        52ED1E05222889500061FCE0 /* SDL_systhread.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA0B0DD52EDC00FB1D6B /* SDL_systhread.c */; };
        52ED1E06222889500061FCE0 /* SDL_thread.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA150DD52EDC00FB1D6B /* SDL_thread.c */; };
        52ED1E07222889500061FCE0 /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A700DEA620800C5B771 /* SDL_getenv.c */; };
        52ED1E08222889500061FCE0 /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A710DEA620800C5B771 /* SDL_iconv.c */; };
        52ED1E09222889500061FCE0 /* SDL_malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A720DEA620800C5B771 /* SDL_malloc.c */; };
        52ED1E0A222889500061FCE0 /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */; };
        52ED1E0B222889500061FCE0 /* SDL_qsort.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A730DEA620800C5B771 /* SDL_qsort.c */; };
        52ED1E0C222889500061FCE0 /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */; };
        52ED1E0D222889500061FCE0 /* SDL_stdlib.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A740DEA620800C5B771 /* SDL_stdlib.c */; };
        52ED1E0E222889500061FCE0 /* SDL_blit.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683000DF2374E00F98A1A /* SDL_blit.c */; };
        52ED1E0F222889500061FCE0 /* SDL_blit_0.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683020DF2374E00F98A1A /* SDL_blit_0.c */; };
        52ED1E10222889500061FCE0 /* SDL_yuv.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B34F1FB8B3CC00D9FEE6 /* SDL_yuv.c */; };
        52ED1E11222889500061FCE0 /* SDL_blit_1.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683030DF2374E00F98A1A /* SDL_blit_1.c */; };
        52ED1E12222889500061FCE0 /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
        52ED1E13222889500061FCE0 /* SDL_blit_A.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683040DF2374E00F98A1A /* SDL_blit_A.c */; };
        52ED1E14222889500061FCE0 /* SDL_blit_auto.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683050DF2374E00F98A1A /* SDL_blit_auto.c */; };
        52ED1E15222889500061FCE0 /* SDL_blit_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683070DF2374E00F98A1A /* SDL_blit_copy.c */; };
        52ED1E16222889500061FCE0 /* SDL_blit_N.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683090DF2374E00F98A1A /* SDL_blit_N.c */; };
        52ED1E17222889500061FCE0 /* SDL_blit_slow.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830A0DF2374E00F98A1A /* SDL_blit_slow.c */; };
        52ED1E18222889500061FCE0 /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */; };
        52ED1E19222889500061FCE0 /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */; };
        52ED1E1A222889500061FCE0 /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683110DF2374E00F98A1A /* SDL_rect.c */; };
        52ED1E1B222889500061FCE0 /* SDL_RLEaccel.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683150DF2374E00F98A1A /* SDL_RLEaccel.c */; };
        52ED1E1C222889500061FCE0 /* SDL_stretch.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683170DF2374E00F98A1A /* SDL_stretch.c */; };
        52ED1E1D222889500061FCE0 /* SDL_egl.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3471FB8B27800D9FEE6 /* SDL_egl.c */; };
        52ED1E1E222889500061FCE0 /* SDL_surface.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683190DF2374E00F98A1A /* SDL_surface.c */; };
        52ED1E1F222889500061FCE0 /* SDL_video.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6831B0DF2374E00F98A1A /* SDL_video.c */; };
        52ED1E20222889500061FCE0 /* SDL_nullevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F50DF244C800F98A1A /* SDL_nullevents.c */; };
        52ED1E21222889500061FCE0 /* SDL_nullvideo.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F90DF244C800F98A1A /* SDL_nullvideo.c */; };
        52ED1E22222889500061FCE0 /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */; };
        52ED1E23222889500061FCE0 /* SDL_sysjoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F000E26E5B600F90B21 /* SDL_sysjoystick.m */; };
        52ED1E24222889500061FCE0 /* SDL_uikitevents.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F0D0E26E5D900F90B21 /* SDL_uikitevents.m */; };
        52ED1E25222889500061FCE0 /* yuv_rgb.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3561FB8B46300D9FEE6 /* yuv_rgb.c */; };
        52ED1E26222889500061FCE0 /* SDL_uikitopengles.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F0F0E26E5D900F90B21 /* SDL_uikitopengles.m */; };
        52ED1E27222889500061FCE0 /* SDL_uikitvideo.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F110E26E5D900F90B21 /* SDL_uikitvideo.m */; };
        52ED1E28222889500061FCE0 /* SDL_uikitview.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F130E26E5D900F90B21 /* SDL_uikitview.m */; };
        52ED1E29222889500061FCE0 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
        52ED1E2A222889500061FCE0 /* SDL_uikitwindow.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F150E26E5D900F90B21 /* SDL_uikitwindow.m */; };
        52ED1E2B222889500061FCE0 /* SDL_uikitopenglview.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F170E26E5D900F90B21 /* SDL_uikitopenglview.m */; };
        52ED1E2C222889500061FCE0 /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689FCC0E26E9D400F90B21 /* SDL_uikitappdelegate.m */; };
        52ED1E2D222889500061FCE0 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = FD8BD8190E27E25900B52CD5 /* SDL_sysloadso.c */; };
        52ED1E2E222889500061FCE0 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
        52ED1E2F222889500061FCE0 /* SDL_syshaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */; };
        52ED1E30222889500061FCE0 /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B90EA76A31008ABAF1 /* SDL_haptic.c */; };
        52ED1E31222889500061FCE0 /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */; };
        52ED1E32222889500061FCE0 /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 0463873E0F0B5B7D0041FD65 /* SDL_fillrect.c */; };
        52ED1E33222889500061FCE0 /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF551104ABD200D6DDF7 /* SDL_assert.c */; };
        52ED1E34222889500061FCE0 /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */; };
        52ED1E35222889500061FCE0 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E0118A8EE200A56AA6 /* SDL_power.c */; };
        52ED1E36222889500061FCE0 /* SDL_syspower.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */; };
        52ED1E37222889500061FCE0 /* SDL_rwopsbundlesupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 006E9887119552DD001DE610 /* SDL_rwopsbundlesupport.m */; };
        52ED1E38222889500061FCE0 /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 044E5FB711E606EB0076F181 /* SDL_clipboard.c */; };
        52ED1E39222889500061FCE0 /* SDL_clipboardevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 0420496F11E6F03D007E7EC9 /* SDL_clipboardevents.c */; };
        52ED1E3A222889500061FCE0 /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6011EF474A00B60E01 /* SDL_gesture.c */; };
        52ED1E3B222889500061FCE0 /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6211EF474A00B60E01 /* SDL_touch.c */; };
        52ED1E3C222889500061FCE0 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
        52ED1E3D222889500061FCE0 /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
        52ED1E3E222889500061FCE0 /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2CEA12FA0F680087D585 /* SDL_render.c */; };
        52ED1E3F222889500061FCE0 /* SDL_yuv_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409BA512FA989600FB9AA8 /* SDL_yuv_sw.c */; };
        52ED1E40222889500061FCE0 /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806A12FB751400FC43C0 /* SDL_blendfillrect.c */; };
        52ED1E41222889500061FCE0 /* SDL_blendline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806C12FB751400FC43C0 /* SDL_blendline.c */; };
        52ED1E42222889500061FCE0 /* SDL_blendpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806E12FB751400FC43C0 /* SDL_blendpoint.c */; };
        52ED1E43222889500061FCE0 /* SDL_drawline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7807112FB751400FC43C0 /* SDL_drawline.c */; };
        52ED1E44222889500061FCE0 /* SDL_drawpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7807312FB751400FC43C0 /* SDL_drawpoint.c */; };
        52ED1E45222889500061FCE0 /* SDL_nullframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */; };
        52ED1E46222889500061FCE0 /* SDL_render_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC4F12FE1C1E004C9285 /* SDL_render_sw.c */; };
        52ED1E47222889500061FCE0 /* SDL_render_gles.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5212FE1C28004C9285 /* SDL_render_gles.c */; };
        52ED1E48222889500061FCE0 /* SDL_hints.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5412FE1C3F004C9285 /* SDL_hints.c */; };
        52ED1E49222889500061FCE0 /* SDL_shape.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3441FB8B27800D9FEE6 /* SDL_shape.c */; };
        52ED1E4A222889500061FCE0 /* SDL_render_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */; };
        52ED1E4B222889500061FCE0 /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F36839CB214790950000F255 /* SDL_dummysensor.c */; };
        52ED1E4C222889500061FCE0 /* SDL_shaders_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */; };
        52ED1E4D222889500061FCE0 /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BAC09B1300C1290055DE28 /* SDL_log.c */; };
        52ED1E4E222889500061FCE0 /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */; };
        52ED1E4F222889500061FCE0 /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C9D212CD0990047DF2E /* SDL_sensor.c */; };
        52ED1E50222889500061FCE0 /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */; };
        52ED1E51222889500061FCE0 /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
        52ED1E52222889500061FCE0 /* SDL_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628AD9159369E3005138DD /* SDL_rotate.c */; };
        52ED1E53222889500061FCE0 /* SDL_uikitmodes.m in Sources */ = {isa = PBXBuildFile; fileRef = AA126AD31617C5E6005ABC8F /* SDL_uikitmodes.m */; };
        52ED1E54222889500061FCE0 /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = AA704DD5162AA90A0076D1C1 /* SDL_dropevents.c */; };
        52ED1E55222889500061FCE0 /* SDL_uikitmessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC3931640643D00AB8930 /* SDL_uikitmessagebox.m */; };
        52ED1E56222889500061FCE0 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
        52ED1E57222889500061FCE0 /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8494178D5F1A00823F9D /* SDL_systls.c */; };
        52ED1E58222889500061FCE0 /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */; };
        52ED1E6C22288B8C0061FCE0 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6B22288B8C0061FCE0 /* QuartzCore.framework */; };
        52ED1E6E22288B960061FCE0 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6D22288B960061FCE0 /* CoreAudio.framework */; };
        52ED1E7022288BA20061FCE0 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6F22288BA20061FCE0 /* AudioToolbox.framework */; };
        52ED1E7222288BAC0061FCE0 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7122288BAC0061FCE0 /* AVFoundation.framework */; };
        52ED1E7422288BB70061FCE0 /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7322288BB70061FCE0 /* CoreBluetooth.framework */; };
        52ED1E7622288BC10061FCE0 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7522288BC10061FCE0 /* CoreGraphics.framework */; };
        52ED1E7822288BCA0061FCE0 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7722288BCA0061FCE0 /* UIKit.framework */; };
        52ED1E7A22288BDD0061FCE0 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7922288BDD0061FCE0 /* GameController.framework */; };
        52ED1E7C22288BE70061FCE0 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7B22288BE70061FCE0 /* CoreMotion.framework */; };
        52ED1E7E22288BF00061FCE0 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7D22288BF00061FCE0 /* Metal.framework */; };
        52ED1E8022288BFA0061FCE0 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7F22288BFA0061FCE0 /* OpenGLES.framework */; };
        55FFA91A2122302B00D7CBED /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; };
        566726451DF72CF5001DD3DB /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
        566726461DF72CF5001DD3DB /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; };
@@ -109,14 +355,37 @@
        56ED04E1118A8EE200A56AA6 /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E0118A8EE200A56AA6 /* SDL_power.c */; };
        56ED04E3118A8EFD00A56AA6 /* SDL_syspower.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */; };
        56F9D5601DF73BA400C15B5D /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
        63CC93C723849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
        63CC93C823849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
        63CC93C923849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
        63CC93CA23849391002A5C54 /* SDL_strtokr.c in Sources */ = {isa = PBXBuildFile; fileRef = 63CC93C623849391002A5C54 /* SDL_strtokr.c */; };
        93CB792313FC5E5200BD3E05 /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; };
        93CB792613FC5F5300BD3E05 /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
        A704172E20F7E74800A82227 /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; };
        A704172F20F7E76000A82227 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
        A704173120F7F39900A82227 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
        A704173220F7F39900A82227 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
        A75FDAB723E288E400529352 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
        A75FDAB823E2890000529352 /* SDL_hidapi_steam.c in Sources */ = {isa = PBXBuildFile; fileRef = A704173020F7F39400A82227 /* SDL_hidapi_steam.c */; };
        A75FDBD923EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
        A75FDBDA23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
        A75FDBDB23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
        A75FDBDC23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */ = {isa = PBXBuildFile; fileRef = A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */; };
        A75FDBDD23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
        A75FDBDE23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
        A75FDBDF23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */ = {isa = PBXBuildFile; fileRef = A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */; };
        A7C19D29212E552C00DF2152 /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; };
        A7C19D2A212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
        A7C19D2B212E552C00DF2152 /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
        A7F629241FE06523002F9CC9 /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; };
        A7FF6B6223AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
        A7FF6B6323AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
        A7FF6B6423AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
        A7FF6B6523AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */; };
        A7FF6B6723AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
        A7FF6B6823AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
        A7FF6B6923AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
        A7FF6B6A23AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */ = {isa = PBXBuildFile; fileRef = A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */; };
        AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
        AA0AD06516647BD400CE5896 /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
        AA0F8495178D5F1A00823F9D /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8494178D5F1A00823F9D /* SDL_systls.c */; };
@@ -222,8 +491,256 @@
        F3BDD79B20F51CB8004ECBF3 /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */; };
        F3BDD79C20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
        F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
        F3E3C658224069CE007D243C /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E3C657224069CE007D243C /* SDL_uikit_main.c */; };
        F3E3C65B2241389A007D243C /* SDL_blit.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683010DF2374E00F98A1A /* SDL_blit.h */; };
        F3E3C65C2241389A007D243C /* SDL_uikitmetalview.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */; };
        F3E3C65D2241389A007D243C /* SDL_vulkan_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */; };
        F3E3C65E2241389A007D243C /* SDL_blit_auto.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683060DF2374E00F98A1A /* SDL_blit_auto.h */; };
        F3E3C65F2241389A007D243C /* SDL_blit_copy.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683080DF2374E00F98A1A /* SDL_blit_copy.h */; };
        F3E3C6602241389A007D243C /* SDL_pixels_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683100DF2374E00F98A1A /* SDL_pixels_c.h */; };
        F3E3C6612241389A007D243C /* SDL_dynapi_procs.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703218565E760007D20F /* SDL_dynapi_procs.h */; };
        F3E3C6622241389A007D243C /* SDL_RLEaccel_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA683160DF2374E00F98A1A /* SDL_RLEaccel_c.h */; };
        F3E3C6632241389A007D243C /* SDL_sysvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA6831A0DF2374E00F98A1A /* SDL_sysvideo.h */; };
        F3E3C6642241389A007D243C /* SDL_nullevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685F60DF244C800F98A1A /* SDL_nullevents_c.h */; };
        F3E3C6652241389A007D243C /* SDL_nullvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FDA685FA0DF244C800F98A1A /* SDL_nullvideo.h */; };
        F3E3C6662241389A007D243C /* SDL_joystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5F9D1F0E0E08B3008E885B /* SDL_joystick_c.h */; };
        F3E3C6672241389A007D243C /* SDL_sysjoystick.h in Headers */ = {isa = PBXBuildFile; fileRef = FD5F9D200E0E08B3008E885B /* SDL_sysjoystick.h */; };
        F3E3C6682241389A007D243C /* SDL_uikitevents.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F0C0E26E5D900F90B21 /* SDL_uikitevents.h */; };
        F3E3C6692241389A007D243C /* SDL_uikitopengles.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F0E0E26E5D900F90B21 /* SDL_uikitopengles.h */; };
        F3E3C66A2241389A007D243C /* SDL_uikitvideo.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F100E26E5D900F90B21 /* SDL_uikitvideo.h */; };
        F3E3C66B2241389A007D243C /* SDL_uikitwindow.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F140E26E5D900F90B21 /* SDL_uikitwindow.h */; };
        F3E3C66C2241389A007D243C /* SDL_uikitopenglview.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689F160E26E5D900F90B21 /* SDL_uikitopenglview.h */; };
        F3E3C66D2241389A007D243C /* SDL_dynapi.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703418565E760007D20F /* SDL_dynapi.h */; };
        F3E3C66E2241389A007D243C /* SDL_uikitappdelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = FD689FCD0E26E9D400F90B21 /* SDL_uikitappdelegate.h */; };
        F3E3C66F2241389A007D243C /* SDL_dynapi_overrides.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6703118565E760007D20F /* SDL_dynapi_overrides.h */; };
        F3E3C6702241389A007D243C /* yuv_rgb_std_func.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3531FB8B46300D9FEE6 /* yuv_rgb_std_func.h */; };
        F3E3C6712241389A007D243C /* SDL_syshaptic.h in Headers */ = {isa = PBXBuildFile; fileRef = 047677BA0EA76A31008ABAF1 /* SDL_syshaptic.h */; };
        F3E3C6722241389A007D243C /* SDL_blit_slow.h in Headers */ = {isa = PBXBuildFile; fileRef = 0463873A0F0B5B7D0041FD65 /* SDL_blit_slow.h */; };
        F3E3C6732241389A007D243C /* SDL_rwopsbundlesupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 006E9886119552DD001DE610 /* SDL_rwopsbundlesupport.h */; };
        F3E3C6742241389A007D243C /* SDL_clipboardevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0420496E11E6F03D007E7EC9 /* SDL_clipboardevents_c.h */; };
        F3E3C6752241389A007D243C /* SDL_rect_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3461FB8B27800D9FEE6 /* SDL_rect_c.h */; };
        F3E3C6762241389A007D243C /* yuv_rgb_sse_func.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3541FB8B46300D9FEE6 /* yuv_rgb_sse_func.h */; };
        F3E3C6772241389A007D243C /* SDL_gesture_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D5F11EF474A00B60E01 /* SDL_gesture_c.h */; };
        F3E3C6782241389A007D243C /* SDL_touch_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BA9D6111EF474A00B60E01 /* SDL_touch_c.h */; };
        F3E3C6792241389A007D243C /* SDL_sysrender.h in Headers */ = {isa = PBXBuildFile; fileRef = 041B2CEB12FA0F680087D585 /* SDL_sysrender.h */; };
        F3E3C67A2241389A007D243C /* SDL_yuv_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04409BA412FA989600FB9AA8 /* SDL_yuv_sw_c.h */; };
        F3E3C67B2241389A007D243C /* yuv_rgb.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3551FB8B46300D9FEE6 /* yuv_rgb.h */; };
        F3E3C67C2241389A007D243C /* SDL_blendfillrect.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806B12FB751400FC43C0 /* SDL_blendfillrect.h */; };
        F3E3C67D2241389A007D243C /* SDL_blendline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806D12FB751400FC43C0 /* SDL_blendline.h */; };
        F3E3C67E2241389A007D243C /* SDL_hidapijoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */; };
        F3E3C67F2241389A007D243C /* SDL_blendpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7806F12FB751400FC43C0 /* SDL_blendpoint.h */; };
        F3E3C6802241389A007D243C /* SDL_draw.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807012FB751400FC43C0 /* SDL_draw.h */; };
        F3E3C6812241389A007D243C /* SDL_drawline.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807212FB751400FC43C0 /* SDL_drawline.h */; };
        F3E3C6822241389A007D243C /* SDL_yuv_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3481FB8B27800D9FEE6 /* SDL_yuv_c.h */; };
        F3E3C6832241389A007D243C /* SDL_drawpoint.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7807412FB751400FC43C0 /* SDL_drawpoint.h */; };
        F3E3C6842241389A007D243C /* SDL_nullframebuffer_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04F7808212FB753F00FC43C0 /* SDL_nullframebuffer_c.h */; };
        F3E3C6852241389A007D243C /* SDL_render_sw_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 0442EC4E12FE1C1E004C9285 /* SDL_render_sw_c.h */; };
        F3E3C6862241389A007D243C /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
        F3E3C6872241389A007D243C /* SDL_shaders_gles2.h in Headers */ = {isa = PBXBuildFile; fileRef = 0402A85712FE70C600CECEE3 /* SDL_shaders_gles2.h */; };
        F3E3C6882241389A007D243C /* SDL_assert_c.h in Headers */ = {isa = PBXBuildFile; fileRef = 04BAC09A1300C1290055DE28 /* SDL_assert_c.h */; };
        F3E3C6892241389A007D243C /* SDL_coreaudio.h in Headers */ = {isa = PBXBuildFile; fileRef = 56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */; };
        F3E3C68A2241389A007D243C /* SDL_uikitviewcontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = 93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */; };
        F3E3C68B2241389A007D243C /* SDL_rotate.h in Headers */ = {isa = PBXBuildFile; fileRef = AA628ADA159369E3005138DD /* SDL_rotate.h */; };
        F3E3C68C2241389A007D243C /* begin_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558651595D55500BBD41B /* begin_code.h */; };
        F3E3C68D2241389A007D243C /* close_code.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558661595D55500BBD41B /* close_code.h */; };
        F3E3C68E2241389A007D243C /* SDL_assert.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558671595D55500BBD41B /* SDL_assert.h */; };
        F3E3C68F2241389A007D243C /* SDL_atomic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558681595D55500BBD41B /* SDL_atomic.h */; };
        F3E3C6902241389A007D243C /* SDL_audio.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558691595D55500BBD41B /* SDL_audio.h */; };
        F3E3C6912241389A007D243C /* SDL_syspower.h in Headers */ = {isa = PBXBuildFile; fileRef = 55FFA9192122302B00D7CBED /* SDL_syspower.h */; };
        F3E3C6922241389A007D243C /* SDL_blendmode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586A1595D55500BBD41B /* SDL_blendmode.h */; };
        F3E3C6932241389A007D243C /* SDL_sensor_c.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9B212CD0980047DF2E /* SDL_sensor_c.h */; };
        F3E3C6942241389A007D243C /* SDL_clipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586B1595D55500BBD41B /* SDL_clipboard.h */; };
        F3E3C6952241389A007D243C /* SDL_config_iphoneos.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */; };
        F3E3C6962241389A007D243C /* SDL_config.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586D1595D55500BBD41B /* SDL_config.h */; };
        F3E3C6972241389A007D243C /* SDL_copying.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586E1595D55500BBD41B /* SDL_copying.h */; };
        F3E3C6982241389A007D243C /* SDL_egl_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3431FB8B27700D9FEE6 /* SDL_egl_c.h */; };
        F3E3C6992241389A007D243C /* SDL_cpuinfo.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75586F1595D55500BBD41B /* SDL_cpuinfo.h */; };
        F3E3C69A2241389A007D243C /* SDL_endian.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558701595D55500BBD41B /* SDL_endian.h */; };
        F3E3C69B2241389A007D243C /* SDL_error.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558711595D55500BBD41B /* SDL_error.h */; };
        F3E3C69C2241389A007D243C /* SDL_internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 56A6702D18565E450007D20F /* SDL_internal.h */; };
        F3E3C69D2241389A007D243C /* SDL_events.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558721595D55500BBD41B /* SDL_events.h */; };
        F3E3C69E2241389A007D243C /* SDL_gesture.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558731595D55500BBD41B /* SDL_gesture.h */; };
        F3E3C69F2241389A007D243C /* SDL_haptic.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558741595D55500BBD41B /* SDL_haptic.h */; };
        F3E3C6A02241389A007D243C /* SDL_hints.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558751595D55500BBD41B /* SDL_hints.h */; };
        F3E3C6A12241389A007D243C /* SDL_dataqueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 566726441DF72CF5001DD3DB /* SDL_dataqueue.h */; };
        F3E3C6A22241389A007D243C /* SDL_syssensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C9C212CD0990047DF2E /* SDL_syssensor.h */; };
        F3E3C6A32241389A007D243C /* SDL_joystick.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558771595D55500BBD41B /* SDL_joystick.h */; };
        F3E3C6A42241389A007D243C /* SDL_shape_internals.h in Headers */ = {isa = PBXBuildFile; fileRef = AA13B3451FB8B27800D9FEE6 /* SDL_shape_internals.h */; };
        F3E3C6A52241389A007D243C /* SDL_keyboard.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558781595D55500BBD41B /* SDL_keyboard.h */; };
        F3E3C6A62241389A007D243C /* controller_type.h in Headers */ = {isa = PBXBuildFile; fileRef = A704172D20F7E74800A82227 /* controller_type.h */; };
        F3E3C6A72241389A007D243C /* SDL_keycode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558791595D55500BBD41B /* SDL_keycode.h */; };
        F3E3C6A82241389A007D243C /* SDL_loadso.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587A1595D55500BBD41B /* SDL_loadso.h */; };
        F3E3C6A92241389A007D243C /* SDL_log.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587B1595D55500BBD41B /* SDL_log.h */; };
        F3E3C6AA2241389A007D243C /* SDL_coremotionsensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9CA4212CD0BF0047DF2E /* SDL_coremotionsensor.h */; };
        F3E3C6AB2241389A007D243C /* SDL_main.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587C1595D55500BBD41B /* SDL_main.h */; };
        F3E3C6AC2241389A007D243C /* SDL_mouse.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587D1595D55500BBD41B /* SDL_mouse.h */; };
        F3E3C6AD2241389A007D243C /* SDL_displayevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */; };
        F3E3C6AE2241389A007D243C /* SDL_mutex.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587E1595D55500BBD41B /* SDL_mutex.h */; };
        F3E3C6AF2241389A007D243C /* SDL_name.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75587F1595D55500BBD41B /* SDL_name.h */; };
        F3E3C6B02241389A007D243C /* SDL_opengl.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558801595D55500BBD41B /* SDL_opengl.h */; };
        F3E3C6B12241389A007D243C /* SDL_opengles.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558811595D55500BBD41B /* SDL_opengles.h */; };
        F3E3C6B22241389A007D243C /* SDL_shaders_metal_ios.h in Headers */ = {isa = PBXBuildFile; fileRef = AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */; };
        F3E3C6B32241389A007D243C /* SDL_opengles2.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558821595D55500BBD41B /* SDL_opengles2.h */; };
        F3E3C6B42241389A007D243C /* SDL_pixels.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558831595D55500BBD41B /* SDL_pixels.h */; };
        F3E3C6B52241389A007D243C /* SDL_platform.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558841595D55500BBD41B /* SDL_platform.h */; };
        F3E3C6B62241389A007D243C /* SDL_power.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558851595D55500BBD41B /* SDL_power.h */; };
        F3E3C6B72241389A007D243C /* SDL_quit.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558861595D55500BBD41B /* SDL_quit.h */; };
        F3E3C6B82241389A007D243C /* SDL_rect.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558871595D55500BBD41B /* SDL_rect.h */; };
        F3E3C6B92241389A007D243C /* SDL_render.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558881595D55500BBD41B /* SDL_render.h */; };
        F3E3C6BA2241389A007D243C /* SDL_revision.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558891595D55500BBD41B /* SDL_revision.h */; };
        F3E3C6BB2241389A007D243C /* SDL_rwops.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588A1595D55500BBD41B /* SDL_rwops.h */; };
        F3E3C6BC2241389A007D243C /* SDL_scancode.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588B1595D55500BBD41B /* SDL_scancode.h */; };
        F3E3C6BD2241389A007D243C /* SDL_shape.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588C1595D55500BBD41B /* SDL_shape.h */; };
        F3E3C6BE2241389A007D243C /* SDL_stdinc.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588D1595D55500BBD41B /* SDL_stdinc.h */; };
        F3E3C6BF2241389A007D243C /* SDL_sysjoystick_c.h in Headers */ = {isa = PBXBuildFile; fileRef = FAD4F7011BA3C4E8008346CE /* SDL_sysjoystick_c.h */; };
        F3E3C6C02241389A007D243C /* SDL_surface.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588E1595D55500BBD41B /* SDL_surface.h */; };
        F3E3C6C12241389A007D243C /* SDL_system.h in Headers */ = {isa = PBXBuildFile; fileRef = AA75588F1595D55500BBD41B /* SDL_system.h */; };
        F3E3C6C22241389A007D243C /* SDL_sensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F30D9C98212CD0360047DF2E /* SDL_sensor.h */; };
        F3E3C6C32241389A007D243C /* SDL_syswm.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558901595D55500BBD41B /* SDL_syswm.h */; };
        F3E3C6C42241389A007D243C /* SDL_thread.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558911595D55500BBD41B /* SDL_thread.h */; };
        F3E3C6C52241389A007D243C /* SDL_timer.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558921595D55500BBD41B /* SDL_timer.h */; };
        F3E3C6C62241389A007D243C /* SDL_touch.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558931595D55500BBD41B /* SDL_touch.h */; };
        F3E3C6C72241389A007D243C /* SDL_types.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558941595D55500BBD41B /* SDL_types.h */; };
        F3E3C6C82241389A007D243C /* SDL_version.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558951595D55500BBD41B /* SDL_version.h */; };
        F3E3C6C92241389A007D243C /* SDL_vulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7516FE1EE1C5B400820EEA /* SDL_vulkan.h */; };
        F3E3C6CA2241389A007D243C /* SDL_video.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558961595D55500BBD41B /* SDL_video.h */; };
        F3E3C6CB2241389A007D243C /* SDL.h in Headers */ = {isa = PBXBuildFile; fileRef = AA7558971595D55500BBD41B /* SDL.h */; };
        F3E3C6CC2241389A007D243C /* SDL_uikitvulkan.h in Headers */ = {isa = PBXBuildFile; fileRef = 4D7516F91EE1C28A00820EEA /* SDL_uikitvulkan.h */; };
        F3E3C6CD2241389A007D243C /* SDL_uikitmodes.h in Headers */ = {isa = PBXBuildFile; fileRef = AA126AD21617C5E6005ABC8F /* SDL_uikitmodes.h */; };
        F3E3C6CE2241389A007D243C /* SDL_dropevents_c.h in Headers */ = {isa = PBXBuildFile; fileRef = AA704DD4162AA90A0076D1C1 /* SDL_dropevents_c.h */; };
        F3E3C6CF2241389A007D243C /* SDL_messagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */; };
        F3E3C6D02241389A007D243C /* SDL_uikitmessagebox.h in Headers */ = {isa = PBXBuildFile; fileRef = AABCC3921640643D00AB8930 /* SDL_uikitmessagebox.h */; };
        F3E3C6D12241389A007D243C /* SDL_gamecontroller.h in Headers */ = {isa = PBXBuildFile; fileRef = AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */; };
        F3E3C6D22241389A007D243C /* SDL_dummysensor.h in Headers */ = {isa = PBXBuildFile; fileRef = F36839CA214790950000F255 /* SDL_dummysensor.h */; };
        F3E3C6D32241389A007D243C /* SDL_bits.h in Headers */ = {isa = PBXBuildFile; fileRef = AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */; };
        F3E3C6D42241389A007D243C /* SDL_filesystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 56C181DE17C44D5E00406AE3 /* SDL_filesystem.h */; };
        F3E3C6D62241389A007D243C /* SDL_systimer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA310DD52EDC00FB1D6B /* SDL_systimer.c */; };
        F3E3C6D72241389A007D243C /* SDL_timer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA2E0DD52EDC00FB1D6B /* SDL_timer.c */; };
        F3E3C6D82241389A007D243C /* SDL_coremotionsensor.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CA3212CD0BF0047DF2E /* SDL_coremotionsensor.m */; };
        F3E3C6D92241389A007D243C /* SDL_string.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A750DEA620800C5B771 /* SDL_string.c */; };
        F3E3C6DA2241389A007D243C /* SDL_dummyaudio.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B91D0DD52EDC00FB1D6B /* SDL_dummyaudio.c */; };
        F3E3C6DB2241389A007D243C /* SDL_audio.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9440DD52EDC00FB1D6B /* SDL_audio.c */; };
        F3E3C6DC2241389A007D243C /* SDL_audiocvt.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9460DD52EDC00FB1D6B /* SDL_audiocvt.c */; };
        F3E3C6DD2241389A007D243C /* SDL_audiotypecvt.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B94A0DD52EDC00FB1D6B /* SDL_audiotypecvt.c */; };
        F3E3C6DE2241389A007D243C /* SDL_mixer.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B94B0DD52EDC00FB1D6B /* SDL_mixer.c */; };
        F3E3C6DF2241389A007D243C /* SDL_wave.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9530DD52EDC00FB1D6B /* SDL_wave.c */; };
        F3E3C6E02241389A007D243C /* SDL_uikitvulkan.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516FA1EE1C28A00820EEA /* SDL_uikitvulkan.m */; };
        F3E3C6E12241389A007D243C /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
        F3E3C6E22241389A007D243C /* SDL_cpuinfo.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B98B0DD52EDC00FB1D6B /* SDL_cpuinfo.c */; };
        F3E3C6E32241389A007D243C /* SDL_events.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9930DD52EDC00FB1D6B /* SDL_events.c */; };
        F3E3C6E42241389A007D243C /* SDL_keyboard.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9950DD52EDC00FB1D6B /* SDL_keyboard.c */; };
        F3E3C6E52241389A007D243C /* SDL_dynapi.c in Sources */ = {isa = PBXBuildFile; fileRef = 56A6703318565E760007D20F /* SDL_dynapi.c */; };
        F3E3C6E62241389A007D243C /* SDL_mouse.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9970DD52EDC00FB1D6B /* SDL_mouse.c */; };
        F3E3C6E72241389A007D243C /* SDL_quit.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9990DD52EDC00FB1D6B /* SDL_quit.c */; };
        F3E3C6E82241389A007D243C /* SDL_windowevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99B0DD52EDC00FB1D6B /* SDL_windowevents.c */; };
        F3E3C6E92241389A007D243C /* SDL_uikitmetalview.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D7516F81EE1C28A00820EEA /* SDL_uikitmetalview.m */; };
        F3E3C6EA2241389A007D243C /* SDL_rwops.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B99E0DD52EDC00FB1D6B /* SDL_rwops.c */; };
        F3E3C6EB2241389A007D243C /* hid.m in Sources */ = {isa = PBXBuildFile; fileRef = F30D9CC5212CE92C0047DF2E /* hid.m */; };
        F3E3C6EC2241389A007D243C /* SDL_vulkan_utils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */; };
        F3E3C6ED2241389A007D243C /* SDL_error.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D50DD52EDC00FB1D6B /* SDL_error.c */; };
        F3E3C6EE2241389A007D243C /* SDL.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99B9D80DD52EDC00FB1D6B /* SDL.c */; };
        F3E3C6EF2241389A007D243C /* SDL_syscond.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA070DD52EDC00FB1D6B /* SDL_syscond.c */; };
        F3E3C6F02241389A007D243C /* SDL_render_metal.m in Sources */ = {isa = PBXBuildFile; fileRef = AADC5A621FDA10C800960936 /* SDL_render_metal.m */; };
        F3E3C6F12241389A007D243C /* SDL_sysmutex.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA080DD52EDC00FB1D6B /* SDL_sysmutex.c */; };
        F3E3C6F22241389A007D243C /* SDL_syssem.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA0A0DD52EDC00FB1D6B /* SDL_syssem.c */; };
        F3E3C6F32241389A007D243C /* SDL_systhread.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA0B0DD52EDC00FB1D6B /* SDL_systhread.c */; };
        F3E3C6F42241389A007D243C /* SDL_thread.c in Sources */ = {isa = PBXBuildFile; fileRef = FD99BA150DD52EDC00FB1D6B /* SDL_thread.c */; };
        F3E3C6F52241389A007D243C /* SDL_getenv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A700DEA620800C5B771 /* SDL_getenv.c */; };
        F3E3C6F62241389A007D243C /* SDL_iconv.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A710DEA620800C5B771 /* SDL_iconv.c */; };
        F3E3C6F72241389A007D243C /* SDL_malloc.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A720DEA620800C5B771 /* SDL_malloc.c */; };
        F3E3C6F82241389A007D243C /* SDL_hidapi_xbox360.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */; };
        F3E3C6F92241389A007D243C /* SDL_qsort.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A730DEA620800C5B771 /* SDL_qsort.c */; };
        F3E3C6FA2241389A007D243C /* SDL_hidapi_ps4.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */; };
        F3E3C6FB2241389A007D243C /* SDL_stdlib.c in Sources */ = {isa = PBXBuildFile; fileRef = FD3F4A740DEA620800C5B771 /* SDL_stdlib.c */; };
        F3E3C6FC2241389A007D243C /* SDL_blit.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683000DF2374E00F98A1A /* SDL_blit.c */; };
        F3E3C6FD2241389A007D243C /* SDL_blit_0.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683020DF2374E00F98A1A /* SDL_blit_0.c */; };
        F3E3C6FE2241389A007D243C /* SDL_yuv.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B34F1FB8B3CC00D9FEE6 /* SDL_yuv.c */; };
        F3E3C6FF2241389A007D243C /* SDL_blit_1.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683030DF2374E00F98A1A /* SDL_blit_1.c */; };
        F3E3C7002241389A007D243C /* SDL_dataqueue.c in Sources */ = {isa = PBXBuildFile; fileRef = 566726431DF72CF5001DD3DB /* SDL_dataqueue.c */; };
        F3E3C7012241389A007D243C /* SDL_blit_A.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683040DF2374E00F98A1A /* SDL_blit_A.c */; };
        F3E3C7022241389A007D243C /* SDL_blit_auto.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683050DF2374E00F98A1A /* SDL_blit_auto.c */; };
        F3E3C7032241389A007D243C /* SDL_blit_copy.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683070DF2374E00F98A1A /* SDL_blit_copy.c */; };
        F3E3C7042241389A007D243C /* SDL_blit_N.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683090DF2374E00F98A1A /* SDL_blit_N.c */; };
        F3E3C7052241389A007D243C /* SDL_blit_slow.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830A0DF2374E00F98A1A /* SDL_blit_slow.c */; };
        F3E3C7062241389A007D243C /* SDL_bmp.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830B0DF2374E00F98A1A /* SDL_bmp.c */; };
        F3E3C7072241389A007D243C /* SDL_pixels.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6830F0DF2374E00F98A1A /* SDL_pixels.c */; };
        F3E3C7082241389A007D243C /* SDL_rect.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683110DF2374E00F98A1A /* SDL_rect.c */; };
        F3E3C7092241389A007D243C /* SDL_RLEaccel.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683150DF2374E00F98A1A /* SDL_RLEaccel.c */; };
        F3E3C70A2241389A007D243C /* SDL_stretch.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683170DF2374E00F98A1A /* SDL_stretch.c */; };
        F3E3C70B2241389A007D243C /* SDL_egl.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3471FB8B27800D9FEE6 /* SDL_egl.c */; };
        F3E3C70C2241389A007D243C /* SDL_surface.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA683190DF2374E00F98A1A /* SDL_surface.c */; };
        F3E3C70D2241389A007D243C /* SDL_video.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA6831B0DF2374E00F98A1A /* SDL_video.c */; };
        F3E3C70E2241389A007D243C /* SDL_nullevents.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F50DF244C800F98A1A /* SDL_nullevents.c */; };
        F3E3C70F2241389A007D243C /* SDL_nullvideo.c in Sources */ = {isa = PBXBuildFile; fileRef = FDA685F90DF244C800F98A1A /* SDL_nullvideo.c */; };
        F3E3C7102241389A007D243C /* SDL_joystick.c in Sources */ = {isa = PBXBuildFile; fileRef = FD5F9D1E0E0E08B3008E885B /* SDL_joystick.c */; };
        F3E3C7112241389A007D243C /* SDL_sysjoystick.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F000E26E5B600F90B21 /* SDL_sysjoystick.m */; };
        F3E3C7122241389A007D243C /* SDL_uikitevents.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F0D0E26E5D900F90B21 /* SDL_uikitevents.m */; };
        F3E3C7132241389A007D243C /* yuv_rgb.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3561FB8B46300D9FEE6 /* yuv_rgb.c */; };
        F3E3C7142241389A007D243C /* SDL_uikitopengles.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F0F0E26E5D900F90B21 /* SDL_uikitopengles.m */; };
        F3E3C7162241389A007D243C /* SDL_uikitvideo.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F110E26E5D900F90B21 /* SDL_uikitvideo.m */; };
        F3E3C7172241389A007D243C /* SDL_uikitview.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F130E26E5D900F90B21 /* SDL_uikitview.m */; };
        F3E3C7182241389A007D243C /* SDL_displayevents.c in Sources */ = {isa = PBXBuildFile; fileRef = A7C19D28212E552B00DF2152 /* SDL_displayevents.c */; };
        F3E3C7192241389A007D243C /* SDL_uikitwindow.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F150E26E5D900F90B21 /* SDL_uikitwindow.m */; };
        F3E3C71A2241389A007D243C /* SDL_uikitopenglview.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689F170E26E5D900F90B21 /* SDL_uikitopenglview.m */; };
        F3E3C71B2241389A007D243C /* SDL_uikitappdelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = FD689FCC0E26E9D400F90B21 /* SDL_uikitappdelegate.m */; };
        F3E3C71C2241389A007D243C /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = FD8BD8190E27E25900B52CD5 /* SDL_sysloadso.c */; };
        F3E3C71D2241389A007D243C /* SDL_hidapijoystick.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */; };
        F3E3C71E2241389A007D243C /* SDL_syshaptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B80EA76A31008ABAF1 /* SDL_syshaptic.c */; };
        F3E3C71F2241389A007D243C /* SDL_haptic.c in Sources */ = {isa = PBXBuildFile; fileRef = 047677B90EA76A31008ABAF1 /* SDL_haptic.c */; };
        F3E3C7202241389A007D243C /* SDL_sysloadso.c in Sources */ = {isa = PBXBuildFile; fileRef = 047AF1B20EA98D6C00811173 /* SDL_sysloadso.c */; };
        F3E3C7212241389A007D243C /* SDL_fillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 0463873E0F0B5B7D0041FD65 /* SDL_fillrect.c */; };
        F3E3C7222241389A007D243C /* SDL_assert.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F2AF551104ABD200D6DDF7 /* SDL_assert.c */; };
        F3E3C7232241389A007D243C /* SDL_hidapi_xboxone.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */; };
        F3E3C7242241389A007D243C /* SDL_power.c in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E0118A8EE200A56AA6 /* SDL_power.c */; };
        F3E3C7252241389A007D243C /* SDL_syspower.m in Sources */ = {isa = PBXBuildFile; fileRef = 56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */; };
        F3E3C7262241389A007D243C /* SDL_rwopsbundlesupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 006E9887119552DD001DE610 /* SDL_rwopsbundlesupport.m */; };
        F3E3C7272241389A007D243C /* SDL_clipboard.c in Sources */ = {isa = PBXBuildFile; fileRef = 044E5FB711E606EB0076F181 /* SDL_clipboard.c */; };
        F3E3C7282241389A007D243C /* SDL_clipboardevents.c in Sources */ = {isa = PBXBuildFile; fileRef = 0420496F11E6F03D007E7EC9 /* SDL_clipboardevents.c */; };
        F3E3C7292241389A007D243C /* SDL_gesture.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6011EF474A00B60E01 /* SDL_gesture.c */; };
        F3E3C72A2241389A007D243C /* SDL_touch.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BA9D6211EF474A00B60E01 /* SDL_touch.c */; };
        F3E3C72B2241389A007D243C /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
        F3E3C72C2241389A007D243C /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
        F3E3C72D2241389A007D243C /* SDL_render.c in Sources */ = {isa = PBXBuildFile; fileRef = 041B2CEA12FA0F680087D585 /* SDL_render.c */; };
        F3E3C72E2241389A007D243C /* SDL_yuv_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 04409BA512FA989600FB9AA8 /* SDL_yuv_sw.c */; };
        F3E3C72F2241389A007D243C /* SDL_blendfillrect.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806A12FB751400FC43C0 /* SDL_blendfillrect.c */; };
        F3E3C7302241389A007D243C /* SDL_blendline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806C12FB751400FC43C0 /* SDL_blendline.c */; };
        F3E3C7312241389A007D243C /* SDL_blendpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7806E12FB751400FC43C0 /* SDL_blendpoint.c */; };
        F3E3C7322241389A007D243C /* SDL_drawline.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7807112FB751400FC43C0 /* SDL_drawline.c */; };
        F3E3C7332241389A007D243C /* SDL_drawpoint.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7807312FB751400FC43C0 /* SDL_drawpoint.c */; };
        F3E3C7342241389A007D243C /* SDL_nullframebuffer.c in Sources */ = {isa = PBXBuildFile; fileRef = 04F7808312FB753F00FC43C0 /* SDL_nullframebuffer.c */; };
        F3E3C7352241389A007D243C /* SDL_render_sw.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC4F12FE1C1E004C9285 /* SDL_render_sw.c */; };
        F3E3C7362241389A007D243C /* SDL_render_gles.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5212FE1C28004C9285 /* SDL_render_gles.c */; };
        F3E3C7372241389A007D243C /* SDL_hints.c in Sources */ = {isa = PBXBuildFile; fileRef = 0442EC5412FE1C3F004C9285 /* SDL_hints.c */; };
        F3E3C7382241389A007D243C /* SDL_shape.c in Sources */ = {isa = PBXBuildFile; fileRef = AA13B3441FB8B27800D9FEE6 /* SDL_shape.c */; };
        F3E3C7392241389A007D243C /* SDL_render_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85512FE70C600CECEE3 /* SDL_render_gles2.c */; };
        F3E3C73A2241389A007D243C /* SDL_dummysensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F36839CB214790950000F255 /* SDL_dummysensor.c */; };
        F3E3C73B2241389A007D243C /* SDL_shaders_gles2.c in Sources */ = {isa = PBXBuildFile; fileRef = 0402A85612FE70C600CECEE3 /* SDL_shaders_gles2.c */; };
        F3E3C73C2241389A007D243C /* SDL_log.c in Sources */ = {isa = PBXBuildFile; fileRef = 04BAC09B1300C1290055DE28 /* SDL_log.c */; };
        F3E3C73D2241389A007D243C /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */; };
        F3E3C73E2241389A007D243C /* SDL_sensor.c in Sources */ = {isa = PBXBuildFile; fileRef = F30D9C9D212CD0990047DF2E /* SDL_sensor.c */; };
        F3E3C73F2241389A007D243C /* SDL_hidapi_switch.c in Sources */ = {isa = PBXBuildFile; fileRef = F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */; };
        F3E3C7402241389A007D243C /* SDL_uikitviewcontroller.m in Sources */ = {isa = PBXBuildFile; fileRef = 93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */; };
        F3E3C7412241389A007D243C /* SDL_rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = AA628AD9159369E3005138DD /* SDL_rotate.c */; };
        F3E3C7422241389A007D243C /* SDL_uikitmodes.m in Sources */ = {isa = PBXBuildFile; fileRef = AA126AD31617C5E6005ABC8F /* SDL_uikitmodes.m */; };
        F3E3C7432241389A007D243C /* SDL_dropevents.c in Sources */ = {isa = PBXBuildFile; fileRef = AA704DD5162AA90A0076D1C1 /* SDL_dropevents.c */; };
        F3E3C7442241389A007D243C /* SDL_uikitmessagebox.m in Sources */ = {isa = PBXBuildFile; fileRef = AABCC3931640643D00AB8930 /* SDL_uikitmessagebox.m */; };
        F3E3C7452241389A007D243C /* SDL_gamecontroller.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */; };
        F3E3C7462241389A007D243C /* SDL_systls.c in Sources */ = {isa = PBXBuildFile; fileRef = AA0F8494178D5F1A00823F9D /* SDL_systls.c */; };
        F3E3C7472241389A007D243C /* SDL_sysfilesystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 56C181E117C44D7A00406AE3 /* SDL_sysfilesystem.m */; };
        F3E3C7492241389A007D243C /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7F22288BFA0061FCE0 /* OpenGLES.framework */; };
        F3E3C74A2241389A007D243C /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7D22288BF00061FCE0 /* Metal.framework */; };
        F3E3C74C2241389A007D243C /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7922288BDD0061FCE0 /* GameController.framework */; };
        F3E3C74D2241389A007D243C /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7722288BCA0061FCE0 /* UIKit.framework */; };
        F3E3C74E2241389A007D243C /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7522288BC10061FCE0 /* CoreGraphics.framework */; };
        F3E3C74F2241389A007D243C /* CoreBluetooth.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7322288BB70061FCE0 /* CoreBluetooth.framework */; };
        F3E3C7502241389A007D243C /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E7122288BAC0061FCE0 /* AVFoundation.framework */; };
        F3E3C7512241389A007D243C /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6F22288BA20061FCE0 /* AudioToolbox.framework */; };
        F3E3C7522241389A007D243C /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6D22288B960061FCE0 /* CoreAudio.framework */; };
        F3E3C7532241389A007D243C /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 52ED1E6B22288B8C0061FCE0 /* QuartzCore.framework */; };
        F3E3C75B224138AE007D243C /* SDL_uikit_main.c in Sources */ = {isa = PBXBuildFile; fileRef = F3E3C657224069CE007D243C /* SDL_uikit_main.c */; };
        FA1DC2721C62BE65008F99A0 /* SDL_uikitclipboard.h in Headers */ = {isa = PBXBuildFile; fileRef = FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */; };
        FA1DC2731C62BE65008F99A0 /* SDL_uikitclipboard.m in Sources */ = {isa = PBXBuildFile; fileRef = FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */; };
        FA24348D21D4201400B8918A /* SDL_metal.h in Headers */ = {isa = PBXBuildFile; fileRef = FA24348C21D4201400B8918A /* SDL_metal.h */; };
        FAB5981D1BB5C31500BE72C5 /* SDL_atomic.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8912E23B8D00BA343D /* SDL_atomic.c */; };
        FAB5981E1BB5C31500BE72C5 /* SDL_spinlock.c in Sources */ = {isa = PBXBuildFile; fileRef = 04FFAB8A12E23B8D00BA343D /* SDL_spinlock.c */; };
        FAB5981F1BB5C31500BE72C5 /* SDL_coreaudio.m in Sources */ = {isa = PBXBuildFile; fileRef = 56EA86F913E9EC2B002E47EB /* SDL_coreaudio.m */; };
@@ -443,6 +960,18 @@
        4D7517191EE1D32200820EEA /* SDL_uikitmetalview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitmetalview.h; sourceTree = "<group>"; };
        4D75171D1EE1D98200820EEA /* SDL_vulkan_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_vulkan_internal.h; sourceTree = "<group>"; };
        4D75171E1EE1D98200820EEA /* SDL_vulkan_utils.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_vulkan_utils.c; sourceTree = "<group>"; };
        52ED1E5C222889500061FCE0 /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
        52ED1E6B22288B8C0061FCE0 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
        52ED1E6D22288B960061FCE0 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
        52ED1E6F22288BA20061FCE0 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
        52ED1E7122288BAC0061FCE0 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
        52ED1E7322288BB70061FCE0 /* CoreBluetooth.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreBluetooth.framework; path = System/Library/Frameworks/CoreBluetooth.framework; sourceTree = SDKROOT; };
        52ED1E7522288BC10061FCE0 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
        52ED1E7722288BCA0061FCE0 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
        52ED1E7922288BDD0061FCE0 /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
        52ED1E7B22288BE70061FCE0 /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
        52ED1E7D22288BF00061FCE0 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
        52ED1E7F22288BFA0061FCE0 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
        55FFA9192122302B00D7CBED /* SDL_syspower.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_syspower.h; sourceTree = "<group>"; };
        566726431DF72CF5001DD3DB /* SDL_dataqueue.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_dataqueue.c; sourceTree = "<group>"; };
        566726441DF72CF5001DD3DB /* SDL_dataqueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_dataqueue.h; sourceTree = "<group>"; };
@@ -457,11 +986,17 @@
        56EA86FA13E9EC2B002E47EB /* SDL_coreaudio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_coreaudio.h; sourceTree = "<group>"; };
        56ED04E0118A8EE200A56AA6 /* SDL_power.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_power.c; sourceTree = "<group>"; };
        56ED04E2118A8EFD00A56AA6 /* SDL_syspower.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_syspower.m; sourceTree = "<group>"; };
        63CC93C623849391002A5C54 /* SDL_strtokr.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_strtokr.c; sourceTree = "<group>"; };
        93CB792213FC5E5200BD3E05 /* SDL_uikitviewcontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitviewcontroller.h; sourceTree = "<group>"; };
        93CB792513FC5F5300BD3E05 /* SDL_uikitviewcontroller.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitviewcontroller.m; sourceTree = "<group>"; };
        A704172D20F7E74800A82227 /* controller_type.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = controller_type.h; sourceTree = "<group>"; };
        A704173020F7F39400A82227 /* SDL_hidapi_steam.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_steam.c; sourceTree = "<group>"; };
        A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_rumble.c; sourceTree = "<group>"; };
        A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapi_rumble.h; sourceTree = "<group>"; };
        A7C19D27212E552B00DF2152 /* SDL_displayevents_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_displayevents_c.h; sourceTree = "<group>"; };
        A7C19D28212E552B00DF2152 /* SDL_displayevents.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_displayevents.c; sourceTree = "<group>"; };
        A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_gamecube.c; sourceTree = "<group>"; };
        A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_xbox360w.c; sourceTree = "<group>"; };
        AA0AD06116647BBB00CE5896 /* SDL_gamecontroller.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_gamecontroller.c; sourceTree = "<group>"; };
        AA0AD06416647BD400CE5896 /* SDL_gamecontroller.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_gamecontroller.h; sourceTree = "<group>"; };
        AA0F8494178D5F1A00823F9D /* SDL_systls.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_systls.c; sourceTree = "<group>"; };
@@ -553,8 +1088,14 @@
        F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapi_ps4.c; sourceTree = "<group>"; };
        F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_hidapijoystick_c.h; sourceTree = "<group>"; };
        F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_hidapijoystick.c; sourceTree = "<group>"; };
        F3E3C65222406928007D243C /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
        F3E3C657224069CE007D243C /* SDL_uikit_main.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = SDL_uikit_main.c; sourceTree = "<group>"; };
        F3E3C7572241389A007D243C /* libSDL2.dylib */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
        F3E3C75F224138AE007D243C /* libSDLmain.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDLmain.a; sourceTree = BUILT_PRODUCTS_DIR; };
        FA1DC2701C62BE65008F99A0 /* SDL_uikitclipboard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitclipboard.h; sourceTree = "<group>"; };
        FA1DC2711C62BE65008F99A0 /* SDL_uikitclipboard.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDL_uikitclipboard.m; sourceTree = "<group>"; };
        FA20874D2307894C0029758C /* SDL_shaders_metal_tvos.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDL_shaders_metal_tvos.h; sourceTree = "<group>"; };
        FA24348C21D4201400B8918A /* SDL_metal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_metal.h; sourceTree = "<group>"; };
        FAB598141BB5C1B100BE72C5 /* libSDL2.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libSDL2.a; sourceTree = BUILT_PRODUCTS_DIR; };
        FAD4F7011BA3C4E8008346CE /* SDL_sysjoystick_c.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_sysjoystick_c.h; sourceTree = "<group>"; };
        FD0BBFEF0E3933DD00D833B1 /* SDL_uikitview.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_uikitview.h; sourceTree = "<group>"; };
@@ -652,6 +1193,44 @@
        FDA685FA0DF244C800F98A1A /* SDL_nullvideo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDL_nullvideo.h; sourceTree = "<group>"; };
        FDC261780E3A3FC8001C4554 /* keyinfotable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = keyinfotable.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
        52ED1E6922288B720061FCE0 /* Frameworks */ = {
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                52ED1E8022288BFA0061FCE0 /* OpenGLES.framework in Frameworks */,
                52ED1E7E22288BF00061FCE0 /* Metal.framework in Frameworks */,
                52ED1E7C22288BE70061FCE0 /* CoreMotion.framework in Frameworks */,
                52ED1E7A22288BDD0061FCE0 /* GameController.framework in Frameworks */,
                52ED1E7822288BCA0061FCE0 /* UIKit.framework in Frameworks */,
                52ED1E7622288BC10061FCE0 /* CoreGraphics.framework in Frameworks */,
                52ED1E7422288BB70061FCE0 /* CoreBluetooth.framework in Frameworks */,
                52ED1E7222288BAC0061FCE0 /* AVFoundation.framework in Frameworks */,
                52ED1E7022288BA20061FCE0 /* AudioToolbox.framework in Frameworks */,
                52ED1E6E22288B960061FCE0 /* CoreAudio.framework in Frameworks */,
                52ED1E6C22288B8C0061FCE0 /* QuartzCore.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        F3E3C7482241389A007D243C /* Frameworks */ = {
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                F3E3C7492241389A007D243C /* OpenGLES.framework in Frameworks */,
                F3E3C74A2241389A007D243C /* Metal.framework in Frameworks */,
                F3E3C74C2241389A007D243C /* GameController.framework in Frameworks */,
                F3E3C74D2241389A007D243C /* UIKit.framework in Frameworks */,
                F3E3C74E2241389A007D243C /* CoreGraphics.framework in Frameworks */,
                F3E3C74F2241389A007D243C /* CoreBluetooth.framework in Frameworks */,
                F3E3C7502241389A007D243C /* AVFoundation.framework in Frameworks */,
                F3E3C7512241389A007D243C /* AudioToolbox.framework in Frameworks */,
                F3E3C7522241389A007D243C /* CoreAudio.framework in Frameworks */,
                F3E3C7532241389A007D243C /* QuartzCore.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
        006E9885119552DD001DE610 /* cocoa */ = {
@@ -758,6 +1337,10 @@
            children = (
                FD6526630DE8FCCB002AD96B /* libSDL2.a */,
                FAB598141BB5C1B100BE72C5 /* libSDL2.a */,
                52ED1E5C222889500061FCE0 /* libSDL2.dylib */,
                F3E3C65222406928007D243C /* libSDLmain.a */,
                F3E3C7572241389A007D243C /* libSDL2.dylib */,
                F3E3C75F224138AE007D243C /* libSDLmain.a */,
            );
            name = Products;
            sourceTree = "<group>";
@@ -768,10 +1351,29 @@
                FD99B8BC0DD52E5C00FB1D6B /* Public Headers */,
                FD99B8BD0DD52E6D00FB1D6B /* Library Source */,
                19C28FACFE9D520D11CA2CBB /* Products */,
                52ED1E6A22288B8C0061FCE0 /* Frameworks */,
            );
            name = CustomTemplate;
            sourceTree = "<group>";
            usesTabs = 0;
        };
        52ED1E6A22288B8C0061FCE0 /* Frameworks */ = {
            isa = PBXGroup;
            children = (
                52ED1E7F22288BFA0061FCE0 /* OpenGLES.framework */,
                52ED1E7D22288BF00061FCE0 /* Metal.framework */,
                52ED1E7B22288BE70061FCE0 /* CoreMotion.framework */,
                52ED1E7922288BDD0061FCE0 /* GameController.framework */,
                52ED1E7722288BCA0061FCE0 /* UIKit.framework */,
                52ED1E7522288BC10061FCE0 /* CoreGraphics.framework */,
                52ED1E7322288BB70061FCE0 /* CoreBluetooth.framework */,
                52ED1E7122288BAC0061FCE0 /* AVFoundation.framework */,
                52ED1E6F22288BA20061FCE0 /* AudioToolbox.framework */,
                52ED1E6D22288B960061FCE0 /* CoreAudio.framework */,
                52ED1E6B22288B8C0061FCE0 /* QuartzCore.framework */,
            );
            name = Frameworks;
            sourceTree = "<group>";
        };
        56A6702F18565E4F0007D20F /* dynapi */ = {
            isa = PBXGroup;
@@ -835,6 +1437,7 @@
            children = (
                AADC5A621FDA10C800960936 /* SDL_render_metal.m */,
                AADC5A611FDA10C800960936 /* SDL_shaders_metal_ios.h */,
                FA20874D2307894C0029758C /* SDL_shaders_metal_tvos.h */,
            );
            path = metal;
            sourceTree = "<group>";
@@ -888,9 +1491,14 @@
        F3BDD78A20F51C8D004ECBF3 /* hidapi */ = {
            isa = PBXGroup;
            children = (
                A7FF6B6123AC3BC6005876C6 /* SDL_hidapi_gamecube.c */,
                F3BDD78E20F51CB8004ECBF3 /* SDL_hidapi_ps4.c */,
                A75FDBD723EA38AD00529352 /* SDL_hidapi_rumble.c */,
                A75FDBD823EA38AD00529352 /* SDL_hidapi_rumble.h */,
                A704173020F7F39400A82227 /* SDL_hidapi_steam.c */,
                F3BDD78C20F51CB8004ECBF3 /* SDL_hidapi_switch.c */,
                F3BDD78B20F51CB8004ECBF3 /* SDL_hidapi_xbox360.c */,
                A7FF6B6623AC3BCD005876C6 /* SDL_hidapi_xbox360w.c */,
                F3BDD78D20F51CB8004ECBF3 /* SDL_hidapi_xboxone.c */,
                F3BDD79020F51CB8004ECBF3 /* SDL_hidapijoystick_c.h */,
                F3BDD79120F51CB8004ECBF3 /* SDL_hidapijoystick.c */,
@@ -898,9 +1506,26 @@
            path = hidapi;
            sourceTree = "<group>";
        };
        F3E3C65322406963007D243C /* main */ = {
            isa = PBXGroup;
            children = (
                F3E3C656224069A1007D243C /* uikit */,
            );
            path = main;
            sourceTree = "<group>";
        };
        F3E3C656224069A1007D243C /* uikit */ = {
            isa = PBXGroup;
            children = (
                F3E3C657224069CE007D243C /* SDL_uikit_main.c */,
            );
            path = uikit;
            sourceTree = "<group>";
        };
        FD3F4A6F0DEA620800C5B771 /* stdlib */ = {
            isa = PBXGroup;
            children = (
                63CC93C623849391002A5C54 /* SDL_strtokr.c */,
                FD3F4A700DEA620800C5B771 /* SDL_getenv.c */,
                FD3F4A710DEA620800C5B771 /* SDL_iconv.c */,
                FD3F4A720DEA620800C5B771 /* SDL_malloc.c */,
@@ -990,15 +1615,14 @@
            children = (
                AA7558651595D55500BBD41B /* begin_code.h */,
                AA7558661595D55500BBD41B /* close_code.h */,
                AA7558971595D55500BBD41B /* SDL.h */,
                AA7558671595D55500BBD41B /* SDL_assert.h */,
                AA7558681595D55500BBD41B /* SDL_atomic.h */,
                AA7558691595D55500BBD41B /* SDL_audio.h */,
                AADA5B8E16CCAB7C00107CF7 /* SDL_bits.h */,
                AA75586A1595D55500BBD41B /* SDL_blendmode.h */,
                AA75586B1595D55500BBD41B /* SDL_clipboard.h */,
                AA75586D1595D55500BBD41B /* SDL_config.h */,
                AA75586C1595D55500BBD41B /* SDL_config_iphoneos.h */,
                AA75586D1595D55500BBD41B /* SDL_config.h */,
                AA75586E1595D55500BBD41B /* SDL_copying.h */,
                AA75586F1595D55500BBD41B /* SDL_cpuinfo.h */,
                AA7558701595D55500BBD41B /* SDL_endian.h */,
@@ -1016,6 +1640,7 @@
                AA75587B1595D55500BBD41B /* SDL_log.h */,
                AA75587C1595D55500BBD41B /* SDL_main.h */,
                AA9FF9501637C6E5000DF050 /* SDL_messagebox.h */,
                FA24348C21D4201400B8918A /* SDL_metal.h */,
                AA75587D1595D55500BBD41B /* SDL_mouse.h */,
                AA75587E1595D55500BBD41B /* SDL_mutex.h */,
                AA75587F1595D55500BBD41B /* SDL_name.h */,
@@ -1044,6 +1669,7 @@
                AA7558951595D55500BBD41B /* SDL_version.h */,
                AA7558961595D55500BBD41B /* SDL_video.h */,
                4D7516FE1EE1C5B400820EEA /* SDL_vulkan.h */,
                AA7558971595D55500BBD41B /* SDL.h */,
            );
            name = "Public Headers";
            path = ../../include;
@@ -1063,6 +1689,7 @@
                F35CEA6E20F51B7F003ECE98 /* hidapi */,
                FD5F9D080E0E08B3008E885B /* joystick */,
                FD8BD8150E27E25900B52CD5 /* loadso */,
                F3E3C65322406963007D243C /* main */,
                56ED04DE118A8E9A00A56AA6 /* power */,
                041B2CE312FA0F680087D585 /* render */,
                F30D9C9A212CD0590047DF2E /* sensor */,
@@ -1262,6 +1889,280 @@
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
        52ED1D6C222889500061FCE0 /* Headers */ = {
            isa = PBXHeadersBuildPhase;
            buildActionMask = 2147483647;
            files = (
                52ED1D6D222889500061FCE0 /* SDL_blit.h in Headers */,
                52ED1D6E222889500061FCE0 /* SDL_uikitmetalview.h in Headers */,
                52ED1D6F222889500061FCE0 /* SDL_vulkan_internal.h in Headers */,
                52ED1D70222889500061FCE0 /* SDL_blit_auto.h in Headers */,
                52ED1D71222889500061FCE0 /* SDL_blit_copy.h in Headers */,
                52ED1D72222889500061FCE0 /* SDL_pixels_c.h in Headers */,
                52ED1D73222889500061FCE0 /* SDL_dynapi_procs.h in Headers */,
                52ED1D74222889500061FCE0 /* SDL_RLEaccel_c.h in Headers */,
                52ED1D75222889500061FCE0 /* SDL_sysvideo.h in Headers */,
                52ED1D76222889500061FCE0 /* SDL_nullevents_c.h in Headers */,
                52ED1D77222889500061FCE0 /* SDL_nullvideo.h in Headers */,
                52ED1D78222889500061FCE0 /* SDL_joystick_c.h in Headers */,
                52ED1D79222889500061FCE0 /* SDL_sysjoystick.h in Headers */,
                52ED1D7A222889500061FCE0 /* SDL_uikitevents.h in Headers */,
                52ED1D7B222889500061FCE0 /* SDL_uikitopengles.h in Headers */,
                52ED1D7C222889500061FCE0 /* SDL_uikitvideo.h in Headers */,
                52ED1D7D222889500061FCE0 /* SDL_uikitwindow.h in Headers */,
                52ED1D7E222889500061FCE0 /* SDL_uikitopenglview.h in Headers */,
                52ED1D7F222889500061FCE0 /* SDL_dynapi.h in Headers */,
                52ED1D80222889500061FCE0 /* SDL_uikitappdelegate.h in Headers */,
                52ED1D81222889500061FCE0 /* SDL_dynapi_overrides.h in Headers */,
                52ED1D82222889500061FCE0 /* yuv_rgb_std_func.h in Headers */,
                52ED1D83222889500061FCE0 /* SDL_syshaptic.h in Headers */,
                52ED1D84222889500061FCE0 /* SDL_blit_slow.h in Headers */,
                52ED1D85222889500061FCE0 /* SDL_rwopsbundlesupport.h in Headers */,
                52ED1D86222889500061FCE0 /* SDL_clipboardevents_c.h in Headers */,
                52ED1D87222889500061FCE0 /* SDL_rect_c.h in Headers */,
                52ED1D88222889500061FCE0 /* yuv_rgb_sse_func.h in Headers */,
                52ED1D89222889500061FCE0 /* SDL_gesture_c.h in Headers */,
                52ED1D8A222889500061FCE0 /* SDL_touch_c.h in Headers */,
                52ED1D8B222889500061FCE0 /* SDL_sysrender.h in Headers */,
                52ED1D8C222889500061FCE0 /* SDL_yuv_sw_c.h in Headers */,
                52ED1D8D222889500061FCE0 /* yuv_rgb.h in Headers */,
                52ED1D8E222889500061FCE0 /* SDL_blendfillrect.h in Headers */,
                52ED1D8F222889500061FCE0 /* SDL_blendline.h in Headers */,
                52ED1D90222889500061FCE0 /* SDL_hidapijoystick_c.h in Headers */,
                52ED1D91222889500061FCE0 /* SDL_blendpoint.h in Headers */,
                52ED1D92222889500061FCE0 /* SDL_draw.h in Headers */,
                52ED1D93222889500061FCE0 /* SDL_drawline.h in Headers */,
                52ED1D94222889500061FCE0 /* SDL_yuv_c.h in Headers */,
                52ED1D95222889500061FCE0 /* SDL_drawpoint.h in Headers */,
                52ED1D96222889500061FCE0 /* SDL_nullframebuffer_c.h in Headers */,
                52ED1D97222889500061FCE0 /* SDL_render_sw_c.h in Headers */,
                52ED1D98222889500061FCE0 /* SDL_uikitclipboard.h in Headers */,
                52ED1D99222889500061FCE0 /* SDL_shaders_gles2.h in Headers */,
                52ED1D9A222889500061FCE0 /* SDL_assert_c.h in Headers */,
                52ED1D9B222889500061FCE0 /* SDL_coreaudio.h in Headers */,
                52ED1D9C222889500061FCE0 /* SDL_uikitviewcontroller.h in Headers */,
                52ED1D9D222889500061FCE0 /* SDL_rotate.h in Headers */,
                52ED1D9E222889500061FCE0 /* begin_code.h in Headers */,
                52ED1D9F222889500061FCE0 /* close_code.h in Headers */,
                52ED1DA0222889500061FCE0 /* SDL_assert.h in Headers */,
                52ED1DA1222889500061FCE0 /* SDL_atomic.h in Headers */,
                52ED1DA2222889500061FCE0 /* SDL_audio.h in Headers */,
                52ED1DA3222889500061FCE0 /* SDL_syspower.h in Headers */,
                52ED1DA4222889500061FCE0 /* SDL_blendmode.h in Headers */,
                52ED1DA5222889500061FCE0 /* SDL_sensor_c.h in Headers */,
                52ED1DA6222889500061FCE0 /* SDL_clipboard.h in Headers */,
                52ED1DA7222889500061FCE0 /* SDL_config_iphoneos.h in Headers */,
                52ED1DA8222889500061FCE0 /* SDL_config.h in Headers */,
                52ED1DA9222889500061FCE0 /* SDL_copying.h in Headers */,
                52ED1DAA222889500061FCE0 /* SDL_egl_c.h in Headers */,
                52ED1DAB222889500061FCE0 /* SDL_cpuinfo.h in Headers */,
                52ED1DAC222889500061FCE0 /* SDL_endian.h in Headers */,
                52ED1DAD222889500061FCE0 /* SDL_error.h in Headers */,
                52ED1DAE222889500061FCE0 /* SDL_internal.h in Headers */,
                52ED1DAF222889500061FCE0 /* SDL_events.h in Headers */,
                52ED1DB0222889500061FCE0 /* SDL_gesture.h in Headers */,
                52ED1DB1222889500061FCE0 /* SDL_haptic.h in Headers */,
                52ED1DB2222889500061FCE0 /* SDL_hints.h in Headers */,
                52ED1DB3222889500061FCE0 /* SDL_dataqueue.h in Headers */,
                52ED1DB4222889500061FCE0 /* SDL_syssensor.h in Headers */,
                52ED1DB5222889500061FCE0 /* SDL_joystick.h in Headers */,
                52ED1DB6222889500061FCE0 /* SDL_shape_internals.h in Headers */,
                52ED1DB7222889500061FCE0 /* SDL_keyboard.h in Headers */,
                52ED1DB8222889500061FCE0 /* controller_type.h in Headers */,
                52ED1DB9222889500061FCE0 /* SDL_keycode.h in Headers */,
                52ED1DBA222889500061FCE0 /* SDL_loadso.h in Headers */,
                52ED1DBB222889500061FCE0 /* SDL_log.h in Headers */,
                52ED1DBC222889500061FCE0 /* SDL_coremotionsensor.h in Headers */,
                52ED1DBD222889500061FCE0 /* SDL_main.h in Headers */,
                52ED1DBE222889500061FCE0 /* SDL_mouse.h in Headers */,
                52ED1DBF222889500061FCE0 /* SDL_displayevents_c.h in Headers */,
                52ED1DC0222889500061FCE0 /* SDL_mutex.h in Headers */,
                52ED1DC1222889500061FCE0 /* SDL_name.h in Headers */,
                52ED1DC2222889500061FCE0 /* SDL_opengl.h in Headers */,
                52ED1DC3222889500061FCE0 /* SDL_opengles.h in Headers */,
                52ED1DC4222889500061FCE0 /* SDL_shaders_metal_ios.h in Headers */,
                52ED1DC5222889500061FCE0 /* SDL_opengles2.h in Headers */,
                52ED1DC6222889500061FCE0 /* SDL_pixels.h in Headers */,
                52ED1DC7222889500061FCE0 /* SDL_platform.h in Headers */,
                52ED1DC8222889500061FCE0 /* SDL_power.h in Headers */,
                52ED1DC9222889500061FCE0 /* SDL_quit.h in Headers */,
                52ED1DCA222889500061FCE0 /* SDL_rect.h in Headers */,
                52ED1DCB222889500061FCE0 /* SDL_render.h in Headers */,
                52ED1DCC222889500061FCE0 /* SDL_revision.h in Headers */,
                52ED1DCD222889500061FCE0 /* SDL_rwops.h in Headers */,
                52ED1DCE222889500061FCE0 /* SDL_scancode.h in Headers */,
                52ED1DCF222889500061FCE0 /* SDL_shape.h in Headers */,
                52ED1DD0222889500061FCE0 /* SDL_stdinc.h in Headers */,
                52ED1DD1222889500061FCE0 /* SDL_sysjoystick_c.h in Headers */,
                52ED1DD2222889500061FCE0 /* SDL_surface.h in Headers */,
                52ED1DD3222889500061FCE0 /* SDL_system.h in Headers */,
                52ED1DD4222889500061FCE0 /* SDL_sensor.h in Headers */,
                52ED1DD5222889500061FCE0 /* SDL_syswm.h in Headers */,
                52ED1DD6222889500061FCE0 /* SDL_thread.h in Headers */,
                52ED1DD7222889500061FCE0 /* SDL_timer.h in Headers */,
                A75FDBDE23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
                52ED1DD8222889500061FCE0 /* SDL_touch.h in Headers */,
                52ED1DD9222889500061FCE0 /* SDL_types.h in Headers */,
                52ED1DDA222889500061FCE0 /* SDL_version.h in Headers */,
                52ED1DDB222889500061FCE0 /* SDL_vulkan.h in Headers */,
                52ED1DDC222889500061FCE0 /* SDL_video.h in Headers */,
                52ED1DDD222889500061FCE0 /* SDL.h in Headers */,
                52ED1DDE222889500061FCE0 /* SDL_uikitvulkan.h in Headers */,
                52ED1DDF222889500061FCE0 /* SDL_uikitmodes.h in Headers */,
                52ED1DE0222889500061FCE0 /* SDL_dropevents_c.h in Headers */,
                52ED1DE1222889500061FCE0 /* SDL_messagebox.h in Headers */,
                52ED1DE2222889500061FCE0 /* SDL_uikitmessagebox.h in Headers */,
                52ED1DE3222889500061FCE0 /* SDL_gamecontroller.h in Headers */,
                52ED1DE4222889500061FCE0 /* SDL_dummysensor.h in Headers */,
                52ED1DE5222889500061FCE0 /* SDL_bits.h in Headers */,
                52ED1DE6222889500061FCE0 /* SDL_filesystem.h in Headers */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        F3E3C56122406928007D243C /* Headers */ = {
            isa = PBXHeadersBuildPhase;
            buildActionMask = 2147483647;
            files = (
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        F3E3C65A2241389A007D243C /* Headers */ = {
            isa = PBXHeadersBuildPhase;
            buildActionMask = 2147483647;
            files = (
                F3E3C65B2241389A007D243C /* SDL_blit.h in Headers */,
                F3E3C65C2241389A007D243C /* SDL_uikitmetalview.h in Headers */,
                F3E3C65D2241389A007D243C /* SDL_vulkan_internal.h in Headers */,
                F3E3C65E2241389A007D243C /* SDL_blit_auto.h in Headers */,
                F3E3C65F2241389A007D243C /* SDL_blit_copy.h in Headers */,
                F3E3C6602241389A007D243C /* SDL_pixels_c.h in Headers */,
                F3E3C6612241389A007D243C /* SDL_dynapi_procs.h in Headers */,
                F3E3C6622241389A007D243C /* SDL_RLEaccel_c.h in Headers */,
                F3E3C6632241389A007D243C /* SDL_sysvideo.h in Headers */,
                F3E3C6642241389A007D243C /* SDL_nullevents_c.h in Headers */,
                F3E3C6652241389A007D243C /* SDL_nullvideo.h in Headers */,
                F3E3C6662241389A007D243C /* SDL_joystick_c.h in Headers */,
                F3E3C6672241389A007D243C /* SDL_sysjoystick.h in Headers */,
                F3E3C6682241389A007D243C /* SDL_uikitevents.h in Headers */,
                F3E3C6692241389A007D243C /* SDL_uikitopengles.h in Headers */,
                F3E3C66A2241389A007D243C /* SDL_uikitvideo.h in Headers */,
                F3E3C66B2241389A007D243C /* SDL_uikitwindow.h in Headers */,
                F3E3C66C2241389A007D243C /* SDL_uikitopenglview.h in Headers */,
                F3E3C66D2241389A007D243C /* SDL_dynapi.h in Headers */,
                F3E3C66E2241389A007D243C /* SDL_uikitappdelegate.h in Headers */,
                F3E3C66F2241389A007D243C /* SDL_dynapi_overrides.h in Headers */,
                F3E3C6702241389A007D243C /* yuv_rgb_std_func.h in Headers */,
                F3E3C6712241389A007D243C /* SDL_syshaptic.h in Headers */,
                F3E3C6722241389A007D243C /* SDL_blit_slow.h in Headers */,
                F3E3C6732241389A007D243C /* SDL_rwopsbundlesupport.h in Headers */,
                F3E3C6742241389A007D243C /* SDL_clipboardevents_c.h in Headers */,
                F3E3C6752241389A007D243C /* SDL_rect_c.h in Headers */,
                F3E3C6762241389A007D243C /* yuv_rgb_sse_func.h in Headers */,
                F3E3C6772241389A007D243C /* SDL_gesture_c.h in Headers */,
                F3E3C6782241389A007D243C /* SDL_touch_c.h in Headers */,
                F3E3C6792241389A007D243C /* SDL_sysrender.h in Headers */,
                F3E3C67A2241389A007D243C /* SDL_yuv_sw_c.h in Headers */,
                F3E3C67B2241389A007D243C /* yuv_rgb.h in Headers */,
                F3E3C67C2241389A007D243C /* SDL_blendfillrect.h in Headers */,
                F3E3C67D2241389A007D243C /* SDL_blendline.h in Headers */,
                F3E3C67E2241389A007D243C /* SDL_hidapijoystick_c.h in Headers */,
                F3E3C67F2241389A007D243C /* SDL_blendpoint.h in Headers */,
                F3E3C6802241389A007D243C /* SDL_draw.h in Headers */,
                F3E3C6812241389A007D243C /* SDL_drawline.h in Headers */,
                F3E3C6822241389A007D243C /* SDL_yuv_c.h in Headers */,
                F3E3C6832241389A007D243C /* SDL_drawpoint.h in Headers */,
                F3E3C6842241389A007D243C /* SDL_nullframebuffer_c.h in Headers */,
                F3E3C6852241389A007D243C /* SDL_render_sw_c.h in Headers */,
                F3E3C6862241389A007D243C /* SDL_uikitclipboard.h in Headers */,
                F3E3C6872241389A007D243C /* SDL_shaders_gles2.h in Headers */,
                F3E3C6882241389A007D243C /* SDL_assert_c.h in Headers */,
                F3E3C6892241389A007D243C /* SDL_coreaudio.h in Headers */,
                F3E3C68A2241389A007D243C /* SDL_uikitviewcontroller.h in Headers */,
                F3E3C68B2241389A007D243C /* SDL_rotate.h in Headers */,
                F3E3C68C2241389A007D243C /* begin_code.h in Headers */,
                F3E3C68D2241389A007D243C /* close_code.h in Headers */,
                F3E3C68E2241389A007D243C /* SDL_assert.h in Headers */,
                F3E3C68F2241389A007D243C /* SDL_atomic.h in Headers */,
                F3E3C6902241389A007D243C /* SDL_audio.h in Headers */,
                F3E3C6912241389A007D243C /* SDL_syspower.h in Headers */,
                F3E3C6922241389A007D243C /* SDL_blendmode.h in Headers */,
                F3E3C6932241389A007D243C /* SDL_sensor_c.h in Headers */,
                F3E3C6942241389A007D243C /* SDL_clipboard.h in Headers */,
                F3E3C6952241389A007D243C /* SDL_config_iphoneos.h in Headers */,
                F3E3C6962241389A007D243C /* SDL_config.h in Headers */,
                F3E3C6972241389A007D243C /* SDL_copying.h in Headers */,
                F3E3C6982241389A007D243C /* SDL_egl_c.h in Headers */,
                F3E3C6992241389A007D243C /* SDL_cpuinfo.h in Headers */,
                F3E3C69A2241389A007D243C /* SDL_endian.h in Headers */,
                F3E3C69B2241389A007D243C /* SDL_error.h in Headers */,
                F3E3C69C2241389A007D243C /* SDL_internal.h in Headers */,
                F3E3C69D2241389A007D243C /* SDL_events.h in Headers */,
                F3E3C69E2241389A007D243C /* SDL_gesture.h in Headers */,
                F3E3C69F2241389A007D243C /* SDL_haptic.h in Headers */,
                F3E3C6A02241389A007D243C /* SDL_hints.h in Headers */,
                F3E3C6A12241389A007D243C /* SDL_dataqueue.h in Headers */,
                F3E3C6A22241389A007D243C /* SDL_syssensor.h in Headers */,
                F3E3C6A32241389A007D243C /* SDL_joystick.h in Headers */,
                F3E3C6A42241389A007D243C /* SDL_shape_internals.h in Headers */,
                F3E3C6A52241389A007D243C /* SDL_keyboard.h in Headers */,
                F3E3C6A62241389A007D243C /* controller_type.h in Headers */,
                F3E3C6A72241389A007D243C /* SDL_keycode.h in Headers */,
                F3E3C6A82241389A007D243C /* SDL_loadso.h in Headers */,
                F3E3C6A92241389A007D243C /* SDL_log.h in Headers */,
                F3E3C6AA2241389A007D243C /* SDL_coremotionsensor.h in Headers */,
                F3E3C6AB2241389A007D243C /* SDL_main.h in Headers */,
                F3E3C6AC2241389A007D243C /* SDL_mouse.h in Headers */,
                F3E3C6AD2241389A007D243C /* SDL_displayevents_c.h in Headers */,
                F3E3C6AE2241389A007D243C /* SDL_mutex.h in Headers */,
                F3E3C6AF2241389A007D243C /* SDL_name.h in Headers */,
                F3E3C6B02241389A007D243C /* SDL_opengl.h in Headers */,
                F3E3C6B12241389A007D243C /* SDL_opengles.h in Headers */,
                F3E3C6B22241389A007D243C /* SDL_shaders_metal_ios.h in Headers */,
                F3E3C6B32241389A007D243C /* SDL_opengles2.h in Headers */,
                F3E3C6B42241389A007D243C /* SDL_pixels.h in Headers */,
                F3E3C6B52241389A007D243C /* SDL_platform.h in Headers */,
                F3E3C6B62241389A007D243C /* SDL_power.h in Headers */,
                F3E3C6B72241389A007D243C /* SDL_quit.h in Headers */,
                F3E3C6B82241389A007D243C /* SDL_rect.h in Headers */,
                F3E3C6B92241389A007D243C /* SDL_render.h in Headers */,
                F3E3C6BA2241389A007D243C /* SDL_revision.h in Headers */,
                F3E3C6BB2241389A007D243C /* SDL_rwops.h in Headers */,
                F3E3C6BC2241389A007D243C /* SDL_scancode.h in Headers */,
                F3E3C6BD2241389A007D243C /* SDL_shape.h in Headers */,
                F3E3C6BE2241389A007D243C /* SDL_stdinc.h in Headers */,
                F3E3C6BF2241389A007D243C /* SDL_sysjoystick_c.h in Headers */,
                F3E3C6C02241389A007D243C /* SDL_surface.h in Headers */,
                F3E3C6C12241389A007D243C /* SDL_system.h in Headers */,
                F3E3C6C22241389A007D243C /* SDL_sensor.h in Headers */,
                F3E3C6C32241389A007D243C /* SDL_syswm.h in Headers */,
                F3E3C6C42241389A007D243C /* SDL_thread.h in Headers */,
                F3E3C6C52241389A007D243C /* SDL_timer.h in Headers */,
                A75FDBDF23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
                F3E3C6C62241389A007D243C /* SDL_touch.h in Headers */,
                F3E3C6C72241389A007D243C /* SDL_types.h in Headers */,
                F3E3C6C82241389A007D243C /* SDL_version.h in Headers */,
                F3E3C6C92241389A007D243C /* SDL_vulkan.h in Headers */,
                F3E3C6CA2241389A007D243C /* SDL_video.h in Headers */,
                F3E3C6CB2241389A007D243C /* SDL.h in Headers */,
                F3E3C6CC2241389A007D243C /* SDL_uikitvulkan.h in Headers */,
                F3E3C6CD2241389A007D243C /* SDL_uikitmodes.h in Headers */,
                F3E3C6CE2241389A007D243C /* SDL_dropevents_c.h in Headers */,
                F3E3C6CF2241389A007D243C /* SDL_messagebox.h in Headers */,
                F3E3C6D02241389A007D243C /* SDL_uikitmessagebox.h in Headers */,
                F3E3C6D12241389A007D243C /* SDL_gamecontroller.h in Headers */,
                F3E3C6D22241389A007D243C /* SDL_dummysensor.h in Headers */,
                F3E3C6D32241389A007D243C /* SDL_bits.h in Headers */,
                F3E3C6D42241389A007D243C /* SDL_filesystem.h in Headers */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        F3E3C759224138AE007D243C /* Headers */ = {
            isa = PBXHeadersBuildPhase;
            buildActionMask = 2147483647;
            files = (
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        FD65265F0DE8FCCB002AD96B /* Headers */ = {
            isa = PBXHeadersBuildPhase;
            buildActionMask = 2147483647;
@@ -1324,6 +2225,7 @@
                AA75589D1595D55500BBD41B /* SDL_blendmode.h in Headers */,
                F30D9C9E212CD0990047DF2E /* SDL_sensor_c.h in Headers */,
                AA75589E1595D55500BBD41B /* SDL_clipboard.h in Headers */,
                FA24348D21D4201400B8918A /* SDL_metal.h in Headers */,
                AA75589F1595D55500BBD41B /* SDL_config_iphoneos.h in Headers */,
                AA7558A01595D55500BBD41B /* SDL_config.h in Headers */,
                AA7558A11595D55500BBD41B /* SDL_copying.h in Headers */,
@@ -1373,6 +2275,7 @@
                AA7558C31595D55500BBD41B /* SDL_syswm.h in Headers */,
                AA7558C41595D55500BBD41B /* SDL_thread.h in Headers */,
                AA7558C51595D55500BBD41B /* SDL_timer.h in Headers */,
                A75FDBDD23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
                AA7558C61595D55500BBD41B /* SDL_touch.h in Headers */,
                AA7558C71595D55500BBD41B /* SDL_types.h in Headers */,
                AA7558C81595D55500BBD41B /* SDL_version.h in Headers */,
@@ -1394,6 +2297,72 @@
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
        52ED1D6B222889500061FCE0 /* libSDL-iOS-dylib */ = {
            isa = PBXNativeTarget;
            buildConfigurationList = 52ED1E59222889500061FCE0 /* Build configuration list for PBXNativeTarget "libSDL-iOS-dylib" */;
            buildPhases = (
                52ED1D6C222889500061FCE0 /* Headers */,
                52ED1DE7222889500061FCE0 /* Sources */,
                52ED1E6922288B720061FCE0 /* Frameworks */,
            );
            buildRules = (
            );
            dependencies = (
            );
            name = "libSDL-iOS-dylib";
            productName = iPhoneSDLStaticLib;
            productReference = 52ED1E5C222889500061FCE0 /* libSDL2.dylib */;
            productType = "com.apple.product-type.library.static";
        };
        F3E3C56022406928007D243C /* libSDLmain-iOS */ = {
            isa = PBXNativeTarget;
            buildConfigurationList = F3E3C64F22406928007D243C /* Build configuration list for PBXNativeTarget "libSDLmain-iOS" */;
            buildPhases = (
                F3E3C56122406928007D243C /* Headers */,
                F3E3C5DC22406928007D243C /* Sources */,
            );
            buildRules = (
            );
            dependencies = (
            );
            name = "libSDLmain-iOS";
            productName = iPhoneSDLStaticLib;
            productReference = F3E3C65222406928007D243C /* libSDLmain.a */;
            productType = "com.apple.product-type.library.static";
        };
        F3E3C6592241389A007D243C /* libSDL-tvOS-dylib */ = {
            isa = PBXNativeTarget;
            buildConfigurationList = F3E3C7542241389A007D243C /* Build configuration list for PBXNativeTarget "libSDL-tvOS-dylib" */;
            buildPhases = (
                F3E3C65A2241389A007D243C /* Headers */,
                F3E3C6D52241389A007D243C /* Sources */,
                F3E3C7482241389A007D243C /* Frameworks */,
            );
            buildRules = (
            );
            dependencies = (
            );
            name = "libSDL-tvOS-dylib";
            productName = iPhoneSDLStaticLib;
            productReference = F3E3C7572241389A007D243C /* libSDL2.dylib */;
            productType = "com.apple.product-type.library.static";
        };
        F3E3C758224138AE007D243C /* libSDLmain-tvOS */ = {
            isa = PBXNativeTarget;
            buildConfigurationList = F3E3C75C224138AE007D243C /* Build configuration list for PBXNativeTarget "libSDLmain-tvOS" */;
            buildPhases = (
                F3E3C759224138AE007D243C /* Headers */,
                F3E3C75A224138AE007D243C /* Sources */,
            );
            buildRules = (
            );
            dependencies = (
            );
            name = "libSDLmain-tvOS";
            productName = iPhoneSDLStaticLib;
            productReference = F3E3C75F224138AE007D243C /* libSDLmain.a */;
            productType = "com.apple.product-type.library.static";
        };
        FAB598131BB5C1B100BE72C5 /* libSDL-tvOS */ = {
            isa = PBXNativeTarget;
            buildConfigurationList = FAB5981A1BB5C1B100BE72C5 /* Build configuration list for PBXNativeTarget "libSDL-tvOS" */;
@@ -1460,7 +2429,11 @@
            projectRoot = ../..;
            targets = (
                FD6526620DE8FCCB002AD96B /* libSDL-iOS */,
                52ED1D6B222889500061FCE0 /* libSDL-iOS-dylib */,
                FAB598131BB5C1B100BE72C5 /* libSDL-tvOS */,
                F3E3C6592241389A007D243C /* libSDL-tvOS-dylib */,
                F3E3C56022406928007D243C /* libSDLmain-iOS */,
                F3E3C758224138AE007D243C /* libSDLmain-tvOS */,
                00B4F48B12F6A69C0084EC00 /* PrepareXcodeProjectTemplate */,
                C143576D1F4C4DAA000B792B /* All-iOS */,
                C14357721F4C4F2A000B792B /* All-tvOS */,
@@ -1516,6 +2489,272 @@
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
        52ED1DE7222889500061FCE0 /* Sources */ = {
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                52ED1DE8222889500061FCE0 /* SDL_systimer.c in Sources */,
                52ED1DE9222889500061FCE0 /* SDL_timer.c in Sources */,
                52ED1DEA222889500061FCE0 /* SDL_coremotionsensor.m in Sources */,
                52ED1DEB222889500061FCE0 /* SDL_string.c in Sources */,
                52ED1DEC222889500061FCE0 /* SDL_dummyaudio.c in Sources */,
                52ED1DED222889500061FCE0 /* SDL_audio.c in Sources */,
                52ED1DEE222889500061FCE0 /* SDL_audiocvt.c in Sources */,
                52ED1DEF222889500061FCE0 /* SDL_audiotypecvt.c in Sources */,
                52ED1DF0222889500061FCE0 /* SDL_mixer.c in Sources */,
                52ED1DF1222889500061FCE0 /* SDL_wave.c in Sources */,
                52ED1DF2222889500061FCE0 /* SDL_uikitvulkan.m in Sources */,
                52ED1DF3222889500061FCE0 /* SDL_uikitclipboard.m in Sources */,
                52ED1DF4222889500061FCE0 /* SDL_cpuinfo.c in Sources */,
                52ED1DF5222889500061FCE0 /* SDL_events.c in Sources */,
                52ED1DF6222889500061FCE0 /* SDL_keyboard.c in Sources */,
                52ED1DF7222889500061FCE0 /* SDL_dynapi.c in Sources */,
                52ED1DF8222889500061FCE0 /* SDL_mouse.c in Sources */,
                52ED1DF9222889500061FCE0 /* SDL_quit.c in Sources */,
                52ED1DFA222889500061FCE0 /* SDL_windowevents.c in Sources */,
                52ED1DFB222889500061FCE0 /* SDL_uikitmetalview.m in Sources */,
                52ED1DFC222889500061FCE0 /* SDL_rwops.c in Sources */,
                52ED1DFD222889500061FCE0 /* hid.m in Sources */,
                52ED1DFE222889500061FCE0 /* SDL_vulkan_utils.c in Sources */,
                52ED1DFF222889500061FCE0 /* SDL_error.c in Sources */,
                52ED1E00222889500061FCE0 /* SDL.c in Sources */,
                52ED1E01222889500061FCE0 /* SDL_syscond.c in Sources */,
                52ED1E02222889500061FCE0 /* SDL_render_metal.m in Sources */,
                52ED1E03222889500061FCE0 /* SDL_sysmutex.c in Sources */,
                52ED1E04222889500061FCE0 /* SDL_syssem.c in Sources */,
                52ED1E05222889500061FCE0 /* SDL_systhread.c in Sources */,
                52ED1E06222889500061FCE0 /* SDL_thread.c in Sources */,
                52ED1E07222889500061FCE0 /* SDL_getenv.c in Sources */,
                52ED1E08222889500061FCE0 /* SDL_iconv.c in Sources */,
                52ED1E09222889500061FCE0 /* SDL_malloc.c in Sources */,
                A7FF6B6323AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
                52ED1E0A222889500061FCE0 /* SDL_hidapi_xbox360.c in Sources */,
                52ED1E0B222889500061FCE0 /* SDL_qsort.c in Sources */,
                52ED1E0C222889500061FCE0 /* SDL_hidapi_ps4.c in Sources */,
                52ED1E0D222889500061FCE0 /* SDL_stdlib.c in Sources */,
                52ED1E0E222889500061FCE0 /* SDL_blit.c in Sources */,
                52ED1E0F222889500061FCE0 /* SDL_blit_0.c in Sources */,
                A75FDAB723E288E400529352 /* SDL_hidapi_steam.c in Sources */,
                52ED1E10222889500061FCE0 /* SDL_yuv.c in Sources */,
                52ED1E11222889500061FCE0 /* SDL_blit_1.c in Sources */,
                52ED1E12222889500061FCE0 /* SDL_dataqueue.c in Sources */,
                52ED1E13222889500061FCE0 /* SDL_blit_A.c in Sources */,
                52ED1E14222889500061FCE0 /* SDL_blit_auto.c in Sources */,
                52ED1E15222889500061FCE0 /* SDL_blit_copy.c in Sources */,
                52ED1E16222889500061FCE0 /* SDL_blit_N.c in Sources */,
                52ED1E17222889500061FCE0 /* SDL_blit_slow.c in Sources */,
                52ED1E18222889500061FCE0 /* SDL_bmp.c in Sources */,
                52ED1E19222889500061FCE0 /* SDL_pixels.c in Sources */,
                52ED1E1A222889500061FCE0 /* SDL_rect.c in Sources */,
                52ED1E1B222889500061FCE0 /* SDL_RLEaccel.c in Sources */,
                52ED1E1C222889500061FCE0 /* SDL_stretch.c in Sources */,
                52ED1E1D222889500061FCE0 /* SDL_egl.c in Sources */,
                52ED1E1E222889500061FCE0 /* SDL_surface.c in Sources */,
                A75FDBDA23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
                52ED1E1F222889500061FCE0 /* SDL_video.c in Sources */,
                52ED1E20222889500061FCE0 /* SDL_nullevents.c in Sources */,
                52ED1E21222889500061FCE0 /* SDL_nullvideo.c in Sources */,
                52ED1E22222889500061FCE0 /* SDL_joystick.c in Sources */,
                52ED1E23222889500061FCE0 /* SDL_sysjoystick.m in Sources */,
                52ED1E24222889500061FCE0 /* SDL_uikitevents.m in Sources */,
                52ED1E25222889500061FCE0 /* yuv_rgb.c in Sources */,
                52ED1E26222889500061FCE0 /* SDL_uikitopengles.m in Sources */,
                52ED1E27222889500061FCE0 /* SDL_uikitvideo.m in Sources */,
                52ED1E28222889500061FCE0 /* SDL_uikitview.m in Sources */,
                52ED1E29222889500061FCE0 /* SDL_displayevents.c in Sources */,
                52ED1E2A222889500061FCE0 /* SDL_uikitwindow.m in Sources */,
                52ED1E2B222889500061FCE0 /* SDL_uikitopenglview.m in Sources */,
                52ED1E2C222889500061FCE0 /* SDL_uikitappdelegate.m in Sources */,
                52ED1E2D222889500061FCE0 /* SDL_sysloadso.c in Sources */,
                52ED1E2E222889500061FCE0 /* SDL_hidapijoystick.c in Sources */,
                52ED1E2F222889500061FCE0 /* SDL_syshaptic.c in Sources */,
                52ED1E30222889500061FCE0 /* SDL_haptic.c in Sources */,
                52ED1E31222889500061FCE0 /* SDL_sysloadso.c in Sources */,
                52ED1E32222889500061FCE0 /* SDL_fillrect.c in Sources */,
                52ED1E33222889500061FCE0 /* SDL_assert.c in Sources */,
                52ED1E34222889500061FCE0 /* SDL_hidapi_xboxone.c in Sources */,
                52ED1E35222889500061FCE0 /* SDL_power.c in Sources */,
                52ED1E36222889500061FCE0 /* SDL_syspower.m in Sources */,
                52ED1E37222889500061FCE0 /* SDL_rwopsbundlesupport.m in Sources */,
                52ED1E38222889500061FCE0 /* SDL_clipboard.c in Sources */,
                52ED1E39222889500061FCE0 /* SDL_clipboardevents.c in Sources */,
                52ED1E3A222889500061FCE0 /* SDL_gesture.c in Sources */,
                52ED1E3B222889500061FCE0 /* SDL_touch.c in Sources */,
                52ED1E3C222889500061FCE0 /* SDL_atomic.c in Sources */,
                52ED1E3D222889500061FCE0 /* SDL_spinlock.c in Sources */,
                52ED1E3E222889500061FCE0 /* SDL_render.c in Sources */,
                52ED1E3F222889500061FCE0 /* SDL_yuv_sw.c in Sources */,
                52ED1E40222889500061FCE0 /* SDL_blendfillrect.c in Sources */,
                52ED1E41222889500061FCE0 /* SDL_blendline.c in Sources */,
                52ED1E42222889500061FCE0 /* SDL_blendpoint.c in Sources */,
                52ED1E43222889500061FCE0 /* SDL_drawline.c in Sources */,
                52ED1E44222889500061FCE0 /* SDL_drawpoint.c in Sources */,
                52ED1E45222889500061FCE0 /* SDL_nullframebuffer.c in Sources */,
                52ED1E46222889500061FCE0 /* SDL_render_sw.c in Sources */,
                52ED1E47222889500061FCE0 /* SDL_render_gles.c in Sources */,
                52ED1E48222889500061FCE0 /* SDL_hints.c in Sources */,
                52ED1E49222889500061FCE0 /* SDL_shape.c in Sources */,
                A7FF6B6823AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
                52ED1E4A222889500061FCE0 /* SDL_render_gles2.c in Sources */,
                52ED1E4B222889500061FCE0 /* SDL_dummysensor.c in Sources */,
                52ED1E4C222889500061FCE0 /* SDL_shaders_gles2.c in Sources */,
                52ED1E4D222889500061FCE0 /* SDL_log.c in Sources */,
                52ED1E4E222889500061FCE0 /* SDL_coreaudio.m in Sources */,
                52ED1E4F222889500061FCE0 /* SDL_sensor.c in Sources */,
                52ED1E50222889500061FCE0 /* SDL_hidapi_switch.c in Sources */,
                52ED1E51222889500061FCE0 /* SDL_uikitviewcontroller.m in Sources */,
                52ED1E52222889500061FCE0 /* SDL_rotate.c in Sources */,
                52ED1E53222889500061FCE0 /* SDL_uikitmodes.m in Sources */,
                52ED1E54222889500061FCE0 /* SDL_dropevents.c in Sources */,
                52ED1E55222889500061FCE0 /* SDL_uikitmessagebox.m in Sources */,
                52ED1E56222889500061FCE0 /* SDL_gamecontroller.c in Sources */,
                52ED1E57222889500061FCE0 /* SDL_systls.c in Sources */,
                52ED1E58222889500061FCE0 /* SDL_sysfilesystem.m in Sources */,
                63CC93C823849391002A5C54 /* SDL_strtokr.c in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        F3E3C5DC22406928007D243C /* Sources */ = {
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                F3E3C658224069CE007D243C /* SDL_uikit_main.c in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        F3E3C6D52241389A007D243C /* Sources */ = {
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                F3E3C6D62241389A007D243C /* SDL_systimer.c in Sources */,
                F3E3C6D72241389A007D243C /* SDL_timer.c in Sources */,
                F3E3C6D82241389A007D243C /* SDL_coremotionsensor.m in Sources */,
                F3E3C6D92241389A007D243C /* SDL_string.c in Sources */,
                F3E3C6DA2241389A007D243C /* SDL_dummyaudio.c in Sources */,
                F3E3C6DB2241389A007D243C /* SDL_audio.c in Sources */,
                F3E3C6DC2241389A007D243C /* SDL_audiocvt.c in Sources */,
                F3E3C6DD2241389A007D243C /* SDL_audiotypecvt.c in Sources */,
                F3E3C6DE2241389A007D243C /* SDL_mixer.c in Sources */,
                F3E3C6DF2241389A007D243C /* SDL_wave.c in Sources */,
                F3E3C6E02241389A007D243C /* SDL_uikitvulkan.m in Sources */,
                F3E3C6E12241389A007D243C /* SDL_uikitclipboard.m in Sources */,
                F3E3C6E22241389A007D243C /* SDL_cpuinfo.c in Sources */,
                F3E3C6E32241389A007D243C /* SDL_events.c in Sources */,
                F3E3C6E42241389A007D243C /* SDL_keyboard.c in Sources */,
                F3E3C6E52241389A007D243C /* SDL_dynapi.c in Sources */,
                F3E3C6E62241389A007D243C /* SDL_mouse.c in Sources */,
                F3E3C6E72241389A007D243C /* SDL_quit.c in Sources */,
                F3E3C6E82241389A007D243C /* SDL_windowevents.c in Sources */,
                F3E3C6E92241389A007D243C /* SDL_uikitmetalview.m in Sources */,
                F3E3C6EA2241389A007D243C /* SDL_rwops.c in Sources */,
                F3E3C6EB2241389A007D243C /* hid.m in Sources */,
                F3E3C6EC2241389A007D243C /* SDL_vulkan_utils.c in Sources */,
                F3E3C6ED2241389A007D243C /* SDL_error.c in Sources */,
                F3E3C6EE2241389A007D243C /* SDL.c in Sources */,
                F3E3C6EF2241389A007D243C /* SDL_syscond.c in Sources */,
                F3E3C6F02241389A007D243C /* SDL_render_metal.m in Sources */,
                F3E3C6F12241389A007D243C /* SDL_sysmutex.c in Sources */,
                F3E3C6F22241389A007D243C /* SDL_syssem.c in Sources */,
                F3E3C6F32241389A007D243C /* SDL_systhread.c in Sources */,
                F3E3C6F42241389A007D243C /* SDL_thread.c in Sources */,
                F3E3C6F52241389A007D243C /* SDL_getenv.c in Sources */,
                F3E3C6F62241389A007D243C /* SDL_iconv.c in Sources */,
                F3E3C6F72241389A007D243C /* SDL_malloc.c in Sources */,
                A7FF6B6523AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
                F3E3C6F82241389A007D243C /* SDL_hidapi_xbox360.c in Sources */,
                F3E3C6F92241389A007D243C /* SDL_qsort.c in Sources */,
                F3E3C6FA2241389A007D243C /* SDL_hidapi_ps4.c in Sources */,
                F3E3C6FB2241389A007D243C /* SDL_stdlib.c in Sources */,
                F3E3C6FC2241389A007D243C /* SDL_blit.c in Sources */,
                F3E3C6FD2241389A007D243C /* SDL_blit_0.c in Sources */,
                A75FDAB823E2890000529352 /* SDL_hidapi_steam.c in Sources */,
                F3E3C6FE2241389A007D243C /* SDL_yuv.c in Sources */,
                F3E3C6FF2241389A007D243C /* SDL_blit_1.c in Sources */,
                F3E3C7002241389A007D243C /* SDL_dataqueue.c in Sources */,
                F3E3C7012241389A007D243C /* SDL_blit_A.c in Sources */,
                F3E3C7022241389A007D243C /* SDL_blit_auto.c in Sources */,
                F3E3C7032241389A007D243C /* SDL_blit_copy.c in Sources */,
                F3E3C7042241389A007D243C /* SDL_blit_N.c in Sources */,
                F3E3C7052241389A007D243C /* SDL_blit_slow.c in Sources */,
                F3E3C7062241389A007D243C /* SDL_bmp.c in Sources */,
                F3E3C7072241389A007D243C /* SDL_pixels.c in Sources */,
                F3E3C7082241389A007D243C /* SDL_rect.c in Sources */,
                F3E3C7092241389A007D243C /* SDL_RLEaccel.c in Sources */,
                F3E3C70A2241389A007D243C /* SDL_stretch.c in Sources */,
                F3E3C70B2241389A007D243C /* SDL_egl.c in Sources */,
                F3E3C70C2241389A007D243C /* SDL_surface.c in Sources */,
                A75FDBDC23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
                F3E3C70D2241389A007D243C /* SDL_video.c in Sources */,
                F3E3C70E2241389A007D243C /* SDL_nullevents.c in Sources */,
                F3E3C70F2241389A007D243C /* SDL_nullvideo.c in Sources */,
                F3E3C7102241389A007D243C /* SDL_joystick.c in Sources */,
                F3E3C7112241389A007D243C /* SDL_sysjoystick.m in Sources */,
                F3E3C7122241389A007D243C /* SDL_uikitevents.m in Sources */,
                F3E3C7132241389A007D243C /* yuv_rgb.c in Sources */,
                F3E3C7142241389A007D243C /* SDL_uikitopengles.m in Sources */,
                F3E3C7162241389A007D243C /* SDL_uikitvideo.m in Sources */,
                F3E3C7172241389A007D243C /* SDL_uikitview.m in Sources */,
                F3E3C7182241389A007D243C /* SDL_displayevents.c in Sources */,
                F3E3C7192241389A007D243C /* SDL_uikitwindow.m in Sources */,
                F3E3C71A2241389A007D243C /* SDL_uikitopenglview.m in Sources */,
                F3E3C71B2241389A007D243C /* SDL_uikitappdelegate.m in Sources */,
                F3E3C71C2241389A007D243C /* SDL_sysloadso.c in Sources */,
                F3E3C71D2241389A007D243C /* SDL_hidapijoystick.c in Sources */,
                F3E3C71E2241389A007D243C /* SDL_syshaptic.c in Sources */,
                F3E3C71F2241389A007D243C /* SDL_haptic.c in Sources */,
                F3E3C7202241389A007D243C /* SDL_sysloadso.c in Sources */,
                F3E3C7212241389A007D243C /* SDL_fillrect.c in Sources */,
                F3E3C7222241389A007D243C /* SDL_assert.c in Sources */,
                F3E3C7232241389A007D243C /* SDL_hidapi_xboxone.c in Sources */,
                F3E3C7242241389A007D243C /* SDL_power.c in Sources */,
                F3E3C7252241389A007D243C /* SDL_syspower.m in Sources */,
                F3E3C7262241389A007D243C /* SDL_rwopsbundlesupport.m in Sources */,
                F3E3C7272241389A007D243C /* SDL_clipboard.c in Sources */,
                F3E3C7282241389A007D243C /* SDL_clipboardevents.c in Sources */,
                F3E3C7292241389A007D243C /* SDL_gesture.c in Sources */,
                F3E3C72A2241389A007D243C /* SDL_touch.c in Sources */,
                F3E3C72B2241389A007D243C /* SDL_atomic.c in Sources */,
                F3E3C72C2241389A007D243C /* SDL_spinlock.c in Sources */,
                F3E3C72D2241389A007D243C /* SDL_render.c in Sources */,
                F3E3C72E2241389A007D243C /* SDL_yuv_sw.c in Sources */,
                F3E3C72F2241389A007D243C /* SDL_blendfillrect.c in Sources */,
                F3E3C7302241389A007D243C /* SDL_blendline.c in Sources */,
                F3E3C7312241389A007D243C /* SDL_blendpoint.c in Sources */,
                F3E3C7322241389A007D243C /* SDL_drawline.c in Sources */,
                F3E3C7332241389A007D243C /* SDL_drawpoint.c in Sources */,
                F3E3C7342241389A007D243C /* SDL_nullframebuffer.c in Sources */,
                F3E3C7352241389A007D243C /* SDL_render_sw.c in Sources */,
                F3E3C7362241389A007D243C /* SDL_render_gles.c in Sources */,
                F3E3C7372241389A007D243C /* SDL_hints.c in Sources */,
                F3E3C7382241389A007D243C /* SDL_shape.c in Sources */,
                A7FF6B6A23AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
                F3E3C7392241389A007D243C /* SDL_render_gles2.c in Sources */,
                F3E3C73A2241389A007D243C /* SDL_dummysensor.c in Sources */,
                F3E3C73B2241389A007D243C /* SDL_shaders_gles2.c in Sources */,
                F3E3C73C2241389A007D243C /* SDL_log.c in Sources */,
                F3E3C73D2241389A007D243C /* SDL_coreaudio.m in Sources */,
                F3E3C73E2241389A007D243C /* SDL_sensor.c in Sources */,
                F3E3C73F2241389A007D243C /* SDL_hidapi_switch.c in Sources */,
                F3E3C7402241389A007D243C /* SDL_uikitviewcontroller.m in Sources */,
                F3E3C7412241389A007D243C /* SDL_rotate.c in Sources */,
                F3E3C7422241389A007D243C /* SDL_uikitmodes.m in Sources */,
                F3E3C7432241389A007D243C /* SDL_dropevents.c in Sources */,
                F3E3C7442241389A007D243C /* SDL_uikitmessagebox.m in Sources */,
                F3E3C7452241389A007D243C /* SDL_gamecontroller.c in Sources */,
                F3E3C7462241389A007D243C /* SDL_systls.c in Sources */,
                F3E3C7472241389A007D243C /* SDL_sysfilesystem.m in Sources */,
                63CC93CA23849391002A5C54 /* SDL_strtokr.c in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        F3E3C75A224138AE007D243C /* Sources */ = {
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                F3E3C75B224138AE007D243C /* SDL_uikit_main.c in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
        FAB598101BB5C1B100BE72C5 /* Sources */ = {
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
@@ -1551,6 +2790,7 @@
                FAB5984B1BB5C31600BE72C5 /* SDL_sysfilesystem.m in Sources */,
                AADC5A5D1FDA104400960936 /* yuv_rgb.c in Sources */,
                FAB5984C1BB5C31600BE72C5 /* SDL_syshaptic.c in Sources */,
                A75FDBDB23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
                AADC5A5F1FDA105600960936 /* SDL_vulkan_utils.c in Sources */,
                AADC5A5E1FDA105300960936 /* SDL_yuv.c in Sources */,
                FAB5984D1BB5C31600BE72C5 /* SDL_haptic.c in Sources */,
@@ -1559,6 +2799,7 @@
                FAB598521BB5C31600BE72C5 /* SDL_joystick.c in Sources */,
                FAB598551BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */,
                AADC5A651FDA10CB00960936 /* SDL_render_metal.m in Sources */,
                A7FF6B6923AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
                FAB598561BB5C31600BE72C5 /* SDL_sysloadso.c in Sources */,
                FAB598571BB5C31600BE72C5 /* SDL_power.c in Sources */,
                F30D9CA1212CD0990047DF2E /* SDL_sensor.c in Sources */,
@@ -1588,6 +2829,7 @@
                FAB598781BB5C31600BE72C5 /* SDL_syscond.c in Sources */,
                F3BDD79D20F51CB8004ECBF3 /* SDL_hidapijoystick.c in Sources */,
                AADC5A601FDA10A400960936 /* SDL_uikitvulkan.m in Sources */,
                A7FF6B6423AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
                FAB598791BB5C31600BE72C5 /* SDL_sysmutex.c in Sources */,
                FAB5987B1BB5C31600BE72C5 /* SDL_syssem.c in Sources */,
                FAB5987C1BB5C31600BE72C5 /* SDL_systhread.c in Sources */,
@@ -1606,6 +2848,7 @@
                FAB598951BB5C31600BE72C5 /* SDL_uikitview.m in Sources */,
                FAB598971BB5C31600BE72C5 /* SDL_uikitviewcontroller.m in Sources */,
                FAB598991BB5C31600BE72C5 /* SDL_uikitwindow.m in Sources */,
                A704173220F7F39900A82227 /* SDL_hidapi_steam.c in Sources */,
                FAB5989A1BB5C31600BE72C5 /* SDL_nullevents.c in Sources */,
                FAB5989D1BB5C31600BE72C5 /* SDL_nullframebuffer.c in Sources */,
                FAB5989E1BB5C31600BE72C5 /* SDL_nullvideo.c in Sources */,
@@ -1631,6 +2874,7 @@
                FAB598BD1BB5C31600BE72C5 /* SDL_hints.c in Sources */,
                FAB598BE1BB5C31600BE72C5 /* SDL_log.c in Sources */,
                FAB598BF1BB5C31600BE72C5 /* SDL.c in Sources */,
                63CC93C923849391002A5C54 /* SDL_strtokr.c in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -1672,6 +2916,7 @@
                FD3F4A760DEA620800C5B771 /* SDL_getenv.c in Sources */,
                FD3F4A770DEA620800C5B771 /* SDL_iconv.c in Sources */,
                FD3F4A780DEA620800C5B771 /* SDL_malloc.c in Sources */,
                A7FF6B6223AC3BC6005876C6 /* SDL_hidapi_gamecube.c in Sources */,
                F3BDD79220F51CB8004ECBF3 /* SDL_hidapi_xbox360.c in Sources */,
                FD3F4A790DEA620800C5B771 /* SDL_qsort.c in Sources */,
                F3BDD79820F51CB8004ECBF3 /* SDL_hidapi_ps4.c in Sources */,
@@ -1683,6 +2928,7 @@
                566726451DF72CF5001DD3DB /* SDL_dataqueue.c in Sources */,
                FDA684510DF2374E00F98A1A /* SDL_blit_A.c in Sources */,
                FDA684520DF2374E00F98A1A /* SDL_blit_auto.c in Sources */,
                A704173120F7F39900A82227 /* SDL_hidapi_steam.c in Sources */,
                FDA684540DF2374E00F98A1A /* SDL_blit_copy.c in Sources */,
                FDA684560DF2374E00F98A1A /* SDL_blit_N.c in Sources */,
                FDA684570DF2374E00F98A1A /* SDL_blit_slow.c in Sources */,
@@ -1693,6 +2939,7 @@
                FDA684640DF2374E00F98A1A /* SDL_stretch.c in Sources */,
                AA13B34D1FB8B27800D9FEE6 /* SDL_egl.c in Sources */,
                FDA684660DF2374E00F98A1A /* SDL_surface.c in Sources */,
                A75FDBD923EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
                FDA684680DF2374E00F98A1A /* SDL_video.c in Sources */,
                FDA685FB0DF244C800F98A1A /* SDL_nullevents.c in Sources */,
                FDA685FF0DF244C800F98A1A /* SDL_nullvideo.c in Sources */,
@@ -1736,6 +2983,7 @@
                0442EC5312FE1C28004C9285 /* SDL_render_gles.c in Sources */,
                0442EC5512FE1C3F004C9285 /* SDL_hints.c in Sources */,
                AA13B34A1FB8B27800D9FEE6 /* SDL_shape.c in Sources */,
                A7FF6B6723AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
                0402A85812FE70C600CECEE3 /* SDL_render_gles2.c in Sources */,
                F36839CD214790950000F255 /* SDL_dummysensor.c in Sources */,
                0402A85912FE70C600CECEE3 /* SDL_shaders_gles2.c in Sources */,
@@ -1751,6 +2999,7 @@
                AA0AD06216647BBB00CE5896 /* SDL_gamecontroller.c in Sources */,
                AA0F8495178D5F1A00823F9D /* SDL_systls.c in Sources */,
                56C181E217C44D7A00406AE3 /* SDL_sysfilesystem.m in Sources */,
                63CC93C723849391002A5C54 /* SDL_strtokr.c in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -1774,6 +3023,48 @@
                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
                PRODUCT_NAME = PrepareXcodeProjectTemplate;
                ZERO_LINK = NO;
            };
            name = Release;
        };
        52ED1E5A222889500061FCE0 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
                COPY_PHASE_STRIP = NO;
                EXECUTABLE_EXTENSION = dylib;
                GCC_PREPROCESSOR_DEFINITIONS = "IOS_DYLIB=1";
                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
                LD_DYLIB_INSTALL_NAME = "@rpath/libSDL2.dylib";
                MACH_O_TYPE = mh_dylib;
                PRODUCT_MODULE_NAME = SDL2;
                PRODUCT_NAME = SDL2;
            };
            name = Debug;
        };
        52ED1E5B222889500061FCE0 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
                COPY_PHASE_STRIP = YES;
                EXECUTABLE_EXTENSION = dylib;
                GCC_PREPROCESSOR_DEFINITIONS = "IOS_DYLIB=1";
                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
                LD_DYLIB_INSTALL_NAME = "@rpath/libSDL2.dylib";
                MACH_O_TYPE = mh_dylib;
                PRODUCT_MODULE_NAME = SDL2;
                PRODUCT_NAME = SDL2;
            };
            name = Release;
        };
@@ -1881,6 +3172,120 @@
            buildSettings = {
                ENABLE_BITCODE = YES;
                PRODUCT_NAME = "$(TARGET_NAME)";
            };
            name = Release;
        };
        F3E3C65022406928007D243C /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
                COPY_PHASE_STRIP = NO;
                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
                PRODUCT_NAME = SDLmain;
                SKIP_INSTALL = YES;
            };
            name = Debug;
        };
        F3E3C65122406928007D243C /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
                COPY_PHASE_STRIP = YES;
                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
                PRODUCT_NAME = SDLmain;
                SKIP_INSTALL = YES;
            };
            name = Release;
        };
        F3E3C7552241389A007D243C /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
                COPY_PHASE_STRIP = NO;
                EXECUTABLE_EXTENSION = dylib;
                GCC_PREPROCESSOR_DEFINITIONS = "IOS_DYLIB=1";
                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
                LD_DYLIB_INSTALL_NAME = "@rpath/libSDL2.dylib";
                MACH_O_TYPE = mh_dylib;
                PRODUCT_MODULE_NAME = SDL2;
                PRODUCT_NAME = SDL2;
                SDKROOT = appletvos;
            };
            name = Debug;
        };
        F3E3C7562241389A007D243C /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
                COPY_PHASE_STRIP = YES;
                EXECUTABLE_EXTENSION = dylib;
                GCC_PREPROCESSOR_DEFINITIONS = "IOS_DYLIB=1";
                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
                LD_DYLIB_INSTALL_NAME = "@rpath/libSDL2.dylib";
                MACH_O_TYPE = mh_dylib;
                PRODUCT_MODULE_NAME = SDL2;
                PRODUCT_NAME = SDL2;
                SDKROOT = appletvos;
            };
            name = Release;
        };
        F3E3C75D224138AE007D243C /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
                COPY_PHASE_STRIP = NO;
                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
                PRODUCT_NAME = SDLmain;
                SDKROOT = appletvos;
                SKIP_INSTALL = YES;
            };
            name = Debug;
        };
        F3E3C75E224138AE007D243C /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                ALWAYS_SEARCH_USER_PATHS = NO;
                CLANG_ENABLE_OBJC_ARC = YES;
                CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
                CLANG_WARN_OBJC_IMPLICIT_ATOMIC_PROPERTIES = YES;
                COPY_PHASE_STRIP = YES;
                GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR = YES;
                GCC_WARN_STRICT_SELECTOR_MATCH = YES;
                GCC_WARN_UNDECLARED_SELECTOR = YES;
                HEADER_SEARCH_PATHS = "$(VULKAN_SDK)/include";
                PRODUCT_NAME = SDLmain;
                SDKROOT = appletvos;
                SKIP_INSTALL = YES;
            };
            name = Release;
        };
@@ -2016,6 +3421,15 @@
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        52ED1E59222889500061FCE0 /* Build configuration list for PBXNativeTarget "libSDL-iOS-dylib" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                52ED1E5A222889500061FCE0 /* Debug */,
                52ED1E5B222889500061FCE0 /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        C01FCF4E08A954540054247B /* Build configuration list for PBXProject "SDL" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
@@ -2043,6 +3457,33 @@
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        F3E3C64F22406928007D243C /* Build configuration list for PBXNativeTarget "libSDLmain-iOS" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                F3E3C65022406928007D243C /* Debug */,
                F3E3C65122406928007D243C /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        F3E3C7542241389A007D243C /* Build configuration list for PBXNativeTarget "libSDL-tvOS-dylib" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                F3E3C7552241389A007D243C /* Debug */,
                F3E3C7562241389A007D243C /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        F3E3C75C224138AE007D243C /* Build configuration list for PBXNativeTarget "libSDLmain-tvOS" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
                F3E3C75D224138AE007D243C /* Debug */,
                F3E3C75E224138AE007D243C /* Release */,
            );
            defaultConfigurationIsVisible = 0;
            defaultConfigurationName = Release;
        };
        FAB5981A1BB5C1B100BE72C5 /* Build configuration list for PBXNativeTarget "libSDL-tvOS" */ = {
            isa = XCConfigurationList;
            buildConfigurations = (
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/All-iOS.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
               BuildableName = "All-iOS"
               BlueprintName = "All-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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
            BuildableName = "All-iOS"
            BlueprintName = "All-iOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "C143576D1F4C4DAA000B792B"
            BuildableName = "All-iOS"
            BlueprintName = "All-iOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/All-tvOS.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "C14357721F4C4F2A000B792B"
               BuildableName = "All-tvOS"
               BlueprintName = "All-tvOS"
               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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "C14357721F4C4F2A000B792B"
            BuildableName = "All-tvOS"
            BlueprintName = "All-tvOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "C14357721F4C4F2A000B792B"
            BuildableName = "All-tvOS"
            BlueprintName = "All-tvOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/PrepareXcodeProjectTemplate.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
               BuildableName = "PrepareXcodeProjectTemplate"
               BlueprintName = "PrepareXcodeProjectTemplate"
               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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
            BuildableName = "PrepareXcodeProjectTemplate"
            BlueprintName = "PrepareXcodeProjectTemplate"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "00B4F48B12F6A69C0084EC00"
            BuildableName = "PrepareXcodeProjectTemplate"
            BlueprintName = "PrepareXcodeProjectTemplate"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-iOS-dylib.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "52ED1D6B222889500061FCE0"
               BuildableName = "libSDL2.dylib"
               BlueprintName = "libSDL-iOS-dylib"
               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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "52ED1D6B222889500061FCE0"
            BuildableName = "libSDL2.dylib"
            BlueprintName = "libSDL-iOS-dylib"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "52ED1D6B222889500061FCE0"
            BuildableName = "libSDL2.dylib"
            BlueprintName = "libSDL-iOS-dylib"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-iOS.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
               BuildableName = "libSDL2.a"
               BlueprintName = "libSDL-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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
            BuildableName = "libSDL2.a"
            BlueprintName = "libSDL-iOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "FD6526620DE8FCCB002AD96B"
            BuildableName = "libSDL2.a"
            BlueprintName = "libSDL-iOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-tvOS-dylib.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "F3E3C6592241389A007D243C"
               BuildableName = "libSDL2.dylib"
               BlueprintName = "libSDL-tvOS-dylib"
               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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "F3E3C6592241389A007D243C"
            BuildableName = "libSDL2.dylib"
            BlueprintName = "libSDL-tvOS-dylib"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "F3E3C6592241389A007D243C"
            BuildableName = "libSDL2.dylib"
            BlueprintName = "libSDL-tvOS-dylib"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDL-tvOS.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
               BuildableName = "libSDL2.a"
               BlueprintName = "libSDL-tvOS"
               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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
            BuildableName = "libSDL2.a"
            BlueprintName = "libSDL-tvOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "FAB598131BB5C1B100BE72C5"
            BuildableName = "libSDL2.a"
            BlueprintName = "libSDL-tvOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDLmain-iOS.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "F3E3C56022406928007D243C"
               BuildableName = "libSDLmain.a"
               BlueprintName = "libSDLmain-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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "F3E3C56022406928007D243C"
            BuildableName = "libSDLmain.a"
            BlueprintName = "libSDLmain-iOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "F3E3C56022406928007D243C"
            BuildableName = "libSDLmain.a"
            BlueprintName = "libSDLmain-iOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/SDL/SDL.xcodeproj/xcshareddata/xcschemes/libSDLmain-tvOS.xcscheme
New file
@@ -0,0 +1,80 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
   LastUpgradeVersion = "1020"
   version = "1.3">
   <BuildAction
      parallelizeBuildables = "YES"
      buildImplicitDependencies = "YES">
      <BuildActionEntries>
         <BuildActionEntry
            buildForTesting = "YES"
            buildForRunning = "YES"
            buildForProfiling = "YES"
            buildForArchiving = "YES"
            buildForAnalyzing = "YES">
            <BuildableReference
               BuildableIdentifier = "primary"
               BlueprintIdentifier = "F3E3C758224138AE007D243C"
               BuildableName = "libSDLmain.a"
               BlueprintName = "libSDLmain-tvOS"
               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>
      <AdditionalOptions>
      </AdditionalOptions>
   </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">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "F3E3C758224138AE007D243C"
            BuildableName = "libSDLmain.a"
            BlueprintName = "libSDLmain-tvOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
      <AdditionalOptions>
      </AdditionalOptions>
   </LaunchAction>
   <ProfileAction
      buildConfiguration = "Release"
      shouldUseLaunchSchemeArgsEnv = "YES"
      savedToolIdentifier = ""
      useCustomWorkingDirectory = "NO"
      debugDocumentVersioning = "YES">
      <MacroExpansion>
         <BuildableReference
            BuildableIdentifier = "primary"
            BlueprintIdentifier = "F3E3C758224138AE007D243C"
            BuildableName = "libSDLmain.a"
            BlueprintName = "libSDLmain-tvOS"
            ReferencedContainer = "container:SDL.xcodeproj">
         </BuildableReference>
      </MacroExpansion>
   </ProfileAction>
   <AnalyzeAction
      buildConfiguration = "Debug">
   </AnalyzeAction>
   <ArchiveAction
      buildConfiguration = "Release"
      revealArchiveInOrganizer = "YES">
   </ArchiveAction>
</Scheme>
source/Xcode-iOS/Template/SDL iOS Application/___PROJECTNAME___.xcodeproj/project.pbxproj
old mode 100755 new mode 100644
source/Xcode-iOS/Test/Info.plist
@@ -11,7 +11,7 @@
    <key>CFBundleIconFile</key>
    <string></string>
    <key>CFBundleIdentifier</key>
    <string>com.yourcompany.${PRODUCT_NAME:identifier}</string>
    <string>com.yourcompany.${PRODUCT_NAME}</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
source/Xcode-iOS/Test/TestiPhoneOS.xcodeproj/project.pbxproj
@@ -84,6 +84,32 @@
        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 */; };
        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 */; };
        F3F758D922AC596E001D97F2 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FA3D992B1BC4E619002C96C8 /* libSDL2.a */; };
        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 */; };
@@ -156,14 +182,11 @@
        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 */; };
        FABA34941D8B578200915323 /* testaudiocapture.c in Sources */ = {isa = PBXBuildFile; fileRef = FABA34931D8B578200915323 /* testaudiocapture.c */; };
        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 */; };
        FABA349D1D8B582100915323 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FD1B48B80E3131CA007AB34E /* libSDL2.a */; };
        FABA349E1D8B582100915323 /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA684F7A1BAF1A4400DCFD1A /* GameController.framework */; };
        FABA349F1D8B582100915323 /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA8B4BAC1967076F00F8EB7C /* CoreMotion.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 */; };
@@ -172,7 +195,6 @@
        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 */; };
        FABA34AF1D8B59F800915323 /* testaudiocapture.c in Sources */ = {isa = PBXBuildFile; fileRef = FABA34931D8B578200915323 /* testaudiocapture.c */; };
        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 */; };
@@ -387,6 +409,34 @@
            remoteGlobalIDString = AA1EE4461760589B0029C7A5;
            remoteInfo = SDL2test;
        };
        F3F758C922AC55B5001D97F2 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
            proxyType = 2;
            remoteGlobalIDString = 52ED1E5C222889500061FCE0;
            remoteInfo = "libSDL-iOS-dylib";
        };
        F3F758CB22AC55B5001D97F2 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
            proxyType = 2;
            remoteGlobalIDString = F3E3C7572241389A007D243C;
            remoteInfo = "libSDL-tvOS-dylib";
        };
        F3F758CD22AC55B5001D97F2 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
            proxyType = 2;
            remoteGlobalIDString = F3E3C65222406928007D243C;
            remoteInfo = "libSDLmain-iOS";
        };
        F3F758CF22AC55B5001D97F2 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
            proxyType = 2;
            remoteGlobalIDString = F3E3C75F224138AE007D243C;
            remoteInfo = "libSDLmain-tvOS";
        };
        FA3D992A1BC4E619002C96C8 /* PBXContainerItemProxy */ = {
            isa = PBXContainerItemProxy;
            containerPortal = FD1B48AC0E3131CA007AB34E /* SDL.xcodeproj */;
@@ -435,6 +485,7 @@
        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>"; };
        F3F758D722AC58A1001D97F2 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/AppleTVOS.platform/Developer/SDKs/AppleTVOS12.2.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; };
        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>"; };
@@ -504,17 +555,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B51D8B5B8400915323 /* AVFoundation.framework in Frameworks */,
                F3F758D322AC561A001D97F2 /* libSDL2test.a in Frameworks */,
                046CEF7B13254F23007AD51D /* libSDL2.a in Frameworks */,
                FA684F841BAF1A5C00DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD1196766C900F8EB7C /* CoreMotion.framework in Frameworks */,
                046CEF7C13254F23007AD51D /* AudioToolbox.framework in Frameworks */,
                FABA34B51D8B5B8400915323 /* AVFoundation.framework in Frameworks */,
                046CEF8213254F23007AD51D /* CoreAudio.framework in Frameworks */,
                046CEF7F13254F23007AD51D /* CoreGraphics.framework in Frameworks */,
                FA8B4BD1196766C900F8EB7C /* CoreMotion.framework in Frameworks */,
                046CEF8113254F23007AD51D /* Foundation.framework in Frameworks */,
                FA684F841BAF1A5C00DCFD1A /* GameController.framework in Frameworks */,
                F3F758DF22AC5B94001D97F2 /* Metal.framework in Frameworks */,
                046CEF7D13254F23007AD51D /* QuartzCore.framework in Frameworks */,
                046CEF7E13254F23007AD51D /* OpenGLES.framework in Frameworks */,
                046CEF7F13254F23007AD51D /* CoreGraphics.framework in Frameworks */,
                046CEF8013254F23007AD51D /* UIKit.framework in Frameworks */,
                046CEF8113254F23007AD51D /* Foundation.framework in Frameworks */,
                046CEF8213254F23007AD51D /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -522,18 +575,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B01D8B5B6400915323 /* AVFoundation.framework in Frameworks */,
                AA1EE470176059D00029C7A5 /* libSDL2test.a in Frameworks */,
                047A63E213285C3200CD7973 /* libSDL2.a in Frameworks */,
                FA684F7B1BAF1A4400DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BAD1967076F00F8EB7C /* CoreMotion.framework in Frameworks */,
                047A63E313285C3200CD7973 /* AudioToolbox.framework in Frameworks */,
                047A63E413285C3200CD7973 /* QuartzCore.framework in Frameworks */,
                047A63E513285C3200CD7973 /* OpenGLES.framework in Frameworks */,
                047A63E613285C3200CD7973 /* CoreGraphics.framework in Frameworks */,
                047A63E713285C3200CD7973 /* UIKit.framework in Frameworks */,
                047A63E813285C3200CD7973 /* Foundation.framework in Frameworks */,
                FABA34B01D8B5B6400915323 /* AVFoundation.framework in Frameworks */,
                047A63E913285C3200CD7973 /* CoreAudio.framework in Frameworks */,
                047A63E613285C3200CD7973 /* CoreGraphics.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;
        };
@@ -541,18 +595,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34C41D8B5BCB00915323 /* AVFoundation.framework in Frameworks */,
                AA1EE47817605BF60029C7A5 /* libSDL2test.a in Frameworks */,
                FDBDE5810E313465006BAC0B /* libSDL2.a in Frameworks */,
                FA684F931BAF1A8A00DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BE0196766F400F8EB7C /* CoreMotion.framework in Frameworks */,
                FDA8A89F0E2D111A00EA573E /* AudioToolbox.framework in Frameworks */,
                FABA34C41D8B5BCB00915323 /* AVFoundation.framework in Frameworks */,
                FDA8A8A50E2D111A00EA573E /* CoreAudio.framework in Frameworks */,
                FDA8A8A20E2D111A00EA573E /* CoreGraphics.framework in Frameworks */,
                FA8B4BE0196766F400F8EB7C /* CoreMotion.framework in Frameworks */,
                FDA8A8A40E2D111A00EA573E /* Foundation.framework in Frameworks */,
                FA684F931BAF1A8A00DCFD1A /* GameController.framework in Frameworks */,
                F3F758EC22AC5DA6001D97F2 /* Metal.framework in Frameworks */,
                FDA8A8A00E2D111A00EA573E /* QuartzCore.framework in Frameworks */,
                FDA8A8A10E2D111A00EA573E /* OpenGLES.framework in Frameworks */,
                FDA8A8A20E2D111A00EA573E /* CoreGraphics.framework in Frameworks */,
                FDA8A8A30E2D111A00EA573E /* UIKit.framework in Frameworks */,
                FDA8A8A40E2D111A00EA573E /* Foundation.framework in Frameworks */,
                FDA8A8A50E2D111A00EA573E /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -560,17 +615,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34BC1D8B5BA600915323 /* AVFoundation.framework in Frameworks */,
                56ED0502118A8FE400A56AA6 /* libSDL2.a in Frameworks */,
                FA684F8B1BAF1A7100DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD8196766DD00F8EB7C /* CoreMotion.framework in Frameworks */,
                56ED0503118A8FE400A56AA6 /* AudioToolbox.framework in Frameworks */,
                FABA34BC1D8B5BA600915323 /* AVFoundation.framework in Frameworks */,
                56ED0509118A8FE400A56AA6 /* CoreAudio.framework in Frameworks */,
                56ED0506118A8FE400A56AA6 /* CoreGraphics.framework in Frameworks */,
                FA8B4BD8196766DD00F8EB7C /* CoreMotion.framework in Frameworks */,
                56ED0508118A8FE400A56AA6 /* Foundation.framework in Frameworks */,
                FA684F8B1BAF1A7100DCFD1A /* GameController.framework in Frameworks */,
                F3F758E622AC5CC5001D97F2 /* Metal.framework in Frameworks */,
                56ED0504118A8FE400A56AA6 /* QuartzCore.framework in Frameworks */,
                56ED0505118A8FE400A56AA6 /* OpenGLES.framework in Frameworks */,
                56ED0506118A8FE400A56AA6 /* CoreGraphics.framework in Frameworks */,
                56ED0507118A8FE400A56AA6 /* UIKit.framework in Frameworks */,
                56ED0508118A8FE400A56AA6 /* Foundation.framework in Frameworks */,
                56ED0509118A8FE400A56AA6 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -578,18 +634,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                AA13B3171FB8AEBC00D9FEE6 /* AVFoundation.framework in Frameworks */,
                AA13B3181FB8AEBC00D9FEE6 /* libSDL2test.a in Frameworks */,
                AA13B3191FB8AEBC00D9FEE6 /* libSDL2.a in Frameworks */,
                AA13B31A1FB8AEBC00D9FEE6 /* GameController.framework in Frameworks */,
                AA13B31B1FB8AEBC00D9FEE6 /* CoreMotion.framework in Frameworks */,
                AA13B31C1FB8AEBC00D9FEE6 /* AudioToolbox.framework in Frameworks */,
                AA13B3171FB8AEBC00D9FEE6 /* AVFoundation.framework in Frameworks */,
                AA13B3221FB8AEBC00D9FEE6 /* CoreAudio.framework in Frameworks */,
                AA13B31F1FB8AEBC00D9FEE6 /* CoreGraphics.framework in Frameworks */,
                AA13B31B1FB8AEBC00D9FEE6 /* CoreMotion.framework in Frameworks */,
                AA13B3211FB8AEBC00D9FEE6 /* Foundation.framework in Frameworks */,
                AA13B31A1FB8AEBC00D9FEE6 /* GameController.framework in Frameworks */,
                F3F758ED22AC5DC5001D97F2 /* Metal.framework in Frameworks */,
                AA13B31D1FB8AEBC00D9FEE6 /* QuartzCore.framework in Frameworks */,
                AA13B31E1FB8AEBC00D9FEE6 /* OpenGLES.framework in Frameworks */,
                AA13B31F1FB8AEBC00D9FEE6 /* CoreGraphics.framework in Frameworks */,
                AA13B3201FB8AEBC00D9FEE6 /* UIKit.framework in Frameworks */,
                AA13B3211FB8AEBC00D9FEE6 /* Foundation.framework in Frameworks */,
                AA13B3221FB8AEBC00D9FEE6 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -597,18 +654,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34BE1D8B5BB000915323 /* AVFoundation.framework in Frameworks */,
                AA1EE47617605B9E0029C7A5 /* libSDL2test.a in Frameworks */,
                AAE7DEE114CBB1E100DF1A0E /* libSDL2.a in Frameworks */,
                FA684F8D1BAF1A7800DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BDA196766E200F8EB7C /* CoreMotion.framework in Frameworks */,
                AAE7DEE214CBB1E100DF1A0E /* AudioToolbox.framework in Frameworks */,
                FABA34BE1D8B5BB000915323 /* AVFoundation.framework in Frameworks */,
                AAE7DEE814CBB1E100DF1A0E /* CoreAudio.framework in Frameworks */,
                AAE7DEE514CBB1E100DF1A0E /* CoreGraphics.framework in Frameworks */,
                FA8B4BDA196766E200F8EB7C /* CoreMotion.framework in Frameworks */,
                AAE7DEE714CBB1E100DF1A0E /* Foundation.framework in Frameworks */,
                FA684F8D1BAF1A7800DCFD1A /* GameController.framework in Frameworks */,
                F3F758E722AC5CFE001D97F2 /* Metal.framework in Frameworks */,
                AAE7DEE314CBB1E100DF1A0E /* QuartzCore.framework in Frameworks */,
                AAE7DEE414CBB1E100DF1A0E /* OpenGLES.framework in Frameworks */,
                AAE7DEE514CBB1E100DF1A0E /* CoreGraphics.framework in Frameworks */,
                AAE7DEE614CBB1E100DF1A0E /* UIKit.framework in Frameworks */,
                AAE7DEE714CBB1E100DF1A0E /* Foundation.framework in Frameworks */,
                AAE7DEE814CBB1E100DF1A0E /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -616,19 +674,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                AA2F57AA1FDB544800832AD7 /* Metal.framework in Frameworks */,
                FABA34BD1D8B5BAB00915323 /* AVFoundation.framework in Frameworks */,
                AA1EE47517605B930029C7A5 /* libSDL2test.a in Frameworks */,
                AAE7DFA614CBB54E00DF1A0E /* libSDL2.a in Frameworks */,
                FA684F8C1BAF1A7400DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD9196766E000F8EB7C /* CoreMotion.framework in Frameworks */,
                AAE7DFA714CBB54E00DF1A0E /* AudioToolbox.framework in Frameworks */,
                FABA34BD1D8B5BAB00915323 /* AVFoundation.framework in Frameworks */,
                AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */,
                AAE7DFAA14CBB54E00DF1A0E /* CoreGraphics.framework in Frameworks */,
                FA8B4BD9196766E000F8EB7C /* CoreMotion.framework in Frameworks */,
                AAE7DFAC14CBB54E00DF1A0E /* Foundation.framework in Frameworks */,
                FA684F8C1BAF1A7400DCFD1A /* GameController.framework in Frameworks */,
                AA2F57AA1FDB544800832AD7 /* Metal.framework in Frameworks */,
                AAE7DFA814CBB54E00DF1A0E /* QuartzCore.framework in Frameworks */,
                AAE7DFA914CBB54E00DF1A0E /* OpenGLES.framework in Frameworks */,
                AAE7DFAA14CBB54E00DF1A0E /* CoreGraphics.framework in Frameworks */,
                AAE7DFAB14CBB54E00DF1A0E /* UIKit.framework in Frameworks */,
                AAE7DFAC14CBB54E00DF1A0E /* Foundation.framework in Frameworks */,
                AAE7DFAD14CBB54E00DF1A0E /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -637,14 +695,14 @@
            buildActionMask = 2147483647;
            files = (
                FAA8CEE41BDF06D600D3BD45 /* libSDL2.a in Frameworks */,
                FA3D99481BC4E6AD002C96C8 /* GameController.framework in Frameworks */,
                FA3D994A1BC4E6AD002C96C8 /* AudioToolbox.framework in Frameworks */,
                FA3D99501BC4E6AD002C96C8 /* CoreAudio.framework in Frameworks */,
                FA3D994D1BC4E6AD002C96C8 /* CoreGraphics.framework in Frameworks */,
                FA3D994F1BC4E6AD002C96C8 /* Foundation.framework in Frameworks */,
                FA3D99481BC4E6AD002C96C8 /* GameController.framework in Frameworks */,
                FA3D994B1BC4E6AD002C96C8 /* QuartzCore.framework in Frameworks */,
                FA3D994C1BC4E6AD002C96C8 /* OpenGLES.framework in Frameworks */,
                FA3D994D1BC4E6AD002C96C8 /* CoreGraphics.framework in Frameworks */,
                FA3D994E1BC4E6AD002C96C8 /* UIKit.framework in Frameworks */,
                FA3D994F1BC4E6AD002C96C8 /* Foundation.framework in Frameworks */,
                FA3D99501BC4E6AD002C96C8 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -652,17 +710,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34831D8B575200915323 /* AVFoundation.framework in Frameworks */,
                FABA34841D8B575200915323 /* libSDL2.a in Frameworks */,
                FABA34851D8B575200915323 /* GameController.framework in Frameworks */,
                FABA34861D8B575200915323 /* CoreMotion.framework in Frameworks */,
                FABA34871D8B575200915323 /* AudioToolbox.framework in Frameworks */,
                FABA34831D8B575200915323 /* AVFoundation.framework in Frameworks */,
                FABA348D1D8B575200915323 /* CoreAudio.framework in Frameworks */,
                FABA348A1D8B575200915323 /* CoreGraphics.framework in Frameworks */,
                FABA34861D8B575200915323 /* CoreMotion.framework in Frameworks */,
                FABA348C1D8B575200915323 /* Foundation.framework in Frameworks */,
                FABA34851D8B575200915323 /* GameController.framework in Frameworks */,
                F3F758D522AC57D8001D97F2 /* Metal.framework in Frameworks */,
                FABA34881D8B575200915323 /* QuartzCore.framework in Frameworks */,
                FABA34891D8B575200915323 /* OpenGLES.framework in Frameworks */,
                FABA348A1D8B575200915323 /* CoreGraphics.framework in Frameworks */,
                FABA348B1D8B575200915323 /* UIKit.framework in Frameworks */,
                FABA348C1D8B575200915323 /* Foundation.framework in Frameworks */,
                FABA348D1D8B575200915323 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -670,17 +729,16 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA349C1D8B582100915323 /* AVFoundation.framework in Frameworks */,
                FABA349D1D8B582100915323 /* libSDL2.a in Frameworks */,
                FABA349E1D8B582100915323 /* GameController.framework in Frameworks */,
                FABA349F1D8B582100915323 /* CoreMotion.framework in Frameworks */,
                F3F758D922AC596E001D97F2 /* libSDL2.a in Frameworks */,
                FABA34A01D8B582100915323 /* AudioToolbox.framework in Frameworks */,
                FABA349C1D8B582100915323 /* AVFoundation.framework in Frameworks */,
                FABA34A61D8B582100915323 /* CoreAudio.framework in Frameworks */,
                FABA34A31D8B582100915323 /* CoreGraphics.framework in Frameworks */,
                FABA34A51D8B582100915323 /* Foundation.framework in Frameworks */,
                FABA349E1D8B582100915323 /* GameController.framework in Frameworks */,
                FABA34A11D8B582100915323 /* QuartzCore.framework in Frameworks */,
                FABA34A21D8B582100915323 /* OpenGLES.framework in Frameworks */,
                FABA34A31D8B582100915323 /* CoreGraphics.framework in Frameworks */,
                FABA34A41D8B582100915323 /* UIKit.framework in Frameworks */,
                FABA34A51D8B582100915323 /* Foundation.framework in Frameworks */,
                FABA34A61D8B582100915323 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -688,17 +746,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34AE1D8B58B200915323 /* AVFoundation.framework in Frameworks */,
                FAE0E9861BAF9B230098DFA4 /* libSDL2.a in Frameworks */,
                FAE0E9871BAF9B230098DFA4 /* GameController.framework in Frameworks */,
                FAE0E9881BAF9B230098DFA4 /* CoreMotion.framework in Frameworks */,
                FAE0E9891BAF9B230098DFA4 /* AudioToolbox.framework in Frameworks */,
                FABA34AE1D8B58B200915323 /* AVFoundation.framework in Frameworks */,
                FAE0E98F1BAF9B230098DFA4 /* CoreAudio.framework in Frameworks */,
                FAE0E98C1BAF9B230098DFA4 /* CoreGraphics.framework in Frameworks */,
                FAE0E9881BAF9B230098DFA4 /* CoreMotion.framework in Frameworks */,
                FAE0E98E1BAF9B230098DFA4 /* Foundation.framework in Frameworks */,
                FAE0E9871BAF9B230098DFA4 /* GameController.framework in Frameworks */,
                F3F758DD22AC5A6C001D97F2 /* Metal.framework in Frameworks */,
                FAE0E98A1BAF9B230098DFA4 /* QuartzCore.framework in Frameworks */,
                FAE0E98B1BAF9B230098DFA4 /* OpenGLES.framework in Frameworks */,
                FAE0E98C1BAF9B230098DFA4 /* CoreGraphics.framework in Frameworks */,
                FAE0E98D1BAF9B230098DFA4 /* UIKit.framework in Frameworks */,
                FAE0E98E1BAF9B230098DFA4 /* Foundation.framework in Frameworks */,
                FAE0E98F1BAF9B230098DFA4 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -706,17 +765,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34771D8B4EAD00915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5850E313495006BAC0B /* libSDL2.a in Frameworks */,
                FA684F7F1BAF1A4D00DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BC9196766BC00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDA8AAB10E2D330F00EA573E /* AudioToolbox.framework in Frameworks */,
                FABA34771D8B4EAD00915323 /* AVFoundation.framework in Frameworks */,
                FDA8AAB70E2D330F00EA573E /* CoreAudio.framework in Frameworks */,
                FDA8AAB40E2D330F00EA573E /* CoreGraphics.framework in Frameworks */,
                FA8B4BC9196766BC00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDA8AAB60E2D330F00EA573E /* Foundation.framework in Frameworks */,
                FA684F7F1BAF1A4D00DCFD1A /* GameController.framework in Frameworks */,
                F3F758D622AC5811001D97F2 /* Metal.framework in Frameworks */,
                FDA8AAB20E2D330F00EA573E /* QuartzCore.framework in Frameworks */,
                FDA8AAB30E2D330F00EA573E /* OpenGLES.framework in Frameworks */,
                FDA8AAB40E2D330F00EA573E /* CoreGraphics.framework in Frameworks */,
                FDA8AAB50E2D330F00EA573E /* UIKit.framework in Frameworks */,
                FDA8AAB60E2D330F00EA573E /* Foundation.framework in Frameworks */,
                FDA8AAB70E2D330F00EA573E /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -724,17 +784,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B11D8B5B6C00915323 /* AVFoundation.framework in Frameworks */,
                FDBDE58C0E3134F3006BAC0B /* libSDL2.a in Frameworks */,
                FA684F801BAF1A5000DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BCD196766BF00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDAAC3C30E2D47E6001DB1D8 /* AudioToolbox.framework in Frameworks */,
                FABA34B11D8B5B6C00915323 /* AVFoundation.framework in Frameworks */,
                FDAAC3C90E2D47E6001DB1D8 /* CoreAudio.framework in Frameworks */,
                FDAAC3C60E2D47E6001DB1D8 /* CoreGraphics.framework in Frameworks */,
                FA8B4BCD196766BF00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDAAC3C80E2D47E6001DB1D8 /* Foundation.framework in Frameworks */,
                FA684F801BAF1A5000DCFD1A /* GameController.framework in Frameworks */,
                F3F758DA22AC59A5001D97F2 /* Metal.framework in Frameworks */,
                FDAAC3C40E2D47E6001DB1D8 /* QuartzCore.framework in Frameworks */,
                FDAAC3C50E2D47E6001DB1D8 /* OpenGLES.framework in Frameworks */,
                FDAAC3C60E2D47E6001DB1D8 /* CoreGraphics.framework in Frameworks */,
                FDAAC3C70E2D47E6001DB1D8 /* UIKit.framework in Frameworks */,
                FDAAC3C80E2D47E6001DB1D8 /* Foundation.framework in Frameworks */,
                FDAAC3C90E2D47E6001DB1D8 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -742,17 +803,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B31D8B5B7800915323 /* AVFoundation.framework in Frameworks */,
                FDBDE59B0E31356A006BAC0B /* libSDL2.a in Frameworks */,
                FA684F821BAF1A5700DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BCF196766C400F8EB7C /* CoreMotion.framework in Frameworks */,
                FDAAC5910E2D5429001DB1D8 /* AudioToolbox.framework in Frameworks */,
                FABA34B31D8B5B7800915323 /* AVFoundation.framework in Frameworks */,
                FDAAC5970E2D5429001DB1D8 /* CoreAudio.framework in Frameworks */,
                FDAAC5940E2D5429001DB1D8 /* CoreGraphics.framework in Frameworks */,
                FA8B4BCF196766C400F8EB7C /* CoreMotion.framework in Frameworks */,
                FDAAC5960E2D5429001DB1D8 /* Foundation.framework in Frameworks */,
                FA684F821BAF1A5700DCFD1A /* GameController.framework in Frameworks */,
                F3F758DB22AC5A1B001D97F2 /* Metal.framework in Frameworks */,
                FDAAC5920E2D5429001DB1D8 /* QuartzCore.framework in Frameworks */,
                FDAAC5930E2D5429001DB1D8 /* OpenGLES.framework in Frameworks */,
                FDAAC5940E2D5429001DB1D8 /* CoreGraphics.framework in Frameworks */,
                FDAAC5950E2D5429001DB1D8 /* UIKit.framework in Frameworks */,
                FDAAC5960E2D5429001DB1D8 /* Foundation.framework in Frameworks */,
                FDAAC5970E2D5429001DB1D8 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -760,17 +822,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B41D8B5B7C00915323 /* AVFoundation.framework in Frameworks */,
                FDBDE59F0E31358D006BAC0B /* libSDL2.a in Frameworks */,
                FA684F831BAF1A5A00DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD0196766C600F8EB7C /* CoreMotion.framework in Frameworks */,
                FDAAC5BF0E2D55B5001DB1D8 /* AudioToolbox.framework in Frameworks */,
                FABA34B41D8B5B7C00915323 /* AVFoundation.framework in Frameworks */,
                FDAAC5C50E2D55B5001DB1D8 /* CoreAudio.framework in Frameworks */,
                FDAAC5C20E2D55B5001DB1D8 /* CoreGraphics.framework in Frameworks */,
                FA8B4BD0196766C600F8EB7C /* CoreMotion.framework in Frameworks */,
                FDAAC5C40E2D55B5001DB1D8 /* Foundation.framework in Frameworks */,
                FA684F831BAF1A5A00DCFD1A /* GameController.framework in Frameworks */,
                F3F758DC22AC5A46001D97F2 /* Metal.framework in Frameworks */,
                FDAAC5C00E2D55B5001DB1D8 /* QuartzCore.framework in Frameworks */,
                FDAAC5C10E2D55B5001DB1D8 /* OpenGLES.framework in Frameworks */,
                FDAAC5C20E2D55B5001DB1D8 /* CoreGraphics.framework in Frameworks */,
                FDAAC5C30E2D55B5001DB1D8 /* UIKit.framework in Frameworks */,
                FDAAC5C40E2D55B5001DB1D8 /* Foundation.framework in Frameworks */,
                FDAAC5C50E2D55B5001DB1D8 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -778,18 +841,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B61D8B5B8900915323 /* AVFoundation.framework in Frameworks */,
                AA1EE47417605B5C0029C7A5 /* libSDL2test.a in Frameworks */,
                FDBDE57C0E313445006BAC0B /* libSDL2.a in Frameworks */,
                FA684F851BAF1A6000DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD2196766CB00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDAAC61C0E2D5914001DB1D8 /* AudioToolbox.framework in Frameworks */,
                FABA34B61D8B5B8900915323 /* AVFoundation.framework in Frameworks */,
                FDAAC6220E2D5914001DB1D8 /* CoreAudio.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 */,
                FDAAC61D0E2D5914001DB1D8 /* QuartzCore.framework in Frameworks */,
                FDAAC61E0E2D5914001DB1D8 /* OpenGLES.framework in Frameworks */,
                FDAAC61F0E2D5914001DB1D8 /* CoreGraphics.framework in Frameworks */,
                FDAAC6200E2D5914001DB1D8 /* UIKit.framework in Frameworks */,
                FDAAC6210E2D5914001DB1D8 /* Foundation.framework in Frameworks */,
                FDAAC6220E2D5914001DB1D8 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -797,19 +861,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                AA2F57AB1FDB5A0900832AD7 /* Metal.framework in Frameworks */,
                FABA34B21D8B5B7300915323 /* AVFoundation.framework in Frameworks */,
                AA1EE47117605A7F0029C7A5 /* libSDL2test.a in Frameworks */,
                FDC42FF40F0D866D009C87E1 /* libSDL2.a in Frameworks */,
                FA684F811BAF1A5300DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BCE196766C100F8EB7C /* CoreMotion.framework in Frameworks */,
                FDC42FF60F0D866D009C87E1 /* AudioToolbox.framework in Frameworks */,
                FABA34B21D8B5B7300915323 /* AVFoundation.framework in Frameworks */,
                FDC42FFC0F0D866D009C87E1 /* CoreAudio.framework in Frameworks */,
                FDC42FF90F0D866D009C87E1 /* CoreGraphics.framework in Frameworks */,
                FA8B4BCE196766C100F8EB7C /* CoreMotion.framework in Frameworks */,
                FDC42FFB0F0D866D009C87E1 /* Foundation.framework in Frameworks */,
                FA684F811BAF1A5300DCFD1A /* GameController.framework in Frameworks */,
                AA2F57AB1FDB5A0900832AD7 /* Metal.framework in Frameworks */,
                FDC42FF70F0D866D009C87E1 /* QuartzCore.framework in Frameworks */,
                FDC42FF80F0D866D009C87E1 /* OpenGLES.framework in Frameworks */,
                FDC42FF90F0D866D009C87E1 /* CoreGraphics.framework in Frameworks */,
                FDC42FFA0F0D866D009C87E1 /* UIKit.framework in Frameworks */,
                FDC42FFB0F0D866D009C87E1 /* Foundation.framework in Frameworks */,
                FDC42FFC0F0D866D009C87E1 /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -817,17 +881,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34C11D8B5BBE00915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5A90E3135C0006BAC0B /* libSDL2.a in Frameworks */,
                FA684F901BAF1A8100DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BDD196766EB00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C1000E2E4F4B00B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34C11D8B5BBE00915323 /* AVFoundation.framework in Frameworks */,
                FDD2C1060E2E4F4B00B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C1030E2E4F4B00B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BDD196766EB00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C1050E2E4F4B00B7A85F /* Foundation.framework in Frameworks */,
                FA684F901BAF1A8100DCFD1A /* GameController.framework in Frameworks */,
                F3F758E922AC5D51001D97F2 /* Metal.framework in Frameworks */,
                FDD2C1010E2E4F4B00B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C1020E2E4F4B00B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C1030E2E4F4B00B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C1040E2E4F4B00B7A85F /* UIKit.framework in Frameworks */,
                FDD2C1050E2E4F4B00B7A85F /* Foundation.framework in Frameworks */,
                FDD2C1060E2E4F4B00B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -835,17 +900,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B71D8B5B8D00915323 /* AVFoundation.framework in Frameworks */,
                F3F758E122AC5BE9001D97F2 /* Metal.framework in Frameworks */,
                FDBDE5AE0E3135E6006BAC0B /* libSDL2.a in Frameworks */,
                FA684F861BAF1A6200DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD3196766CE00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C1770E2E52C000B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34B71D8B5B8D00915323 /* AVFoundation.framework in Frameworks */,
                FDD2C17D0E2E52C000B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C17A0E2E52C000B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BD3196766CE00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C17C0E2E52C000B7A85F /* Foundation.framework in Frameworks */,
                FA684F861BAF1A6200DCFD1A /* GameController.framework in Frameworks */,
                FDD2C1780E2E52C000B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C1790E2E52C000B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C17A0E2E52C000B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C17B0E2E52C000B7A85F /* UIKit.framework in Frameworks */,
                FDD2C17C0E2E52C000B7A85F /* Foundation.framework in Frameworks */,
                FDD2C17D0E2E52C000B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -853,17 +919,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B81D8B5B9200915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5B60E3135FE006BAC0B /* libSDL2.a in Frameworks */,
                FA684F871BAF1A6500DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD4196766D100F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C19B0E2E534F00B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34B81D8B5B9200915323 /* AVFoundation.framework in Frameworks */,
                FDD2C1A10E2E534F00B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C19E0E2E534F00B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BD4196766D100F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C1A00E2E534F00B7A85F /* Foundation.framework in Frameworks */,
                FA684F871BAF1A6500DCFD1A /* GameController.framework in Frameworks */,
                F3F758E222AC5C12001D97F2 /* Metal.framework in Frameworks */,
                FDD2C19C0E2E534F00B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C19D0E2E534F00B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C19E0E2E534F00B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C19F0E2E534F00B7A85F /* UIKit.framework in Frameworks */,
                FDD2C1A00E2E534F00B7A85F /* Foundation.framework in Frameworks */,
                FDD2C1A10E2E534F00B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -871,17 +938,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34B91D8B5B9600915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5BC0E31364D006BAC0B /* libSDL2.a in Frameworks */,
                FA684F881BAF1A6800DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD5196766D400F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C4540E2E773800B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34B91D8B5B9600915323 /* AVFoundation.framework in Frameworks */,
                FDD2C45A0E2E773800B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C4570E2E773800B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BD5196766D400F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C4590E2E773800B7A85F /* Foundation.framework in Frameworks */,
                FA684F881BAF1A6800DCFD1A /* GameController.framework in Frameworks */,
                F3F758E322AC5C34001D97F2 /* Metal.framework in Frameworks */,
                FDD2C4550E2E773800B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C4560E2E773800B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C4570E2E773800B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C4580E2E773800B7A85F /* UIKit.framework in Frameworks */,
                FDD2C4590E2E773800B7A85F /* Foundation.framework in Frameworks */,
                FDD2C45A0E2E773800B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -889,17 +957,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34BA1D8B5B9B00915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5C20E313663006BAC0B /* libSDL2.a in Frameworks */,
                FA684F891BAF1A6A00DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD6196766D700F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C4720E2E77D700B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34BA1D8B5B9B00915323 /* AVFoundation.framework in Frameworks */,
                FDD2C4780E2E77D700B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C4750E2E77D700B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BD6196766D700F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C4770E2E77D700B7A85F /* Foundation.framework in Frameworks */,
                FA684F891BAF1A6A00DCFD1A /* GameController.framework in Frameworks */,
                F3F758E422AC5C83001D97F2 /* Metal.framework in Frameworks */,
                FDD2C4730E2E77D700B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C4740E2E77D700B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C4750E2E77D700B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C4760E2E77D700B7A85F /* UIKit.framework in Frameworks */,
                FDD2C4770E2E77D700B7A85F /* Foundation.framework in Frameworks */,
                FDD2C4780E2E77D700B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -907,17 +976,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34BB1D8B5BA100915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5C60E3136F1006BAC0B /* libSDL2.a in Frameworks */,
                FA684F8A1BAF1A6D00DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BD7196766DA00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C5010E2E7F4800B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34BB1D8B5BA100915323 /* AVFoundation.framework in Frameworks */,
                FDD2C5040E2E7F4800B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C5070E2E7F4800B7A85F /* CoreAudio.framework in Frameworks */,
                FA8B4BD7196766DA00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C5060E2E7F4800B7A85F /* Foundation.framework in Frameworks */,
                FA684F8A1BAF1A6D00DCFD1A /* GameController.framework in Frameworks */,
                F3F758E522AC5CA5001D97F2 /* Metal.framework in Frameworks */,
                FDD2C5020E2E7F4800B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C5030E2E7F4800B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C5040E2E7F4800B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C5050E2E7F4800B7A85F /* UIKit.framework in Frameworks */,
                FDD2C5060E2E7F4800B7A85F /* Foundation.framework in Frameworks */,
                FDD2C5070E2E7F4800B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -925,17 +995,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34BF1D8B5BB500915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5C80E313702006BAC0B /* libSDL2.a in Frameworks */,
                FA684F8E1BAF1A7B00DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BDB196766E500F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C51F0E2E807600B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34BF1D8B5BB500915323 /* AVFoundation.framework in Frameworks */,
                FDD2C5250E2E807600B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C5220E2E807600B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BDB196766E500F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C5240E2E807600B7A85F /* Foundation.framework in Frameworks */,
                FA684F8E1BAF1A7B00DCFD1A /* GameController.framework in Frameworks */,
                F3F758E822AC5D1B001D97F2 /* Metal.framework in Frameworks */,
                FDD2C5200E2E807600B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C5210E2E807600B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C5220E2E807600B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C5230E2E807600B7A85F /* UIKit.framework in Frameworks */,
                FDD2C5240E2E807600B7A85F /* Foundation.framework in Frameworks */,
                FDD2C5250E2E807600B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -943,19 +1014,19 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                AA2F57AC1FDB5AB600832AD7 /* Metal.framework in Frameworks */,
                FABA34C01D8B5BBA00915323 /* AVFoundation.framework in Frameworks */,
                AA1EE47717605BAB0029C7A5 /* libSDL2test.a in Frameworks */,
                FDBDE5CA0E313712006BAC0B /* libSDL2.a in Frameworks */,
                FA684F8F1BAF1A7E00DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BDC196766E800F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C5440E2E80E400B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34C01D8B5BBA00915323 /* AVFoundation.framework in Frameworks */,
                FDD2C54A0E2E80E400B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C5470E2E80E400B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BDC196766E800F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C5490E2E80E400B7A85F /* Foundation.framework in Frameworks */,
                FA684F8F1BAF1A7E00DCFD1A /* GameController.framework in Frameworks */,
                AA2F57AC1FDB5AB600832AD7 /* Metal.framework in Frameworks */,
                FDD2C5450E2E80E400B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C5460E2E80E400B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C5470E2E80E400B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C5480E2E80E400B7A85F /* UIKit.framework in Frameworks */,
                FDD2C5490E2E80E400B7A85F /* Foundation.framework in Frameworks */,
                FDD2C54A0E2E80E400B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -963,17 +1034,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34C21D8B5BC200915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5CC0E31372B006BAC0B /* libSDL2.a in Frameworks */,
                FA684F911BAF1A8400DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BDE196766EE00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C57D0E2E8C7400B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34C21D8B5BC200915323 /* AVFoundation.framework in Frameworks */,
                FDD2C5830E2E8C7400B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C5800E2E8C7400B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BDE196766EE00F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C5820E2E8C7400B7A85F /* Foundation.framework in Frameworks */,
                FA684F911BAF1A8400DCFD1A /* GameController.framework in Frameworks */,
                F3F758EA22AC5D6B001D97F2 /* Metal.framework in Frameworks */,
                FDD2C57E0E2E8C7400B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C57F0E2E8C7400B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C5800E2E8C7400B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C5810E2E8C7400B7A85F /* UIKit.framework in Frameworks */,
                FDD2C5820E2E8C7400B7A85F /* Foundation.framework in Frameworks */,
                FDD2C5830E2E8C7400B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -981,17 +1053,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34C31D8B5BC600915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5CE0E31373E006BAC0B /* libSDL2.a in Frameworks */,
                FA684F921BAF1A8700DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BDF196766F100F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C5BB0E2E8CFC00B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34C31D8B5BC600915323 /* AVFoundation.framework in Frameworks */,
                FDD2C5C10E2E8CFC00B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C5BE0E2E8CFC00B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BDF196766F100F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C5C00E2E8CFC00B7A85F /* Foundation.framework in Frameworks */,
                FA684F921BAF1A8700DCFD1A /* GameController.framework in Frameworks */,
                F3F758EB22AC5D8B001D97F2 /* Metal.framework in Frameworks */,
                FDD2C5BC0E2E8CFC00B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C5BD0E2E8CFC00B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C5BE0E2E8CFC00B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C5BF0E2E8CFC00B7A85F /* UIKit.framework in Frameworks */,
                FDD2C5C00E2E8CFC00B7A85F /* Foundation.framework in Frameworks */,
                FDD2C5C10E2E8CFC00B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -999,17 +1072,18 @@
            isa = PBXFrameworksBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34C51D8B5BD000915323 /* AVFoundation.framework in Frameworks */,
                FDBDE5D40E313789006BAC0B /* libSDL2.a in Frameworks */,
                FA684F941BAF1A9400DCFD1A /* GameController.framework in Frameworks */,
                FA8B4BE1196766F600F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C6EA0E2E959E00B7A85F /* AudioToolbox.framework in Frameworks */,
                FABA34C51D8B5BD000915323 /* AVFoundation.framework in Frameworks */,
                FDD2C6F00E2E959E00B7A85F /* CoreAudio.framework in Frameworks */,
                FDD2C6ED0E2E959E00B7A85F /* CoreGraphics.framework in Frameworks */,
                FA8B4BE1196766F600F8EB7C /* CoreMotion.framework in Frameworks */,
                FDD2C6EF0E2E959E00B7A85F /* Foundation.framework in Frameworks */,
                FA684F941BAF1A9400DCFD1A /* GameController.framework in Frameworks */,
                F3F758EE22AC5DE1001D97F2 /* Metal.framework in Frameworks */,
                FDD2C6EB0E2E959E00B7A85F /* QuartzCore.framework in Frameworks */,
                FDD2C6EC0E2E959E00B7A85F /* OpenGLES.framework in Frameworks */,
                FDD2C6ED0E2E959E00B7A85F /* CoreGraphics.framework in Frameworks */,
                FDD2C6EE0E2E959E00B7A85F /* UIKit.framework in Frameworks */,
                FDD2C6EF0E2E959E00B7A85F /* Foundation.framework in Frameworks */,
                FDD2C6F00E2E959E00B7A85F /* CoreAudio.framework in Frameworks */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -1087,7 +1161,11 @@
            isa = PBXGroup;
            children = (
                FD1B48B80E3131CA007AB34E /* libSDL2.a */,
                F3F758CA22AC55B5001D97F2 /* libSDL2.dylib */,
                FA3D992B1BC4E619002C96C8 /* libSDL2.a */,
                F3F758CC22AC55B5001D97F2 /* libSDL2.dylib */,
                F3F758CE22AC55B5001D97F2 /* libSDLmain.a */,
                F3F758D022AC55B5001D97F2 /* libSDLmain.a */,
            );
            name = Products;
            sourceTree = "<group>";
@@ -1131,6 +1209,7 @@
        FDA8A7C30E2D10FA00EA573E /* Frameworks */ = {
            isa = PBXGroup;
            children = (
                F3F758D722AC58A1001D97F2 /* Metal.framework */,
                FA684F7A1BAF1A4400DCFD1A /* GameController.framework */,
                FA8B4BAC1967076F00F8EB7C /* CoreMotion.framework */,
                FDA8A8980E2D111A00EA573E /* AudioToolbox.framework */,
@@ -1650,9 +1729,6 @@
            attributes = {
                LastUpgradeCheck = 0630;
                TargetAttributes = {
                    AA13B3111FB8AEBC00D9FEE6 = {
                        DevelopmentTeam = EH385AYQ6F;
                    };
                    FA3D99331BC4E644002C96C8 = {
                        CreatedOnToolsVersion = 7.1;
                    };
@@ -1724,6 +1800,34 @@
            fileType = archive.ar;
            path = libSDL2test.a;
            remoteRef = AA1EE451176059230029C7A5 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        F3F758CA22AC55B5001D97F2 /* libSDL2.dylib */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
            path = libSDL2.dylib;
            remoteRef = F3F758C922AC55B5001D97F2 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        F3F758CC22AC55B5001D97F2 /* libSDL2.dylib */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
            path = libSDL2.dylib;
            remoteRef = F3F758CB22AC55B5001D97F2 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        F3F758CE22AC55B5001D97F2 /* libSDLmain.a */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
            path = libSDLmain.a;
            remoteRef = F3F758CD22AC55B5001D97F2 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        F3F758D022AC55B5001D97F2 /* libSDLmain.a */ = {
            isa = PBXReferenceProxy;
            fileType = archive.ar;
            path = libSDLmain.a;
            remoteRef = F3F758CF22AC55B5001D97F2 /* PBXContainerItemProxy */;
            sourceTree = BUILT_PRODUCTS_DIR;
        };
        FA3D992B1BC4E619002C96C8 /* libSDL2.a */ = {
@@ -1985,7 +2089,6 @@
            buildActionMask = 2147483647;
            files = (
                047A63F113285CD100CD7973 /* checkkeys.c in Sources */,
                FABA34941D8B578200915323 /* testaudiocapture.c in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -2034,7 +2137,7 @@
            isa = PBXSourcesBuildPhase;
            buildActionMask = 2147483647;
            files = (
                FABA34AF1D8B59F800915323 /* testaudiocapture.c in Sources */,
                F3F758DE22AC5ABB001D97F2 /* testgamecontroller.c in Sources */,
            );
            runOnlyForDeploymentPostprocessing = 0;
        };
@@ -2212,6 +2315,7 @@
        046CEF8413254F23007AD51D /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testgesture;
            };
@@ -2220,6 +2324,7 @@
        046CEF8513254F23007AD51D /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testgesture;
            };
@@ -2228,6 +2333,7 @@
        047A63EB13285C3200CD7973 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = checkkeys;
            };
@@ -2236,6 +2342,7 @@
        047A63EC13285C3200CD7973 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = checkkeys;
            };
@@ -2244,6 +2351,7 @@
        1D6058940D05DD3E006BFB54 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testwm2;
            };
@@ -2252,6 +2360,7 @@
        1D6058950D05DD3E006BFB54 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testwm2;
            };
@@ -2260,6 +2369,7 @@
        56ED050B118A8FE400A56AA6 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testpower;
            };
@@ -2268,6 +2378,7 @@
        56ED050C118A8FE400A56AA6 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testpower;
            };
@@ -2276,7 +2387,7 @@
        AA13B3241FB8AEBC00D9FEE6 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = EH385AYQ6F;
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = "$(TARGET_NAME)";
            };
@@ -2285,7 +2396,7 @@
        AA13B3251FB8AEBC00D9FEE6 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = EH385AYQ6F;
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = "$(TARGET_NAME)";
            };
@@ -2294,6 +2405,7 @@
        AAE7DEEA14CBB1E100DF1A0E /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testscale;
            };
@@ -2302,6 +2414,7 @@
        AAE7DEEB14CBB1E100DF1A0E /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testscale;
            };
@@ -2310,6 +2423,7 @@
        AAE7DFAF14CBB54E00DF1A0E /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testrendertarget;
            };
@@ -2318,6 +2432,7 @@
        AAE7DFB014CBB54E00DF1A0E /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testrendertarget;
            };
@@ -2374,6 +2489,7 @@
                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                COPY_PHASE_STRIP = NO;
                DEBUG_INFORMATION_FORMAT = dwarf;
                DEVELOPMENT_TEAM = "";
                ENABLE_STRICT_OBJC_MSGSEND = YES;
                ENABLE_TESTABILITY = YES;
                GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -2418,6 +2534,7 @@
                CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
                COPY_PHASE_STRIP = NO;
                DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
                DEVELOPMENT_TEAM = "";
                ENABLE_NS_ASSERTIONS = NO;
                ENABLE_STRICT_OBJC_MSGSEND = YES;
                GCC_C_LANGUAGE_STANDARD = gnu99;
@@ -2442,6 +2559,7 @@
        FABA348F1D8B575200915323 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = "$(TARGET_NAME)";
            };
@@ -2450,6 +2568,7 @@
        FABA34901D8B575200915323 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = "$(TARGET_NAME)";
            };
@@ -2464,7 +2583,6 @@
                SDKROOT = appletvos;
                SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
                TVOS_DEPLOYMENT_TARGET = 9.0;
                VALID_ARCHS = arm64;
            };
            name = Debug;
        };
@@ -2477,13 +2595,13 @@
                SDKROOT = appletvos;
                SUPPORTED_PLATFORMS = "appletvsimulator appletvos";
                TVOS_DEPLOYMENT_TARGET = 9.0;
                VALID_ARCHS = arm64;
            };
            name = Release;
        };
        FAE0E9911BAF9B230098DFA4 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = "$(TARGET_NAME)";
            };
@@ -2492,6 +2610,7 @@
        FAE0E9921BAF9B230098DFA4 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = "$(TARGET_NAME)";
            };
@@ -2500,6 +2619,7 @@
        FDA8AAB90E2D330F00EA573E /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = loopwav;
            };
@@ -2508,6 +2628,7 @@
        FDA8AABA0E2D330F00EA573E /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = loopwav;
            };
@@ -2516,6 +2637,7 @@
        FDAAC3CB0E2D47E6001DB1D8 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testaudioinfo;
            };
@@ -2524,6 +2646,7 @@
        FDAAC3CC0E2D47E6001DB1D8 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testaudioinfo;
            };
@@ -2532,6 +2655,7 @@
        FDAAC5990E2D5429001DB1D8 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testerror;
            };
@@ -2540,6 +2664,7 @@
        FDAAC59A0E2D5429001DB1D8 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testerror;
            };
@@ -2548,6 +2673,7 @@
        FDAAC5C70E2D55B5001DB1D8 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testfile;
            };
@@ -2556,6 +2682,7 @@
        FDAAC5C80E2D55B5001DB1D8 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testfile;
            };
@@ -2564,6 +2691,7 @@
        FDAAC6240E2D5914001DB1D8 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testgles;
            };
@@ -2572,6 +2700,7 @@
        FDAAC6250E2D5914001DB1D8 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testgles;
            };
@@ -2580,6 +2709,7 @@
        FDC42FFE0F0D866D009C87E1 /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = torturethread;
            };
@@ -2588,6 +2718,7 @@
        FDC42FFF0F0D866D009C87E1 /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = torturethread;
            };
@@ -2596,6 +2727,7 @@
        FDD2C1080E2E4F4B00B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testthread;
            };
@@ -2604,6 +2736,7 @@
        FDD2C1090E2E4F4B00B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testthread;
            };
@@ -2612,6 +2745,7 @@
        FDD2C17F0E2E52C000B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testiconv;
            };
@@ -2620,6 +2754,7 @@
        FDD2C1800E2E52C000B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testiconv;
            };
@@ -2628,6 +2763,7 @@
        FDD2C1A30E2E534F00B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testjoystick;
            };
@@ -2636,6 +2772,7 @@
        FDD2C1A40E2E534F00B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testjoystick;
            };
@@ -2644,6 +2781,7 @@
        FDD2C45C0E2E773800B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testkeys;
            };
@@ -2652,6 +2790,7 @@
        FDD2C45D0E2E773800B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testkeys;
            };
@@ -2660,6 +2799,7 @@
        FDD2C47A0E2E77D700B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testlock;
            };
@@ -2668,6 +2808,7 @@
        FDD2C47B0E2E77D700B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testlock;
            };
@@ -2676,6 +2817,7 @@
        FDD2C5090E2E7F4800B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testplatform;
            };
@@ -2684,6 +2826,7 @@
        FDD2C50A0E2E7F4800B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testplatform;
            };
@@ -2692,6 +2835,7 @@
        FDD2C5270E2E807600B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testsem;
            };
@@ -2700,6 +2844,7 @@
        FDD2C5280E2E807600B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testsem;
            };
@@ -2708,6 +2853,7 @@
        FDD2C54C0E2E80E400B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testsprite2;
            };
@@ -2716,6 +2862,7 @@
        FDD2C54D0E2E80E400B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testsprite2;
            };
@@ -2724,6 +2871,7 @@
        FDD2C5850E2E8C7400B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testtimer;
            };
@@ -2732,6 +2880,7 @@
        FDD2C5860E2E8C7400B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testtimer;
            };
@@ -2740,6 +2889,7 @@
        FDD2C5C30E2E8CFC00B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testver;
            };
@@ -2748,6 +2898,7 @@
        FDD2C5C40E2E8CFC00B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = testver;
            };
@@ -2756,6 +2907,7 @@
        FDD2C6F20E2E959E00B7A85F /* Debug */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = torturethread;
            };
@@ -2764,6 +2916,7 @@
        FDD2C6F30E2E959E00B7A85F /* Release */ = {
            isa = XCBuildConfiguration;
            buildSettings = {
                DEVELOPMENT_TEAM = "";
                INFOPLIST_FILE = Info.plist;
                PRODUCT_NAME = torturethread;
            };
source/Xcode/SDL/Info-Framework.plist
@@ -19,10 +19,10 @@
    <key>CFBundlePackageType</key>
    <string>FMWK</string>
    <key>CFBundleShortVersionString</key>
    <string>2.0.9</string>
    <string>2.0.12</string>
    <key>CFBundleSignature</key>
    <string>SDLX</string>
    <key>CFBundleVersion</key>
    <string>2.0.9</string>
    <string>2.0.12</string>
</dict>
</plist>
source/Xcode/SDL/SDL.xcodeproj/project.pbxproj
old mode 100644 new mode 100755
Diff too large
source/Xcode/SDL/SDL.xcodeproj/project.xcworkspace/contents.xcworkspacedata
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:">
   </FileRef>
</Workspace>
source/Xcode/SDL/hidapi/Info.plist
New file
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>$(DEVELOPMENT_LANGUAGE)</string>
    <key>CFBundleExecutable</key>
    <string>$(EXECUTABLE_NAME)</string>
    <key>CFBundleIdentifier</key>
    <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>$(PRODUCT_NAME)</string>
    <key>CFBundlePackageType</key>
    <string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
    <key>CFBundleShortVersionString</key>
    <string>$(CURRENT_PROJECT_VERSION)</string>
    <key>CFBundleVersion</key>
    <string>$(CURRENT_PROJECT_VERSION)</string>
</dict>
</plist>
source/Xcode/SDL/pkg-support/SDL.info
old mode 100755 new mode 100644
source/Xcode/SDL/pkg-support/resources/License.txt
@@ -1,6 +1,6 @@
Simple DirectMedia Layer
Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  
This software is provided 'as-is', without any express or implied
warranty.  In no event will the authors be held liable for any damages
source/Xcode/SDL/pkg-support/resources/ReadMe.txt
old mode 100755 new mode 100644
source/Xcode/SDLTest/SDLTest.xcodeproj/project.pbxproj.orig
File was deleted
source/Xcode/SDLTest/SDLTest.xcodeproj/project.xcworkspace/contents.xcworkspacedata
New file
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
   version = "1.0">
   <FileRef
      location = "self:SDLTest.xcodeproj">
   </FileRef>
</Workspace>
source/Xcode/SDLTest/SDLTest.xcodeproj/project.xcworkspace/xcshareddata/SDLTest.xccheckout
New file
@@ -0,0 +1,41 @@
<?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>IDESourceControlProjectFavoriteDictionaryKey</key>
    <false/>
    <key>IDESourceControlProjectIdentifier</key>
    <string>5A369BA9-20DE-426E-B44B-E72495F03967</string>
    <key>IDESourceControlProjectName</key>
    <string>project</string>
    <key>IDESourceControlProjectOriginsDictionary</key>
    <dict>
        <key>0704B71979E31C1DFCDB3492FDBA45F2B308E03B</key>
        <string>hg::https://urkle:SeriousDucklingsLive@hg.libsdl.org/SDL</string>
    </dict>
    <key>IDESourceControlProjectPath</key>
    <string>Xcode/SDLTest/SDLTest.xcodeproj/project.xcworkspace</string>
    <key>IDESourceControlProjectRelativeInstallPathDictionary</key>
    <dict>
        <key>0704B71979E31C1DFCDB3492FDBA45F2B308E03B</key>
        <string>../../../..</string>
    </dict>
    <key>IDESourceControlProjectURL</key>
    <string>hg::https://urkle:SeriousDucklingsLive@hg.libsdl.org/SDL</string>
    <key>IDESourceControlProjectVersion</key>
    <integer>111</integer>
    <key>IDESourceControlProjectWCCIdentifier</key>
    <string>0704B71979E31C1DFCDB3492FDBA45F2B308E03B</string>
    <key>IDESourceControlProjectWCConfigurations</key>
    <array>
        <dict>
            <key>IDESourceControlRepositoryExtensionIdentifierKey</key>
            <string>public.vcs.git</string>
            <key>IDESourceControlWCCIdentifierKey</key>
            <string>0704B71979E31C1DFCDB3492FDBA45F2B308E03B</string>
            <key>IDESourceControlWCCName</key>
            <string>SDL2</string>
        </dict>
    </array>
</dict>
</plist>
source/acinclude/pkg_config.m4
New file
@@ -0,0 +1,133 @@
# PKG_PROG_PKG_CONFIG([MIN-VERSION])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
    AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
fi
if test -n "$PKG_CONFIG"; then
    _pkg_min_version=m4_default([$1], [0.9.0])
    AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
    if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
        AC_MSG_RESULT([yes])
    else
        AC_MSG_RESULT([no])
        PKG_CONFIG=""
    fi
fi[]dnl
])# PKG_PROG_PKG_CONFIG
# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
#
# Check to see whether a particular set of modules exists.  Similar
# to PKG_CHECK_MODULES(), but does not set variables or print errors.
#
# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
# only at the first occurence in configure.ac, so if the first place
# it's called might be skipped (such as if it is within an "if", you
# have to call PKG_CHECK_EXISTS manually
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_EXISTS],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
if test -n "$PKG_CONFIG" && \
    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
  m4_default([$2], [:])
m4_ifvaln([$3], [else
  $3])dnl
fi])
# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
# ---------------------------------------------
m4_define([_PKG_CONFIG],
[if test -n "$$1"; then
    pkg_cv_[]$1="$$1"
 elif test -n "$PKG_CONFIG"; then
    PKG_CHECK_EXISTS([$3],
                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
             [pkg_failed=yes])
 else
    pkg_failed=untried
fi[]dnl
])# _PKG_CONFIG
# _PKG_SHORT_ERRORS_SUPPORTED
# -----------------------------
AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi[]dnl
])# _PKG_SHORT_ERRORS_SUPPORTED
# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
# [ACTION-IF-NOT-FOUND])
#
#
# Note that if there is a possibility the first call to
# PKG_CHECK_MODULES might not happen, you should be sure to include an
# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
#
#
# --------------------------------------------------------------
AC_DEFUN([PKG_CHECK_MODULES],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
pkg_failed=no
AC_MSG_CHECKING([for $1])
_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
_PKG_CONFIG([$1][_LIBS], [libs], [$2])
m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
and $1[]_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.])
if test $pkg_failed = yes; then
       AC_MSG_RESULT([no])
        _PKG_SHORT_ERRORS_SUPPORTED
        if test $_pkg_short_errors_supported = yes; then
            $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
        else
            $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
    m4_default([$4], [AC_MSG_ERROR(
[Package requirements ($2) were not met:
$$1_PKG_ERRORS
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
_PKG_TEXT])dnl
        ])
elif test $pkg_failed = untried; then
         AC_MSG_RESULT([no])
    m4_default([$4], [AC_MSG_FAILURE(
[The pkg-config script could not be found or is too old.  Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
_PKG_TEXT
To get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
        ])
else
    $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
    $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
        AC_MSG_RESULT([yes])
    $3
fi[]dnl
])# PKG_CHECK_MODULES
source/android-project/app/build.gradle
@@ -13,15 +13,20 @@
        if (buildAsApplication) {
            applicationId "org.libsdl.app"
        }
        minSdkVersion 14
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        externalNativeBuild {
            ndkBuild {
                arguments "APP_PLATFORM=android-14"
                arguments "APP_PLATFORM=android-16"
                abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
            }
            // cmake {
            //     arguments "-DANDROID_APP_PLATFORM=android-16", "-DANDROID_STL=c++_static"
            //     // abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86', 'x86_64'
            //     abiFilters 'arm64-v8a'
            // }
        }
    }
    buildTypes {
@@ -38,6 +43,9 @@
            ndkBuild {
                path 'jni/Android.mk'
            }
            // cmake {
            //     path 'jni/CMakeLists.txt'
            // }
        }
       
    }
source/android-project/app/jni/Application.mk
@@ -7,4 +7,4 @@
APP_ABI := armeabi-v7a arm64-v8a x86 x86_64
# Min runtime API level
APP_PLATFORM=android-14
APP_PLATFORM=android-16
source/android-project/app/jni/CMakeLists.txt
New file
@@ -0,0 +1,20 @@
cmake_minimum_required(VERSION 3.6)
project(GAME)
# armeabi-v7a requires cpufeatures library
# include(AndroidNdkModules)
# android_ndk_import_module_cpufeatures()
# SDL sources are in a subfolder named "SDL"
add_subdirectory(SDL)
# Compilation of companion libraries
#add_subdirectory(SDL_image)
#add_subdirectory(SDL_mixer)
#add_subdirectory(SDL_ttf)
# Your game and its CMakeLists.txt are in a subfolder named "src"
add_subdirectory(src)
source/android-project/app/jni/src/CMakeLists.txt
New file
@@ -0,0 +1,13 @@
cmake_minimum_required(VERSION 3.6)
project(MY_APP)
find_library(SDL2 SDL2)
add_library(main SHARED)
target_sources(main PRIVATE YourSourceHere.c)
target_link_libraries(main SDL2)
source/android-project/app/src/main/AndroidManifest.xml
@@ -18,7 +18,13 @@
    <!-- Game controller support -->
    <uses-feature
        android:name="android.hardware.bluetooth"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.gamepad"
        android:required="false" />
    <uses-feature
        android:name="android.hardware.usb.host"
        android:required="false" />
    <!-- External mouse input events -->
@@ -26,8 +32,16 @@
        android:name="android.hardware.type.pc"
        android:required="false" />
    <!-- Audio recording support -->
    <!-- if you want to capture audio, uncomment this. -->
    <!-- <uses-feature
        android:name="android.hardware.microphone"
        android:required="false" /> -->
    <!-- Allow writing to external storage -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <!-- Allow access to Bluetooth devices -->
    <uses-permission android:name="android.permission.BLUETOOTH" />
    <!-- Allow access to the vibrator -->
    <uses-permission android:name="android.permission.VIBRATE" />
@@ -54,7 +68,9 @@
     
        <activity android:name="SDLActivity"
            android:label="@string/app_name"
            android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
            android:alwaysRetainTaskState="true"
            android:launchMode="singleInstance"
            android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
            >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
source/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java
@@ -1,5 +1,7 @@
package org.libsdl.app;
import android.hardware.usb.UsbDevice;
interface HIDDevice
{
    public int getId();
@@ -9,6 +11,7 @@
    public int getVersion();
    public String getManufacturerName();
    public String getProductName();
    public UsbDevice getDevice();
    public boolean open();
    public int sendFeatureReport(byte[] report);
    public int sendOutputReport(byte[] report);
source/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java
@@ -9,15 +9,15 @@
import android.bluetooth.BluetoothManager;
import android.bluetooth.BluetoothProfile;
import android.bluetooth.BluetoothGattService;
import android.hardware.usb.UsbDevice;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import android.os.*;
//import com.android.internal.util.HexDump;
import java.lang.Runnable;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.UUID;
@@ -166,13 +166,13 @@
        mHandler = new Handler(Looper.getMainLooper());
        mGatt = connectGatt();
        final HIDDeviceBLESteamController finalThis = this;
        mHandler.postDelayed(new Runnable() {
            @Override
            public void run() {
                finalThis.checkConnectionForChromebookIssue();
            }
        }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
        // final HIDDeviceBLESteamController finalThis = this;
        // mHandler.postDelayed(new Runnable() {
        //     @Override
        //     public void run() {
        //         finalThis.checkConnectionForChromebookIssue();
        //     }
        // }, CHROMEBOOK_CONNECTION_CHECK_INTERVAL);
    }
    public String getIdentifier() {
@@ -186,10 +186,13 @@
    // Because on Chromebooks we show up as a dual-mode device, it will attempt to connect TRANSPORT_AUTO, which will use TRANSPORT_BREDR instead
    // of TRANSPORT_LE.  Let's force ourselves to connect low energy.
    private BluetoothGatt connectGatt(boolean managed) {
        try {
            Method m = mDevice.getClass().getDeclaredMethod("connectGatt", Context.class, boolean.class, BluetoothGattCallback.class, int.class);
            return (BluetoothGatt) m.invoke(mDevice, mManager.getContext(), managed, this, TRANSPORT_LE);
        } catch (Exception e) {
        if (Build.VERSION.SDK_INT >= 23) {
            try {
                return mDevice.connectGatt(mManager.getContext(), managed, this, TRANSPORT_LE);
            } catch (Exception e) {
                return mDevice.connectGatt(mManager.getContext(), managed, this);
            }
        } else {
            return mDevice.connectGatt(mManager.getContext(), managed, this);
        }
    }
@@ -467,7 +470,7 @@
            // Only register controller with the native side once it has been fully configured
            if (!isRegistered()) {
                Log.v(TAG, "Registering Steam Controller with ID: " + getId());
                mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0);
                mManager.HIDDeviceConnected(getId(), getIdentifier(), getVendorId(), getProductId(), getSerialNumber(), getVersion(), getManufacturerName(), getProductName(), 0, 0, 0, 0);
                setRegistered();
            }
        }
@@ -561,6 +564,11 @@
        return "Steam Controller";
    }
    @Override
    public UsbDevice getDevice() {
        return null;
    }
    @Override
    public boolean open() {
        return true;
source/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
@@ -19,8 +19,9 @@
import android.os.Handler;
import android.os.Looper;
import java.util.HashMap;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
public class HIDDeviceManager {
@@ -50,7 +51,6 @@
    private Context mContext;
    private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>();
    private HashMap<UsbDevice, HIDDeviceUSB> mUSBDevices = new HashMap<UsbDevice, HIDDeviceUSB>();
    private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
    private int mNextDeviceId = 0;
    private SharedPreferences mSharedPreferences = null;
@@ -241,31 +241,20 @@
        }
    }
    private boolean isHIDDeviceUSB(UsbDevice usbDevice) {
        for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); ++interface_number) {
            if (isHIDDeviceInterface(usbDevice, interface_number)) {
                return true;
            }
        }
        return false;
    }
    private boolean isHIDDeviceInterface(UsbDevice usbDevice, int interface_number) {
        UsbInterface usbInterface = usbDevice.getInterface(interface_number);
    private boolean isHIDDeviceInterface(UsbDevice usbDevice, UsbInterface usbInterface) {
        if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
            return true;
        }
        if (interface_number == 0) {
            if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
                return true;
            }
        if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
            return true;
        }
        return false;
    }
    private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) {
        final int XB360_IFACE_SUBCLASS = 93;
        final int XB360_IFACE_PROTOCOL = 1; // Wired only
        final int XB360_IFACE_PROTOCOL = 1; // Wired
        final int XB360W_IFACE_PROTOCOL = 129; // Wireless
        final int[] SUPPORTED_VENDORS = {
            0x0079, // GPD Win 2
            0x044f, // Thrustmaster
@@ -275,8 +264,9 @@
            0x06a3, // Saitek
            0x0738, // Mad Catz
            0x07ff, // Mad Catz
            0x0e6f, // Unknown
            0x0e6f, // PDP
            0x0f0d, // Hori
            0x1038, // SteelSeries
            0x11c9, // Nacon
            0x12ab, // Unknown
            0x1430, // RedOctane
@@ -291,7 +281,8 @@
        if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
            usbInterface.getInterfaceSubclass() == XB360_IFACE_SUBCLASS &&
            usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL) {
            (usbInterface.getInterfaceProtocol() == XB360_IFACE_PROTOCOL ||
             usbInterface.getInterfaceProtocol() == XB360W_IFACE_PROTOCOL)) {
            int vendor_id = usbDevice.getVendorId();
            for (int supportedVid : SUPPORTED_VENDORS) {
                if (vendor_id == supportedVid) {
@@ -308,13 +299,15 @@
        final int[] SUPPORTED_VENDORS = {
            0x045e, // Microsoft
            0x0738, // Mad Catz
            0x0e6f, // Unknown
            0x0e6f, // PDP
            0x0f0d, // Hori
            0x1532, // Razer Wildcat
            0x24c6, // PowerA
            0x2e24, // Hyperkin
        };
        if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
        if (usbInterface.getId() == 0 &&
            usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
            usbInterface.getInterfaceSubclass() == XB1_IFACE_SUBCLASS &&
            usbInterface.getInterfaceProtocol() == XB1_IFACE_PROTOCOL) {
            int vendor_id = usbDevice.getVendorId();
@@ -328,45 +321,45 @@
    }
    private void handleUsbDeviceAttached(UsbDevice usbDevice) {
        if (isHIDDeviceUSB(usbDevice)) {
            connectHIDDeviceUSB(usbDevice);
        }
        connectHIDDeviceUSB(usbDevice);
    }
    private void handleUsbDeviceDetached(UsbDevice usbDevice) {
        HIDDeviceUSB device = mUSBDevices.get(usbDevice);
        if (device == null)
            return;
        int id = device.getId();
        mUSBDevices.remove(usbDevice);
        mDevicesById.remove(id);
        device.shutdown();
        HIDDeviceDisconnected(id);
        List<Integer> devices = new ArrayList<Integer>();
        for (HIDDevice device : mDevicesById.values()) {
            if (usbDevice.equals(device.getDevice())) {
                devices.add(device.getId());
            }
        }
        for (int id : devices) {
            HIDDevice device = mDevicesById.get(id);
            mDevicesById.remove(id);
            device.shutdown();
            HIDDeviceDisconnected(id);
        }
    }
    private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
        HIDDeviceUSB device = mUSBDevices.get(usbDevice);
        if (device == null)
            return;
        boolean opened = false;
        if (permission_granted) {
            opened = device.open();
        for (HIDDevice device : mDevicesById.values()) {
            if (usbDevice.equals(device.getDevice())) {
                boolean opened = false;
                if (permission_granted) {
                    opened = device.open();
                }
                HIDDeviceOpenResult(device.getId(), opened);
            }
        }
        HIDDeviceOpenResult(device.getId(), opened);
    }
    private void connectHIDDeviceUSB(UsbDevice usbDevice) {
        synchronized (this) {
            for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); interface_number++) {
                if (isHIDDeviceInterface(usbDevice, interface_number)) {
                    HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_number);
            for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
                UsbInterface usbInterface = usbDevice.getInterface(interface_index);
                if (isHIDDeviceInterface(usbDevice, usbInterface)) {
                    HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
                    int id = device.getId();
                    mUSBDevices.put(usbDevice, device);
                    mDevicesById.put(id, device);
                    HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), interface_number);
                    break;
                    HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), usbInterface.getId(), usbInterface.getInterfaceClass(), usbInterface.getInterfaceSubclass(), usbInterface.getInterfaceProtocol());
                }
            }
        }
@@ -411,7 +404,7 @@
        if (mIsChromebook) {
            mHandler = new Handler(Looper.getMainLooper());
            mLastBluetoothDevices = new ArrayList<>();
            mLastBluetoothDevices = new ArrayList<BluetoothDevice>();
            // final HIDDeviceManager finalThis = this;
            // mHandler.postDelayed(new Runnable() {
@@ -439,8 +432,8 @@
            return;
        }
        ArrayList<BluetoothDevice> disconnected = new ArrayList<>();
        ArrayList<BluetoothDevice> connected = new ArrayList<>();
        ArrayList<BluetoothDevice> disconnected = new ArrayList<BluetoothDevice>();
        ArrayList<BluetoothDevice> connected = new ArrayList<BluetoothDevice>();
        List<BluetoothDevice> currentConnected = mBluetoothManager.getConnectedDevices(BluetoothProfile.GATT);
@@ -563,33 +556,27 @@
    //////////////////////////////////////////////////////////////////////////////////////////////////////
    public boolean openDevice(int deviceID) {
        Log.v(TAG, "openDevice deviceID=" + deviceID);
        HIDDevice device = getDevice(deviceID);
        if (device == null) {
            HIDDeviceDisconnected(deviceID);
            return false;
        }
        // Look to see if this is a USB device and we have permission to access it
        for (HIDDeviceUSB device : mUSBDevices.values()) {
            if (deviceID == device.getId()) {
                UsbDevice usbDevice = device.getDevice();
                if (!mUsbManager.hasPermission(usbDevice)) {
                    HIDDeviceOpenPending(deviceID);
                    try {
                        mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
                    } catch (Exception e) {
                        Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
                        HIDDeviceOpenResult(deviceID, false);
                    }
                    return false;
                }
                break;
        UsbDevice usbDevice = device.getDevice();
        if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
            HIDDeviceOpenPending(deviceID);
            try {
                mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
            } catch (Exception e) {
                Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
                HIDDeviceOpenResult(deviceID, false);
            }
            return false;
        }
        try {
            Log.v(TAG, "openDevice deviceID=" + deviceID);
            HIDDevice device;
            device = getDevice(deviceID);
            if (device == null) {
                HIDDeviceDisconnected(deviceID);
                return false;
            }
            return device.open();
        } catch (Exception e) {
            Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
@@ -599,7 +586,7 @@
    public int sendOutputReport(int deviceID, byte[] report) {
        try {
            Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
            //Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
            HIDDevice device;
            device = getDevice(deviceID);
            if (device == null) {
@@ -616,7 +603,7 @@
    public int sendFeatureReport(int deviceID, byte[] report) {
        try {
            Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
            //Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
            HIDDevice device;
            device = getDevice(deviceID);
            if (device == null) {
@@ -633,7 +620,7 @@
    public boolean getFeatureReport(int deviceID, byte[] report) {
        try {
            Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
            //Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
            HIDDevice device;
            device = getDevice(deviceID);
            if (device == null) {
@@ -672,7 +659,7 @@
    private native void HIDDeviceRegisterCallback();
    private native void HIDDeviceReleaseCallback();
    native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number);
    native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number, int interface_class, int interface_subclass, int interface_protocol);
    native void HIDDeviceOpenPending(int deviceID);
    native void HIDDeviceOpenResult(int deviceID, boolean opened);
    native void HIDDeviceDisconnected(int deviceID);
source/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
@@ -11,6 +11,7 @@
    protected HIDDeviceManager mManager;
    protected UsbDevice mDevice;
    protected int mInterfaceIndex;
    protected int mInterface;
    protected int mDeviceId;
    protected UsbDeviceConnection mConnection;
@@ -20,16 +21,17 @@
    protected boolean mRunning;
    protected boolean mFrozen;
    public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_number) {
    public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_index) {
        mManager = manager;
        mDevice = usbDevice;
        mInterface = interface_number;
        mInterfaceIndex = interface_index;
        mInterface = mDevice.getInterface(mInterfaceIndex).getId();
        mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
        mRunning = false;
    }
    public String getIdentifier() {
        return String.format("%s/%x/%x", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId());
        return String.format("%s/%x/%x/%d", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId(), mInterfaceIndex);
    }
    @Override
@@ -88,6 +90,7 @@
        return result;
    }
    @Override
    public UsbDevice getDevice() {
        return mDevice;
    }
@@ -104,19 +107,15 @@
            return false;
        }
        // Force claim all interfaces
        for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
            UsbInterface iface = mDevice.getInterface(i);
            if (!mConnection.claimInterface(iface, true)) {
                Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
                close();
                return false;
            }
        // Force claim our interface
        UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
        if (!mConnection.claimInterface(iface, true)) {
            Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
            close();
            return false;
        }
        // Find the endpoints
        UsbInterface iface = mDevice.getInterface(mInterface);
        for (int j = 0; j < iface.getEndpointCount(); j++) {
            UsbEndpoint endpt = iface.getEndpoint(j);
            switch (endpt.getDirection()) {
@@ -166,7 +165,7 @@
            UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
            0x09/*HID set_report*/,
            (3/*HID feature*/ << 8) | report_number,
            0,
            mInterface,
            report, offset, length,
            1000/*timeout millis*/);
@@ -210,7 +209,7 @@
            UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
            0x01/*HID get_report*/,
            (3/*HID feature*/ << 8) | report_number,
            0,
            mInterface,
            report, offset, length,
            1000/*timeout millis*/);
@@ -250,10 +249,8 @@
            mInputThread = null;
        }
        if (mConnection != null) {
            for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
                UsbInterface iface = mDevice.getInterface(i);
                mConnection.releaseInterface(iface);
            }
            UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
            mConnection.releaseInterface(iface);
            mConnection.close();
            mConnection = null;
        }
source/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
@@ -37,7 +37,8 @@
public class SDLActivity extends Activity implements View.OnSystemUiVisibilityChangeListener {
    private static final String TAG = "SDL";
    public static boolean mIsResumedCalled, mIsSurfaceReady, mHasFocus;
    public static boolean mIsResumedCalled, mHasFocus;
    public static final boolean mHasMultiWindow = (Build.VERSION.SDK_INT >= 24);
    // Cursor types
    private static final int SDL_SYSTEM_CURSOR_NONE = -1;
@@ -70,14 +71,8 @@
    public static NativeState mNextNativeState;
    public static NativeState mCurrentNativeState;
    public static boolean mExitCalledFromJava;
    /** If shared libraries (e.g. SDL or the native application) could not be loaded. */
    public static boolean mBrokenLibraries;
    // If we want to separate mouse and touch events.
    //  This is only toggled in native code when a hint is set!
    public static boolean mSeparateMouseAndTouch;
    // Main components
    protected static SDLActivity mSingleton;
@@ -86,7 +81,7 @@
    protected static boolean mScreenKeyboardShown;
    protected static ViewGroup mLayout;
    protected static SDLClipboardHandler mClipboardHandler;
    protected static Hashtable<Integer, Object> mCursors;
    protected static Hashtable<Integer, PointerIcon> mCursors;
    protected static int mLastCursorID;
    protected static SDLGenericMotionListener_API12 mMotionListener;
    protected static HIDDeviceManager mHIDDeviceManager;
@@ -98,7 +93,7 @@
        if (mMotionListener == null) {
            if (Build.VERSION.SDK_INT >= 26) {
                mMotionListener = new SDLGenericMotionListener_API26();
            } else
            } else
            if (Build.VERSION.SDK_INT >= 24) {
                mMotionListener = new SDLGenericMotionListener_API24();
            } else {
@@ -142,6 +137,7 @@
     */
    protected String[] getLibraries() {
        return new String[] {
            "hidapi",
            "SDL2",
            // "SDL2_image",
            // "SDL2_mixer",
@@ -176,13 +172,11 @@
        mTextEdit = null;
        mLayout = null;
        mClipboardHandler = null;
        mCursors = new Hashtable<Integer, Object>();
        mCursors = new Hashtable<Integer, PointerIcon>();
        mLastCursorID = 0;
        mSDLThread = null;
        mExitCalledFromJava = false;
        mBrokenLibraries = false;
        mIsResumedCalled = false;
        mIsSurfaceReady = false;
        mHasFocus = true;
        mNextNativeState = NativeState.INIT;
        mCurrentNativeState = NativeState.INIT;
@@ -195,6 +189,12 @@
        Log.v(TAG, "Model: " + Build.MODEL);
        Log.v(TAG, "onCreate()");
        super.onCreate(savedInstanceState);
        try {
            Thread.currentThread().setName("SDLActivity");
        } catch (Exception e) {
            Log.v(TAG, "modify thread properties failed " + e.toString());
        }
        // Load shared libraries
        String errorMsgBrokenLib = "";
@@ -243,12 +243,7 @@
        mSingleton = this;
        SDL.setContext(this);
        if (Build.VERSION.SDK_INT >= 11) {
            mClipboardHandler = new SDLClipboardHandler_API11();
        } else {
            /* Before API 11, no clipboard notification (eg no SDL_CLIPBOARDUPDATE) */
            mClipboardHandler = new SDLClipboardHandler_Old();
        }
        mClipboardHandler = new SDLClipboardHandler_API11();
        mHIDDeviceManager = HIDDeviceManager.acquire(this);
@@ -260,6 +255,7 @@
        // Get our current screen orientation and pass it down.
        mCurrentOrientation = SDLActivity.getCurrentOrientation();
        // Only record current orientation
        SDLActivity.onNativeOrientationChanged(mCurrentOrientation);
        setContentView(mLayout);
@@ -279,29 +275,18 @@
        }
    }
    // Events
    @Override
    protected void onPause() {
        Log.v(TAG, "onPause()");
        super.onPause();
    protected void pauseNativeThread() {
        mNextNativeState = NativeState.PAUSED;
        mIsResumedCalled = false;
        if (SDLActivity.mBrokenLibraries) {
           return;
        }
        if (mHIDDeviceManager != null) {
            mHIDDeviceManager.setFrozen(true);
            return;
        }
        SDLActivity.handleNativeState();
    }
    @Override
    protected void onResume() {
        Log.v(TAG, "onResume()");
        super.onResume();
    protected void resumeNativeThread() {
        mNextNativeState = NativeState.RESUMED;
        mIsResumedCalled = true;
@@ -309,11 +294,52 @@
           return;
        }
        SDLActivity.handleNativeState();
    }
    // Events
    @Override
    protected void onPause() {
        Log.v(TAG, "onPause()");
        super.onPause();
        if (mHIDDeviceManager != null) {
            mHIDDeviceManager.setFrozen(true);
        }
        if (!mHasMultiWindow) {
            pauseNativeThread();
        }
    }
    @Override
    protected void onResume() {
        Log.v(TAG, "onResume()");
        super.onResume();
        if (mHIDDeviceManager != null) {
            mHIDDeviceManager.setFrozen(false);
        }
        if (!mHasMultiWindow) {
            resumeNativeThread();
        }
    }
        SDLActivity.handleNativeState();
    @Override
    protected void onStop() {
        Log.v(TAG, "onStop()");
        super.onStop();
        if (mHasMultiWindow) {
            pauseNativeThread();
        }
    }
    @Override
    protected void onStart() {
        Log.v(TAG, "onStart()");
        super.onStart();
        if (mHasMultiWindow) {
            resumeNativeThread();
        }
    }
    public static int getCurrentOrientation() {
@@ -326,15 +352,15 @@
            case Surface.ROTATION_0:
                result = SDL_ORIENTATION_PORTRAIT;
                break;
            case Surface.ROTATION_90:
                result = SDL_ORIENTATION_LANDSCAPE;
                break;
            case Surface.ROTATION_180:
                result = SDL_ORIENTATION_PORTRAIT_FLIPPED;
                break;
            case Surface.ROTATION_270:
                result = SDL_ORIENTATION_LANDSCAPE_FLIPPED;
                break;
@@ -352,15 +378,21 @@
           return;
        }
        SDLActivity.mHasFocus = hasFocus;
        mHasFocus = hasFocus;
        if (hasFocus) {
           mNextNativeState = NativeState.RESUMED;
           SDLActivity.getMotionListener().reclaimRelativeMouseModeIfNeeded();
        } else {
           mNextNativeState = NativeState.PAUSED;
        }
        SDLActivity.handleNativeState();
           SDLActivity.handleNativeState();
           nativeFocusChanged(true);
        } else {
           nativeFocusChanged(false);
           if (!mHasMultiWindow) {
               mNextNativeState = NativeState.PAUSED;
               SDLActivity.handleNativeState();
           }
        }
    }
    @Override
@@ -386,34 +418,25 @@
        if (SDLActivity.mBrokenLibraries) {
           super.onDestroy();
           // Reset everything in case the user re opens the app
           SDLActivity.initialize();
           return;
        }
        mNextNativeState = NativeState.PAUSED;
        SDLActivity.handleNativeState();
        // Send a quit message to the application
        SDLActivity.mExitCalledFromJava = true;
        SDLActivity.nativeQuit();
        // Now wait for the SDL thread to quit
        if (SDLActivity.mSDLThread != null) {
            // Send Quit event to "SDLThread" thread
            SDLActivity.nativeSendQuit();
            // Wait for "SDLThread" thread to end
            try {
                SDLActivity.mSDLThread.join();
            } catch(Exception e) {
                Log.v(TAG, "Problem stopping thread: " + e);
                Log.v(TAG, "Problem stopping SDLThread: " + e);
            }
            SDLActivity.mSDLThread = null;
            //Log.v(TAG, "Finished waiting for SDL thread");
        }
        super.onDestroy();
        SDLActivity.nativeQuit();
        // Reset everything in case the user re opens the app
        SDLActivity.initialize();
        super.onDestroy();
    }
    @Override
@@ -430,7 +453,9 @@
        }
        // Default system back button behavior.
        super.onBackPressed();
        if (!isFinishing()) {
            super.onBackPressed();
        }
    }
    // Called by JNI from SDL.
@@ -443,7 +468,9 @@
        runOnUiThread(new Runnable() {
            @Override
            public void run() {
                SDLActivity.this.superOnBackPressed();
                if (!SDLActivity.this.isFinishing()) {
                    SDLActivity.this.superOnBackPressed();
                }
            }
        });
    }
@@ -490,16 +517,19 @@
        // Try a transition to paused state
        if (mNextNativeState == NativeState.PAUSED) {
            nativePause();
            if (mSurface != null)
            if (mSDLThread != null) {
                nativePause();
            }
            if (mSurface != null) {
                mSurface.handlePause();
            }
            mCurrentNativeState = mNextNativeState;
            return;
        }
        // Try a transition to resumed state
        if (mNextNativeState == NativeState.RESUMED) {
            if (mIsSurfaceReady && mHasFocus && mIsResumedCalled) {
            if (mSurface.mIsSurfaceReady && mHasFocus && mIsResumedCalled) {
                if (mSDLThread == null) {
                    // This is the entry point to the C app.
                    // Start up the C app thread and enable sensor input for the first time
@@ -508,28 +538,24 @@
                    mSDLThread = new Thread(new SDLMain(), "SDLThread");
                    mSurface.enableSensor(Sensor.TYPE_ACCELEROMETER, true);
                    mSDLThread.start();
                    // No nativeResume(), don't signal Android_ResumeSem
                    mSurface.handleResume();
                } else {
                    nativeResume();
                    mSurface.handleResume();
                }
                nativeResume();
                mSurface.handleResume();
                mCurrentNativeState = mNextNativeState;
            }
        }
    }
    /* The native thread has finished */
    public static void handleNativeExit() {
        SDLActivity.mSDLThread = null;
        if (mSingleton != null) {
            mSingleton.finish();
        }
    }
    // Messages from the SDLMain thread
    static final int COMMAND_CHANGE_TITLE = 1;
    static final int COMMAND_CHANGE_WINDOW_STYLE = 2;
    static final int COMMAND_TEXTEDIT_HIDE = 3;
    static final int COMMAND_CHANGE_SURFACEVIEW_FORMAT = 4;
    static final int COMMAND_SET_KEEP_SCREEN_ON = 5;
    protected static final int COMMAND_USER = 0x8000;
@@ -584,7 +610,7 @@
                                        View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN |
                                        View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION |
                                        View.SYSTEM_UI_FLAG_LAYOUT_STABLE | View.INVISIBLE;
                            window.getDecorView().setSystemUiVisibility(flags);
                            window.getDecorView().setSystemUiVisibility(flags);
                            window.addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
                            window.clearFlags(WindowManager.LayoutParams.FLAG_FORCE_NOT_FULLSCREEN);
                            SDLActivity.mFullscreenModeActive = true;
@@ -609,8 +635,10 @@
                    InputMethodManager imm = (InputMethodManager) context.getSystemService(Context.INPUT_METHOD_SERVICE);
                    imm.hideSoftInputFromWindow(mTextEdit.getWindowToken(), 0);
                    mScreenKeyboardShown = false;
                    mSurface.requestFocus();
                }
                break;
            case COMMAND_SET_KEEP_SCREEN_ON:
@@ -625,6 +653,32 @@
                        }
                    }
                }
                break;
            }
            case COMMAND_CHANGE_SURFACEVIEW_FORMAT:
            {
                int format = (Integer) msg.obj;
                int pf;
                if (SDLActivity.mSurface == null) {
                    return;
                }
                SurfaceHolder holder = SDLActivity.mSurface.getHolder();
                if (holder == null) {
                    return;
                }
                if (format == 1) {
                    pf = PixelFormat.RGBA_8888;
                } else if (format == 2) {
                    pf = PixelFormat.RGBX_8888;
                } else {
                    pf = PixelFormat.RGB_565;
                }
                holder.setFormat(pf);
                break;
            }
            default:
@@ -650,14 +704,14 @@
            // or 500ms have passed.
            boolean bShouldWait = false;
            if (data instanceof Integer) {
                // Let's figure out if we're already laid out fullscreen or not.
                Display display = ((WindowManager)getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
                android.util.DisplayMetrics realMetrics = new android.util.DisplayMetrics();
                display.getRealMetrics( realMetrics );
                boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
                boolean bFullscreenLayout = ((realMetrics.widthPixels == mSurface.getWidth()) &&
                                             (realMetrics.heightPixels == mSurface.getHeight()));
                if (((Integer)data).intValue() == 1) {
@@ -676,13 +730,13 @@
                }
            }
            if (bShouldWait) {
            if (bShouldWait && (SDLActivity.getContext() != null)) {
                // We'll wait for the surfaceChanged() method, which will notify us
                // when called.  That way, we know our current size is really the
                // size we need, instead of grabbing a size that's still got
                // the navigation and/or status bars before they're hidden.
                //
                // We'll wait for up to half a second, because some devices
                // We'll wait for up to half a second, because some devices
                // take a surprisingly long time for the surface resize, but
                // then we'll just give up and return.
                //
@@ -704,13 +758,17 @@
    public static native int nativeSetupJNI();
    public static native int nativeRunMain(String library, String function, Object arguments);
    public static native void nativeLowMemory();
    public static native void nativeSendQuit();
    public static native void nativeQuit();
    public static native void nativePause();
    public static native void nativeResume();
    public static native void nativeFocusChanged(boolean hasFocus);
    public static native void onNativeDropFile(String filename);
    public static native void onNativeResize(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, int format, float rate);
    public static native void nativeSetScreenResolution(int surfaceWidth, int surfaceHeight, int deviceWidth, int deviceHeight, int format, float rate);
    public static native void onNativeResize();
    public static native void onNativeKeyDown(int keycode);
    public static native void onNativeKeyUp(int keycode);
    public static native boolean onNativeSoftReturnKey();
    public static native void onNativeKeyboardFocusLost();
    public static native void onNativeMouse(int button, int action, float x, float y, boolean relative);
    public static native void onNativeTouch(int touchDevId, int pointerFingerId,
@@ -718,11 +776,14 @@
                                            float y, float p);
    public static native void onNativeAccel(float x, float y, float z);
    public static native void onNativeClipboardChanged();
    public static native void onNativeSurfaceCreated();
    public static native void onNativeSurfaceChanged();
    public static native void onNativeSurfaceDestroyed();
    public static native String nativeGetHint(String name);
    public static native void nativeSetenv(String name, String value);
    public static native void onNativeOrientationChanged(int orientation);
    public static native void nativeAddTouch(int touchId, String name);
    public static native void nativePermissionResult(int requestCode, boolean result);
    /**
     * This method is called by SDL using JNI.
@@ -743,7 +804,7 @@
    /**
     * This method is called by SDL using JNI.
     * This is a static method for JNI convenience, it calls a non-static method
     * so that is can be overridden
     * so that is can be overridden
     */
    public static void setOrientation(int w, int h, boolean resizable, String hint)
    {
@@ -751,51 +812,113 @@
            mSingleton.setOrientationBis(w, h, resizable, hint);
        }
    }
    /**
     * This can be overridden
     */
    public void setOrientationBis(int w, int h, boolean resizable, String hint)
    public void setOrientationBis(int w, int h, boolean resizable, String hint)
    {
        int orientation = -1;
        int orientation_landscape = -1;
        int orientation_portrait = -1;
        /* If set, hint "explicitly controls which UI orientations are allowed". */
        if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
            orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
            orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
        } else if (hint.contains("LandscapeRight")) {
            orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
            orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
        } else if (hint.contains("LandscapeLeft")) {
            orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
        } else if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
            orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
        } else if (hint.contains("Portrait")) {
            orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
        } else if (hint.contains("PortraitUpsideDown")) {
            orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
            orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
        }
        /* no valid hint */
        if (orientation == -1) {
        if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
            orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
        } else if (hint.contains("Portrait")) {
            orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
        } else if (hint.contains("PortraitUpsideDown")) {
            orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
        }
        boolean is_landscape_allowed = (orientation_landscape == -1 ? false : true);
        boolean is_portrait_allowed = (orientation_portrait == -1 ? false : true);
        int req = -1; /* Requested orientation */
        /* No valid hint, nothing is explicitly allowed */
        if (!is_portrait_allowed && !is_landscape_allowed) {
            if (resizable) {
                /* no fixed orientation */
                /* All orientations are allowed */
                req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
            } else {
                if (w > h) {
                    orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
                /* Fixed window and nothing specified. Get orientation from w/h of created window */
                req = (w > h ? ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE : ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT);
            }
        } else {
            /* At least one orientation is allowed */
            if (resizable) {
                if (is_portrait_allowed && is_landscape_allowed) {
                    /* hint allows both landscape and portrait, promote to full sensor */
                    req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
                } else {
                    orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
                    /* Use the only one allowed "orientation" */
                    req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
                }
            } else {
                /* Fixed window and both orientations are allowed. Choose one. */
                if (is_portrait_allowed && is_landscape_allowed) {
                    req = (w > h ? orientation_landscape : orientation_portrait);
                } else {
                    /* Use the only one allowed "orientation" */
                    req = (is_landscape_allowed ? orientation_landscape : orientation_portrait);
                }
            }
        }
        Log.v("SDL", "setOrientation() orientation=" + orientation + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
        if (orientation != -1) {
            mSingleton.setRequestedOrientation(orientation);
        }
        Log.v("SDL", "setOrientation() requestedOrientation=" + req + " width=" + w +" height="+ h +" resizable=" + resizable + " hint=" + hint);
        mSingleton.setRequestedOrientation(req);
    }
    /**
     * This method is called by SDL using JNI.
     */
    public static boolean isScreenKeyboardShown()
    public static void minimizeWindow() {
        if (mSingleton == null) {
            return;
        }
        Intent startMain = new Intent(Intent.ACTION_MAIN);
        startMain.addCategory(Intent.CATEGORY_HOME);
        startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        mSingleton.startActivity(startMain);
    }
    /**
     * This method is called by SDL using JNI.
     */
    public static boolean shouldMinimizeOnFocusLoss() {
/*
        if (Build.VERSION.SDK_INT >= 24) {
            if (mSingleton == null) {
                return true;
            }
            if (mSingleton.isInMultiWindowMode()) {
                return false;
            }
            if (mSingleton.isInPictureInPictureMode()) {
                return false;
            }
        }
        return true;
*/
        return false;
    }
    /**
     * This method is called by SDL using JNI.
     */
    public static boolean isScreenKeyboardShown()
    {
        if (mTextEdit == null) {
            return false;
@@ -820,7 +943,7 @@
            return false;
        }
        // DeX mode in Samsung Experience 9.0 and earlier doesn't support relative mice properly under
        // DeX mode in Samsung Experience 9.0 and earlier doesn't support relative mice properly under
        // Android 7 APIs, and simply returns no data under Android 8 APIs.
        //
        // This is fixed in Samsung Experience 9.5, which corresponds to Android 8.1.0, and
@@ -877,6 +1000,9 @@
        if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
            return true;
        }
        if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
            return true;
        }
        return false;
    }
@@ -886,6 +1012,9 @@
    public static boolean isTablet() {
        DisplayMetrics metrics = new DisplayMetrics();
        Activity activity = (Activity)getContext();
        if (activity == null) {
            return false;
        }
        activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
        double dWidthInches = metrics.widthPixels / (double)metrics.xdpi;
@@ -901,8 +1030,11 @@
     * This method is called by SDL using JNI.
     */
    public static boolean isChromebook() {
        if (getContext() == null) {
            return false;
        }
        return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
    }
    }
    /**
     * This method is called by SDL using JNI.
@@ -948,7 +1080,7 @@
                }
            }
            /* environment variables set! */
            return true;
            return true;
        } catch (Exception e) {
           Log.v("SDL", "exception " + e.toString());
        }
@@ -956,7 +1088,7 @@
    }
    // This method is called by SDLControllerManager's API 26 Generic Motion Handler.
    public static View getContentView()
    public static View getContentView()
    {
        return mSingleton.mLayout;
    }
@@ -976,6 +1108,14 @@
            this.y = y;
            this.w = w;
            this.h = h;
            /* Minimum size of 1 pixel, so it takes focus. */
            if (this.w <= 0) {
                this.w = 1;
            }
            if (this.h + HEIGHT_PADDING <= 0) {
                this.h = 1 - HEIGHT_PADDING;
            }
        }
        @Override
@@ -1011,12 +1151,10 @@
    }
    public static boolean isTextInputEvent(KeyEvent event) {
        // Key pressed with Ctrl should be sent as SDL_KEYDOWN/SDL_KEYUP and not SDL_TEXTINPUT
        if (Build.VERSION.SDK_INT >= 11) {
            if (event.isCtrlPressed()) {
                return false;
            }
        if (event.isCtrlPressed()) {
            return false;
        }
        return event.isPrintingKey() || event.getKeyCode() == KeyEvent.KEYCODE_SPACE;
@@ -1032,23 +1170,28 @@
        return SDLActivity.mSurface.getNativeSurface();
    }
    /**
     * This method is called by SDL using JNI.
     */
    public static void setSurfaceViewFormat(int format) {
        mSingleton.sendCommand(COMMAND_CHANGE_SURFACEVIEW_FORMAT, format);
        return;
    }
    // Input
    /**
     * This method is called by SDL using JNI.
     * @return an array which may be empty but is never null.
     */
    public static int[] inputGetInputDeviceIds(int sources) {
    public static void initTouch() {
        int[] ids = InputDevice.getDeviceIds();
        int[] filtered = new int[ids.length];
        int used = 0;
        for (int i = 0; i < ids.length; ++i) {
            InputDevice device = InputDevice.getDevice(ids[i]);
            if ((device != null) && ((device.getSources() & sources) != 0)) {
                filtered[used++] = device.getId();
            if (device != null && (device.getSources() & InputDevice.SOURCE_TOUCHSCREEN) != 0) {
                nativeAddTouch(device.getId(), device.getName());
            }
        }
        return Arrays.copyOf(filtered, used);
    }
    // APK expansion files support
@@ -1341,7 +1484,7 @@
    };
    public void onSystemUiVisibilityChange(int visibility) {
        if (SDLActivity.mFullscreenModeActive && (visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0) {
        if (SDLActivity.mFullscreenModeActive && ((visibility & View.SYSTEM_UI_FLAG_FULLSCREEN) == 0 || (visibility & View.SYSTEM_UI_FLAG_HIDE_NAVIGATION) == 0)) {
            Handler handler = getWindow().getDecorView().getHandler();
            if (handler != null) {
@@ -1350,7 +1493,7 @@
            }
        }
    }
    }
    /**
     * This method is called by SDL using JNI.
@@ -1379,13 +1522,14 @@
    public static int createCustomCursor(int[] colors, int width, int height, int hotSpotX, int hotSpotY) {
        Bitmap bitmap = Bitmap.createBitmap(colors, width, height, Bitmap.Config.ARGB_8888);
        ++mLastCursorID;
        // This requires API 24, so use reflection to implement this
        try {
            Class PointerIconClass = Class.forName("android.view.PointerIcon");
            Class[] arg_types = new Class[] { Bitmap.class, float.class, float.class };
            Method create = PointerIconClass.getMethod("create", arg_types);
            mCursors.put(mLastCursorID, create.invoke(null, bitmap, hotSpotX, hotSpotY));
        } catch (Exception e) {
        if (Build.VERSION.SDK_INT >= 24) {
            try {
                mCursors.put(mLastCursorID, PointerIcon.create(bitmap, hotSpotX, hotSpotY));
            } catch (Exception e) {
                return 0;
            }
        } else {
            return 0;
        }
        return mLastCursorID;
@@ -1395,12 +1539,14 @@
     * This method is called by SDL using JNI.
     */
    public static boolean setCustomCursor(int cursorID) {
        // This requires API 24, so use reflection to implement this
        try {
            Class PointerIconClass = Class.forName("android.view.PointerIcon");
            Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass);
            setPointerIcon.invoke(mSurface, mCursors.get(cursorID));
        } catch (Exception e) {
        if (Build.VERSION.SDK_INT >= 24) {
            try {
                mSurface.setPointerIcon(mCursors.get(cursorID));
            } catch (Exception e) {
                return false;
            }
        } else {
            return false;
        }
        return true;
@@ -1449,17 +1595,40 @@
            cursor_type = 1002; //PointerIcon.TYPE_HAND;
            break;
        }
        // This requires API 24, so use reflection to implement this
        try {
            Class PointerIconClass = Class.forName("android.view.PointerIcon");
            Class[] arg_types = new Class[] { Context.class, int.class };
            Method getSystemIcon = PointerIconClass.getMethod("getSystemIcon", arg_types);
            Method setPointerIcon = SDLSurface.class.getMethod("setPointerIcon", PointerIconClass);
            setPointerIcon.invoke(mSurface, getSystemIcon.invoke(null, SDL.getContext(), cursor_type));
        } catch (Exception e) {
            return false;
        if (Build.VERSION.SDK_INT >= 24) {
            try {
                mSurface.setPointerIcon(PointerIcon.getSystemIcon(SDL.getContext(), cursor_type));
            } catch (Exception e) {
                return false;
            }
        }
        return true;
    }
    /**
     * This method is called by SDL using JNI.
     */
    public static void requestPermission(String permission, int requestCode) {
        if (Build.VERSION.SDK_INT < 23) {
            nativePermissionResult(requestCode, true);
            return;
        }
        Activity activity = (Activity)getContext();
        if (activity.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
            activity.requestPermissions(new String[]{permission}, requestCode);
        } else {
            nativePermissionResult(requestCode, true);
        }
    }
    @Override
    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
        if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
            nativePermissionResult(requestCode, true);
        } else {
            nativePermissionResult(requestCode, false);
        }
    }
}
@@ -1474,14 +1643,24 @@
        String function = SDLActivity.mSingleton.getMainFunction();
        String[] arguments = SDLActivity.mSingleton.getArguments();
        try {
            android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_DISPLAY);
        } catch (Exception e) {
            Log.v("SDL", "modify thread properties failed " + e.toString());
        }
        Log.v("SDL", "Running main function " + function + " from library " + library);
        SDLActivity.nativeRunMain(library, function, arguments);
        Log.v("SDL", "Finished main function");
        // Native thread has finished, let's finish the Activity
        if (!SDLActivity.mExitCalledFromJava) {
            SDLActivity.handleNativeExit();
        if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) {
            // Activity is already being destroyed
        } else {
            // Let's finish the Activity
            SDLActivity.mSDLThread = null;
            SDLActivity.mSingleton.finish();
        }
    }
}
@@ -1497,11 +1676,14 @@
    View.OnKeyListener, View.OnTouchListener, SensorEventListener  {
    // Sensors
    protected static SensorManager mSensorManager;
    protected static Display mDisplay;
    protected SensorManager mSensorManager;
    protected Display mDisplay;
    // Keep track of the surface size to normalize touch events
    protected static float mWidth, mHeight;
    protected float mWidth, mHeight;
    // Is SurfaceView ready for rendering
    public boolean mIsSurfaceReady;
    // Startup
    public SDLSurface(Context context) {
@@ -1517,13 +1699,13 @@
        mDisplay = ((WindowManager)context.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
        mSensorManager = (SensorManager)context.getSystemService(Context.SENSOR_SERVICE);
        if (Build.VERSION.SDK_INT >= 12) {
            setOnGenericMotionListener(SDLActivity.getMotionListener());
        }
        setOnGenericMotionListener(SDLActivity.getMotionListener());
        // Some arbitrary defaults to avoid a potential division by zero
        mWidth = 1.0f;
        mHeight = 1.0f;
        mIsSurfaceReady = false;
    }
    public void handlePause() {
@@ -1547,7 +1729,7 @@
    @Override
    public void surfaceCreated(SurfaceHolder holder) {
        Log.v("SDL", "surfaceCreated()");
        holder.setType(SurfaceHolder.SURFACE_TYPE_GPU);
        SDLActivity.onNativeSurfaceCreated();
    }
    // Called when we lose the surface
@@ -1559,7 +1741,7 @@
        SDLActivity.mNextNativeState = SDLActivity.NativeState.PAUSED;
        SDLActivity.handleNativeState();
        SDLActivity.mIsSurfaceReady = false;
        mIsSurfaceReady = false;
        SDLActivity.onNativeSurfaceDestroyed();
    }
@@ -1575,23 +1757,6 @@
        int sdlFormat = 0x15151002; // SDL_PIXELFORMAT_RGB565 by default
        switch (format) {
        case PixelFormat.A_8:
            Log.v("SDL", "pixel format A_8");
            break;
        case PixelFormat.LA_88:
            Log.v("SDL", "pixel format LA_88");
            break;
        case PixelFormat.L_8:
            Log.v("SDL", "pixel format L_8");
            break;
        case PixelFormat.RGBA_4444:
            Log.v("SDL", "pixel format RGBA_4444");
            sdlFormat = 0x15421002; // SDL_PIXELFORMAT_RGBA4444
            break;
        case PixelFormat.RGBA_5551:
            Log.v("SDL", "pixel format RGBA_5551");
            sdlFormat = 0x15441002; // SDL_PIXELFORMAT_RGBA5551
            break;
        case PixelFormat.RGBA_8888:
            Log.v("SDL", "pixel format RGBA_8888");
            sdlFormat = 0x16462004; // SDL_PIXELFORMAT_RGBA8888
@@ -1599,10 +1764,6 @@
        case PixelFormat.RGBX_8888:
            Log.v("SDL", "pixel format RGBX_8888");
            sdlFormat = 0x16261804; // SDL_PIXELFORMAT_RGBX8888
            break;
        case PixelFormat.RGB_332:
            Log.v("SDL", "pixel format RGB_332");
            sdlFormat = 0x14110801; // SDL_PIXELFORMAT_RGB332
            break;
        case PixelFormat.RGB_565:
            Log.v("SDL", "pixel format RGB_565");
@@ -1640,8 +1801,11 @@
        Log.v("SDL", "Window size: " + width + "x" + height);
        Log.v("SDL", "Device size: " + nDeviceWidth + "x" + nDeviceHeight);
        SDLActivity.onNativeResize(width, height, nDeviceWidth, nDeviceHeight, sdlFormat, mDisplay.getRefreshRate());
        SDLActivity.nativeSetScreenResolution(width, height, nDeviceWidth, nDeviceHeight, sdlFormat, 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();
@@ -1671,24 +1835,39 @@
           }
        }
        // Don't skip in MultiWindow.
        if (skip) {
           Log.v("SDL", "Skip .. Surface is not ready.");
           SDLActivity.mIsSurfaceReady = false;
           return;
            if (Build.VERSION.SDK_INT >= 24) {
                if (SDLActivity.mSingleton.isInMultiWindowMode()) {
                    Log.v("SDL", "Don't skip in Multi-Window");
                    skip = false;
                }
            }
        }
        /* Surface is ready */
        SDLActivity.mIsSurfaceReady = true;
        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();
        // 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
@@ -1696,20 +1875,27 @@
        // 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(event.getDeviceId())) {
        if (SDLControllerManager.isDeviceSDLJoystick(deviceId)) {
            // Note that we process events with specific key codes here
            if (event.getAction() == KeyEvent.ACTION_DOWN) {
                if (SDLControllerManager.onNativePadDown(event.getDeviceId(), keyCode) == 0) {
                if (SDLControllerManager.onNativePadDown(deviceId, keyCode) == 0) {
                    return true;
                }
            } else if (event.getAction() == KeyEvent.ACTION_UP) {
                if (SDLControllerManager.onNativePadUp(event.getDeviceId(), keyCode) == 0) {
                if (SDLControllerManager.onNativePadUp(deviceId, keyCode) == 0) {
                    return true;
                }
            }
        }
        if ((event.getSource() & InputDevice.SOURCE_KEYBOARD) != 0) {
        if (source == InputDevice.SOURCE_UNKNOWN) {
            InputDevice device = InputDevice.getDevice(deviceId);
            if (device != null) {
                source = device.getSources();
            }
        }
        if ((source & InputDevice.SOURCE_KEYBOARD) != 0) {
            if (event.getAction() == KeyEvent.ACTION_DOWN) {
                //Log.v("SDL", "key down: " + keyCode);
                if (SDLActivity.isTextInputEvent(event)) {
@@ -1725,7 +1911,7 @@
            }
        }
        if ((event.getSource() & InputDevice.SOURCE_MOUSE) != 0) {
        if ((source & InputDevice.SOURCE_MOUSE) != 0) {
            // 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)) {
@@ -1754,17 +1940,14 @@
        int i = -1;
        float x,y,p;
        // !!! FIXME: dump this SDK check after 2.0.4 ships and require API14.
        // 12290 = Samsung DeX mode desktop mouse
        if ((event.getSource() == InputDevice.SOURCE_MOUSE || event.getSource() == 12290) && SDLActivity.mSeparateMouseAndTouch) {
            if (Build.VERSION.SDK_INT < 14) {
                mouseButton = 1; // all mouse buttons are the left button
            } else {
                try {
                    mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
                } catch(Exception e) {
                    mouseButton = 1;    // oh well.
                }
        // 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)) {
            try {
                mouseButton = (Integer) event.getClass().getMethod("getButtonState").invoke(event);
            } catch(Exception e) {
                mouseButton = 1;    // oh well.
            }
            // We need to check if we're in relative mouse mode and get the axis offset rather than the x/y values
@@ -1862,7 +2045,7 @@
            // Since we may have an orientation set, we won't receive onConfigurationChanged events.
            // We thus should check here.
            int newOrientation = SDLActivity.SDL_ORIENTATION_UNKNOWN;
            float x, y;
            switch (mDisplay.getRotation()) {
                case Surface.ROTATION_90:
@@ -1876,8 +2059,8 @@
                    newOrientation = SDLActivity.SDL_ORIENTATION_LANDSCAPE_FLIPPED;
                    break;
                case Surface.ROTATION_180:
                    x = -event.values[1];
                    y = -event.values[0];
                    x = -event.values[0];
                    y = -event.values[1];
                    newOrientation = SDLActivity.SDL_ORIENTATION_PORTRAIT_FLIPPED;
                    break;
                default:
@@ -1896,7 +2079,7 @@
                                      y / SensorManager.GRAVITY_EARTH,
                                      event.values[2] / SensorManager.GRAVITY_EARTH);
        }
    }
@@ -1964,7 +2147,7 @@
    @Override
    public boolean onKey(View v, int keyCode, KeyEvent event) {
        /*
        /*
         * This handles the hardware keyboard input
         */
        if (event.getAction() == KeyEvent.ACTION_DOWN) {
@@ -2032,14 +2215,8 @@
         */
        if (event.getKeyCode() == KeyEvent.KEYCODE_ENTER) {
            String imeHide = SDLActivity.nativeGetHint("SDL_RETURN_KEY_HIDES_IME");
            if ((imeHide != null) && imeHide.equals("1")) {
                Context c = SDL.getContext();
                if (c instanceof SDLActivity) {
                    SDLActivity activity = (SDLActivity)c;
                    activity.sendCommand(SDLActivity.COMMAND_TEXTEDIT_HIDE, null);
                    return true;
                }
            if (SDLActivity.onNativeSoftReturnKey()) {
                return true;
            }
        }
@@ -2052,6 +2229,11 @@
        for (int i = 0; i < text.length(); i++) {
            char c = text.charAt(i);
            if (c == '\n') {
                if (SDLActivity.onNativeSoftReturnKey()) {
                    return true;
                }
            }
            nativeGenerateScancodeForUnichar(c);
        }
@@ -2084,7 +2266,7 @@
            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;
               ret = ret && ret_key;
            }
            return ret;
        }
@@ -2103,7 +2285,7 @@
class SDLClipboardHandler_API11 implements
    SDLClipboardHandler,
    SDLClipboardHandler,
    android.content.ClipboardManager.OnPrimaryClipChangedListener {
    protected android.content.ClipboardManager mClipMgr;
@@ -2134,41 +2316,11 @@
       mClipMgr.setText(string);
       mClipMgr.addPrimaryClipChangedListener(this);
    }
    @Override
    public void onPrimaryClipChanged() {
        SDLActivity.onNativeClipboardChanged();
    }
}
class SDLClipboardHandler_Old implements
    SDLClipboardHandler {
    protected android.text.ClipboardManager mClipMgrOld;
    SDLClipboardHandler_Old() {
       mClipMgrOld = (android.text.ClipboardManager) SDL.getContext().getSystemService(Context.CLIPBOARD_SERVICE);
    }
    @Override
    public boolean clipboardHasText() {
       return mClipMgrOld.hasText();
    }
    @Override
    public String clipboardGetText() {
       CharSequence text;
       text = mClipMgrOld.getText();
       if (text != null) {
          return text.toString();
       }
       return null;
    }
    @Override
    public void clipboardSetText(String string) {
       mClipMgrOld.setText(string);
    }
}
source/android-project/app/src/main/java/org/libsdl/app/SDLAudioManager.java
@@ -73,7 +73,7 @@
            sampleSize = 2;
            break;
        }
        if (isCapture) {
            switch (desiredChannels) {
            case 1:
@@ -298,7 +298,7 @@
            Log.e(TAG, "Attempted to make audio call with uninitialized audio!");
            return;
        }
        for (int i = 0; i < buffer.length; ) {
            int result = mAudioTrack.write(buffer, i, buffer.length - i);
            if (result > 0) {
@@ -364,5 +364,24 @@
        }
    }
    /** This method is called by SDL using JNI. */
    public static void audioSetThreadPriority(boolean iscapture, int device_id) {
        try {
            /* Set thread name */
            if (iscapture) {
                Thread.currentThread().setName("SDLAudioC" + device_id);
            } else {
                Thread.currentThread().setName("SDLAudioP" + device_id);
            }
            /* Set thread priority */
            android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_AUDIO);
        } catch (Exception e) {
            Log.v(TAG, "modify thread properties failed " + e.toString());
        }
    }
    public static native int nativeSetupJNI();
}
source/android-project/app/src/main/java/org/libsdl/app/SDLControllerManager.java
@@ -39,12 +39,8 @@
        if (mJoystickHandler == null) {
            if (Build.VERSION.SDK_INT >= 19) {
                mJoystickHandler = new SDLJoystickHandler_API19();
            } else if (Build.VERSION.SDK_INT >= 16) {
                mJoystickHandler = new SDLJoystickHandler_API16();
            } else if (Build.VERSION.SDK_INT >= 12) {
                mJoystickHandler = new SDLJoystickHandler_API12();
            } else {
                mJoystickHandler = new SDLJoystickHandler();
                mJoystickHandler = new SDLJoystickHandler_API16();
            }
        }
@@ -103,8 +99,8 @@
        /* This is called for every button press, so let's not spam the logs */
        /**
        if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) {
            Log.v(TAG, "Input device " + device.getName() + " is a joystick.");
        if ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0) {
            Log.v(TAG, "Input device " + device.getName() + " has class joystick.");
        }
        if ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) {
            Log.v(TAG, "Input device " + device.getName() + " is a dpad.");
@@ -114,7 +110,7 @@
        }
        **/
        return (((sources & InputDevice.SOURCE_CLASS_JOYSTICK) == InputDevice.SOURCE_CLASS_JOYSTICK) ||
        return ((sources & InputDevice.SOURCE_CLASS_JOYSTICK) != 0 ||
                ((sources & InputDevice.SOURCE_DPAD) == InputDevice.SOURCE_DPAD) ||
                ((sources & InputDevice.SOURCE_GAMEPAD) == InputDevice.SOURCE_GAMEPAD)
        );
@@ -122,7 +118,6 @@
}
/* A null joystick handler for API level < 12 devices (the accelerometer is handled separately) */
class SDLJoystickHandler {
    /**
@@ -142,7 +137,7 @@
}
/* Actual joystick functionality available for API >= 12 devices */
class SDLJoystickHandler_API12 extends SDLJoystickHandler {
class SDLJoystickHandler_API16 extends SDLJoystickHandler {
    static class SDLJoystick {
        public int device_id;
@@ -174,7 +169,7 @@
    private ArrayList<SDLJoystick> mJoysticks;
    public SDLJoystickHandler_API12() {
    public SDLJoystickHandler_API16() {
        mJoysticks = new ArrayList<SDLJoystick>();
    }
@@ -278,6 +273,12 @@
    }
    public String getJoystickDescriptor(InputDevice joystickDevice) {
        String desc = joystickDevice.getDescriptor();
        if (desc != null && !desc.isEmpty()) {
            return desc;
        }
        return joystickDevice.getName();
    }
    public int getProductId(InputDevice joystickDevice) {
@@ -288,20 +289,6 @@
    }
    public int getButtonMask(InputDevice joystickDevice) {
        return -1;
    }
}
class SDLJoystickHandler_API16 extends SDLJoystickHandler_API12 {
    @Override
    public String getJoystickDescriptor(InputDevice joystickDevice) {
        String desc = joystickDevice.getDescriptor();
        if (desc != null && !desc.isEmpty()) {
            return desc;
        }
        return super.getJoystickDescriptor(joystickDevice);
    }
}
@@ -482,21 +469,18 @@
        // so the first controller seen by SDL matches what the receiver
        // considers to be the first controller
        if (Build.VERSION.SDK_INT >= 16)
        {
            for (int i = deviceIds.length - 1; i > -1; i--) {
                SDLHaptic haptic = getHaptic(deviceIds[i]);
                if (haptic == null) {
                    InputDevice device = InputDevice.getDevice(deviceIds[i]);
                    Vibrator vib = device.getVibrator();
                    if (vib.hasVibrator()) {
                        haptic = new SDLHaptic();
                        haptic.device_id = deviceIds[i];
                        haptic.name = device.getName();
                        haptic.vib = vib;
                        mHaptics.add(haptic);
                        SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
                    }
        for (int i = deviceIds.length - 1; i > -1; i--) {
            SDLHaptic haptic = getHaptic(deviceIds[i]);
            if (haptic == null) {
                InputDevice device = InputDevice.getDevice(deviceIds[i]);
                Vibrator vib = device.getVibrator();
                if (vib.hasVibrator()) {
                    haptic = new SDLHaptic();
                    haptic.device_id = deviceIds[i];
                    haptic.name = device.getName();
                    haptic.vib = vib;
                    mHaptics.add(haptic);
                    SDLControllerManager.nativeAddHaptic(haptic.device_id, haptic.name);
                }
            }
        }
@@ -504,11 +488,7 @@
        /* Check VIBRATOR_SERVICE */
        Vibrator vib = (Vibrator) SDL.getContext().getSystemService(Context.VIBRATOR_SERVICE);
        if (vib != null) {
            if (Build.VERSION.SDK_INT >= 11) {
                hasVibratorService = vib.hasVibrator();
            } else {
                hasVibratorService = true;
            }
            hasVibratorService = vib.hasVibrator();
            if (hasVibratorService) {
                SDLHaptic haptic = getHaptic(deviceId_VIBRATOR_SERVICE);
@@ -575,9 +555,6 @@
                return SDLControllerManager.handleJoystickMotionEvent(event);
            case InputDevice.SOURCE_MOUSE:
                if (!SDLActivity.mSeparateMouseAndTouch) {
                    break;
                }
                action = event.getActionMasked();
                switch (action) {
                    case MotionEvent.ACTION_SCROLL:
@@ -640,51 +617,22 @@
    @Override
    public boolean onGenericMotion(View v, MotionEvent event) {
        float x, y;
        int action;
        switch ( event.getSource() ) {
            case InputDevice.SOURCE_JOYSTICK:
            case InputDevice.SOURCE_GAMEPAD:
            case InputDevice.SOURCE_DPAD:
                return SDLControllerManager.handleJoystickMotionEvent(event);
            case InputDevice.SOURCE_MOUSE:
                if (!SDLActivity.mSeparateMouseAndTouch) {
                    break;
        // Handle relative mouse mode
        if (mRelativeModeEnabled) {
            if (event.getSource() == InputDevice.SOURCE_MOUSE) {
                int action = event.getActionMasked();
                if (action == MotionEvent.ACTION_HOVER_MOVE) {
                    float x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
                    float y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
                    SDLActivity.onNativeMouse(0, action, x, y, true);
                    return true;
                }
                action = event.getActionMasked();
                switch (action) {
                    case MotionEvent.ACTION_SCROLL:
                        x = event.getAxisValue(MotionEvent.AXIS_HSCROLL, 0);
                        y = event.getAxisValue(MotionEvent.AXIS_VSCROLL, 0);
                        SDLActivity.onNativeMouse(0, action, x, y, false);
                        return true;
                    case MotionEvent.ACTION_HOVER_MOVE:
                        if (mRelativeModeEnabled) {
                            x = event.getAxisValue(MotionEvent.AXIS_RELATIVE_X);
                            y = event.getAxisValue(MotionEvent.AXIS_RELATIVE_Y);
                        }
                        else {
                            x = event.getX(0);
                            y = event.getY(0);
                        }
                        SDLActivity.onNativeMouse(0, action, x, y, mRelativeModeEnabled);
                        return true;
                    default:
                        break;
                }
                break;
            default:
                break;
            }
        }
        // Event was not managed
        return false;
        // Event was not managed, call SDLGenericMotionListener_API12 method
        return super.onGenericMotion(v, event);
    }
    @Override
@@ -741,11 +689,8 @@
                return SDLControllerManager.handleJoystickMotionEvent(event);
            case InputDevice.SOURCE_MOUSE:
            case 12290: // DeX desktop mouse cursor is a separate non-standard input type.
                if (!SDLActivity.mSeparateMouseAndTouch) {
                    break;
                }
            // DeX desktop mouse cursor is a separate non-standard input type.
            case InputDevice.SOURCE_MOUSE | InputDevice.SOURCE_TOUCHSCREEN:
                action = event.getActionMasked();
                switch (action) {
                    case MotionEvent.ACTION_SCROLL:
@@ -766,9 +711,6 @@
                break;
            case InputDevice.SOURCE_MOUSE_RELATIVE:
                if (!SDLActivity.mSeparateMouseAndTouch) {
                    break;
                }
                action = event.getActionMasked();
                switch (action) {
                    case MotionEvent.ACTION_SCROLL:
@@ -843,4 +785,4 @@
        // Relative mouse in capture mode will only have relative for X/Y
        return event.getY(0);
    }
}
}
source/build-scripts/androidbuildlibs.sh
@@ -69,6 +69,6 @@
  NDK_LIBS_OUT=$lib \
  APP_BUILD_SCRIPT=Android.mk \
  APP_ABI="armeabi-v7a arm64-v8a x86 x86_64" \
  APP_PLATFORM=android-14 \
  APP_PLATFORM=android-16 \
  APP_MODULES="SDL2 SDL2_main" \
  $ndk_args
source/build-scripts/ltmain.sh
@@ -7404,11 +7404,8 @@
      # Darwin ld doesn't like 0 for these options...
      func_arith $current + 1
      minor_current=$func_arith_result
      #xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
      #verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
      # make the compatibility version match the Xcode project files, i.e. 1.0
      xlcverstring="${wl}-compatibility_version 1.0 ${wl}-current_version ${wl}$minor_current.$revision"
      verstring="-compatibility_version 1.0 -current_version $minor_current.$revision"
      xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
      verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
      ;;
    freebsd-aout)
source/build-scripts/os2-buildbot.sh
New file
@@ -0,0 +1,42 @@
#!/bin/bash
# This is the script buildbot.libsdl.org uses to cross-compile SDL2 from
#  x86 Linux to OS/2, using OpenWatcom.
# The final zipfile can be unpacked on any machine that supports OpenWatcom
#  (Windows, Linux, OS/2, etc). Point the compiler at the include directory
#  and link against the SDL2.lib file. Ship the SDL2.dll with your app.
if [ -z "$WATCOM" ]; then
    echo "This script expects \$WATCOM to be set to the OpenWatcom install dir." 1>&2
    echo "This is often something like '/usr/local/share/watcom'" 1>&2
    exit 1
fi
export PATH="$WATCOM/binl:$PATH"
ZIPFILE="$1"
if [ -z $1 ]; then
    ZIPFILE=sdl-os2.zip
fi
ZIPDIR=SDL2-os2
set -e
set -x
cd `dirname "$0"`
cd ..
rm -f $ZIPFILE
wmake -f Makefile.os2
rm -rf $ZIPDIR
mkdir $ZIPDIR
chmod a+r SDL2.lib SDL2.dll
mv SDL2.lib SDL2.dll $ZIPDIR/
cp -R include $ZIPDIR/
zip -9r "$ZIPFILE" $ZIPDIR
wmake -f Makefile.os2 distclean
set +x
echo "All done. Final installable is in $ZIPFILE ...";
source/build-scripts/raspberrypi-buildbot.sh
@@ -42,7 +42,7 @@
export CC="ccache /opt/rpi-tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/arm-linux-gnueabihf-gcc --sysroot=$SYSROOT -I$SYSROOT/opt/vc/include -I$SYSROOT/usr/include -I$SYSROOT/opt/vc/include/interface/vcos/pthreads -I$SYSROOT/opt/vc/include/interface/vmcs_host/linux -L$SYSROOT/opt/vc/lib"
# -L$SYSROOT/usr/lib/arm-linux-gnueabihf"
# !!! FIXME: shouldn't have to --disable-* things here.
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-mir --disable-video-wayland
../configure --with-sysroot=$SYSROOT --host=arm-raspberry-linux-gnueabihf --prefix=$PWD/rpi-sdl2-installed --disable-pulseaudio --disable-esd --disable-video-wayland
$MAKE
$MAKE install
# Fix up a few things to a real install path on a real Raspberry Pi...
source/build-scripts/winrtbuild.ps1
@@ -39,7 +39,7 @@
#
# Base version of SDL, used for packaging purposes
$SDLVersion = "2.0.9"
$SDLVersion = "2.0.12"
# Gets the .bat file that sets up an MSBuild environment, given one of
# Visual Studio's, "PlatformToolset"s.
source/cmake/sdlchecks.cmake
@@ -564,46 +564,6 @@
  endif()
endmacro()
# Requires:
# - EGL
# - PkgCheckModules
# Optional:
# - MIR_SHARED opt
# - HAVE_DLOPEN opt
macro(CheckMir)
    if(VIDEO_MIR)
        find_library(MIR_LIB mirclient mircommon egl)
        pkg_check_modules(MIR_TOOLKIT mirclient>=0.26 mircommon)
        pkg_check_modules(EGL egl)
        pkg_check_modules(XKB xkbcommon)
        if (MIR_LIB AND MIR_TOOLKIT_FOUND AND EGL_FOUND AND XKB_FOUND)
            set(HAVE_VIDEO_MIR TRUE)
            set(HAVE_SDL_VIDEO TRUE)
            file(GLOB MIR_SOURCES ${SDL2_SOURCE_DIR}/src/video/mir/*.c)
            set(SOURCE_FILES ${SOURCE_FILES} ${MIR_SOURCES})
            set(SDL_VIDEO_DRIVER_MIR 1)
            list(APPEND EXTRA_CFLAGS ${MIR_TOOLKIT_CFLAGS} ${EGL_CFLAGS} ${XKB_CFLAGS})
            if(MIR_SHARED)
                if(NOT HAVE_DLOPEN)
                    message_warn("You must have SDL_LoadObject() support for dynamic Mir loading")
                else()
                    FindLibraryAndSONAME(mirclient)
                    FindLibraryAndSONAME(xkbcommon)
                    set(SDL_VIDEO_DRIVER_MIR_DYNAMIC "\"${MIRCLIENT_LIB_SONAME}\"")
                    set(SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON "\"${XKBCOMMON_LIB_SONAME}\"")
                    set(HAVE_MIR_SHARED TRUE)
                endif()
            else()
                set(EXTRA_LIBS ${MIR_TOOLKIT_LIBRARIES} ${EXTRA_LIBS})
            endif()
        endif()
    endif()
endmacro()
macro(WaylandProtocolGen _SCANNER _XML _PROTL)
    set(_WAYLAND_PROT_C_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-protocol.c")
    set(_WAYLAND_PROT_H_CODE "${CMAKE_CURRENT_BINARY_DIR}/wayland-generated-protocols/${_PROTL}-client-protocol.h")
@@ -797,8 +757,10 @@
endmacro()
# Requires:
# - nada
# - PkgCheckModules
macro(CheckOpenGLESX11)
  pkg_check_modules(EGL egl)
  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}")
  if(VIDEO_OPENGLES)
    check_c_source_compiles("
        #define EGL_API_FB
@@ -1105,6 +1067,44 @@
  endif()
endmacro()
# Check for HIDAPI joystick drivers. This is currently a Unix thing, not Windows or macOS!
macro(CheckHIDAPI)
  if(HIDAPI)
    if(HIDAPI_SKIP_LIBUSB)
      set(HAVE_HIDAPI TRUE)
    else()
      set(HAVE_HIDAPI FALSE)
      pkg_check_modules(LIBUSB libusb)
      if (LIBUSB_FOUND)
        check_include_file(libusb.h HAVE_LIBUSB_H ${LIBUSB_CFLAGS})
        if (HAVE_LIBUSB_H)
          set(HAVE_HIDAPI TRUE)
        endif()
      endif()
    endif()
    if(HAVE_HIDAPI)
      set(SDL_JOYSTICK_HIDAPI 1)
      set(HAVE_SDL_JOYSTICK TRUE)
      file(GLOB HIDAPI_SOURCES ${SDL2_SOURCE_DIR}/src/joystick/hidapi/*.c)
      set(SOURCE_FILES ${SOURCE_FILES} ${HIDAPI_SOURCES})
      set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBUSB_CFLAGS} -I${SDL2_SOURCE_DIR}/src/hidapi/hidapi")
      if(NOT HIDAPI_SKIP_LIBUSB)
        if(HIDAPI_ONLY_LIBUSB)
          set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/libusb/hid.c)
          list(APPEND EXTRA_LIBS ${LIBUSB_LIBS})
        else()
          set(SOURCE_FILES ${SOURCE_FILES} ${SDL2_SOURCE_DIR}/src/hidapi/SDL_hidapi.c)
          # libusb is loaded dynamically, so don't add it to EXTRA_LIBS
          FindLibraryAndSONAME("usb-1.0")
          set(SDL_LIBUSB_DYNAMIC "\"${USB_LIB_SONAME}\"")
        endif()
      endif()
    endif()
  endif()
endmacro()
# Requires:
# - n/a
macro(CheckRPI)
source/configure
@@ -651,22 +651,46 @@
SDL_STATIC_LIBS
SDL_LIBS
SDL_CFLAGS
DIRECTFBCONFIG
INSTALL_SDL2_CONFIG
LIBUSB_LIBS
LIBUSB_CFLAGS
FCITX_LIBS
FCITX_CFLAGS
IBUS_LIBS
IBUS_CFLAGS
DBUS_LIBS
DBUS_CFLAGS
LIBGBM_LIBS
LIBGBM_CFLAGS
LIBDRM_LIBS
LIBDRM_CFLAGS
DIRECTFB_LIBS
DIRECTFB_CFLAGS
X_EXTRA_LIBS
X_LIBS
X_PRE_LIBS
X_CFLAGS
XMKMF
RPI_LIBS
RPI_CFLAGS
FUSIONSOUND_LIBS
FUSIONSOUND_CFLAGS
ARTSCONFIG
PULSEAUDIO_LIBS
PULSEAUDIO_CFLAGS
ESD_LIBS
ESD_CFLAGS
ESD_CONFIG
PKG_CONFIG
JACK_LIBS
JACK_CFLAGS
ALSA_LIBS
ALSA_CFLAGS
POW_LIB
LIBOBJS
ALLOCA
PKG_CONFIG_LIBDIR
PKG_CONFIG_PATH
PKG_CONFIG
WINDRES
SET_MAKE
INSTALL_DATA
@@ -828,11 +852,11 @@
enable_dummyaudio
enable_libsamplerate
enable_libsamplerate_shared
enable_arm_simd
enable_arm_neon
enable_video_wayland
enable_video_wayland_qt_touch
enable_wayland_shared
enable_video_mir
enable_mir_shared
enable_video_rpi
enable_video_x11
with_x
@@ -847,6 +871,7 @@
enable_video_x11_vm
enable_video_vivante
enable_video_cocoa
enable_video_metal
enable_render_metal
enable_video_directfb
enable_directfb_shared
@@ -872,7 +897,10 @@
enable_hidapi
enable_clock_gettime
enable_rpath
enable_backgrounding_signal
enable_foregrounding_signal
enable_render_d3d
enable_sdl2_config
'
      ac_precious_vars='build_alias
host_alias
@@ -887,7 +915,32 @@
CXXFLAGS
CCC
CXXCPP
XMKMF'
PKG_CONFIG
PKG_CONFIG_PATH
PKG_CONFIG_LIBDIR
JACK_CFLAGS
JACK_LIBS
PULSEAUDIO_CFLAGS
PULSEAUDIO_LIBS
FUSIONSOUND_CFLAGS
FUSIONSOUND_LIBS
RPI_CFLAGS
RPI_LIBS
XMKMF
DIRECTFB_CFLAGS
DIRECTFB_LIBS
LIBDRM_CFLAGS
LIBDRM_LIBS
LIBGBM_CFLAGS
LIBGBM_LIBS
DBUS_CFLAGS
DBUS_LIBS
IBUS_CFLAGS
IBUS_LIBS
FCITX_CFLAGS
FCITX_LIBS
LIBUSB_CFLAGS
LIBUSB_LIBS'
# Initialize some variables set by options.
@@ -1571,13 +1624,13 @@
                          [[default=yes]]
  --enable-libsamplerate-shared
                          dynamically load libsamplerate [[default=yes]]
  --enable-arm-simd       use SIMD assembly blitters on ARM [[default=yes]]
  --enable-arm-neon       use NEON assembly blitters on ARM [[default=no]]
  --enable-video-wayland  use Wayland video driver [[default=yes]]
  --enable-video-wayland-qt-touch
                          QtWayland server support for Wayland video driver
                          [[default=yes]]
  --enable-wayland-shared dynamically load Wayland support [[default=maybe]]
  --enable-video-mir      use Mir video driver [[default=no]]
  --enable-mir-shared     dynamically load Mir support [[default=maybe]]
  --enable-video-rpi      use Raspberry Pi video driver [[default=yes]]
  --enable-video-x11      use X11 video driver [[default=yes]]
  --enable-x11-shared     dynamically load X11 support [[default=maybe]]
@@ -1599,6 +1652,7 @@
  --enable-video-x11-vm   use X11 VM extension for fullscreen [[default=yes]]
  --enable-video-vivante  use Vivante EGL video driver [[default=yes]]
  --enable-video-cocoa    use Cocoa video driver [[default=yes]]
  --enable-video-metal    include Metal support [[default=yes]]
  --enable-render-metal   enable the Metal render driver [[default=yes]]
  --enable-video-directfb use DirectFB video driver [[default=no]]
  --enable-directfb-shared
@@ -1631,7 +1685,14 @@
  --enable-clock_gettime  use clock_gettime() instead of gettimeofday() on
                          UNIX [[default=yes]]
  --enable-rpath          use an rpath when linking SDL [[default=yes]]
  --enable-backgrounding-signal
                          number to use for magic backgrounding signal or 'no'
                          [[default=no]]
  --enable-foregrounding-signal
                          number to use for magic foregrounding signal or 'no'
                          [[default=no]]
  --enable-render-d3d     enable the Direct3D render driver [[default=yes]]
  --enable-sdl2-config    Install sdl2-config [default=yes]
Optional Packages:
  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
@@ -1659,7 +1720,44 @@
  CXX         C++ compiler command
  CXXFLAGS    C++ compiler flags
  CXXCPP      C++ preprocessor
  PKG_CONFIG  path to pkg-config utility
  PKG_CONFIG_PATH
              directories to add to pkg-config's search path
  PKG_CONFIG_LIBDIR
              path overriding pkg-config's built-in search path
  JACK_CFLAGS C compiler flags for JACK, overriding pkg-config
  JACK_LIBS   linker flags for JACK, overriding pkg-config
  PULSEAUDIO_CFLAGS
              C compiler flags for PULSEAUDIO, overriding pkg-config
  PULSEAUDIO_LIBS
              linker flags for PULSEAUDIO, overriding pkg-config
  FUSIONSOUND_CFLAGS
              C compiler flags for FUSIONSOUND, overriding pkg-config
  FUSIONSOUND_LIBS
              linker flags for FUSIONSOUND, overriding pkg-config
  RPI_CFLAGS  C compiler flags for RPI, overriding pkg-config
  RPI_LIBS    linker flags for RPI, overriding pkg-config
  XMKMF       Path to xmkmf, Makefile generator for X Window System
  DIRECTFB_CFLAGS
              C compiler flags for DIRECTFB, overriding pkg-config
  DIRECTFB_LIBS
              linker flags for DIRECTFB, overriding pkg-config
  LIBDRM_CFLAGS
              C compiler flags for LIBDRM, overriding pkg-config
  LIBDRM_LIBS linker flags for LIBDRM, overriding pkg-config
  LIBGBM_CFLAGS
              C compiler flags for LIBGBM, overriding pkg-config
  LIBGBM_LIBS linker flags for LIBGBM, overriding pkg-config
  DBUS_CFLAGS C compiler flags for DBUS, overriding pkg-config
  DBUS_LIBS   linker flags for DBUS, overriding pkg-config
  IBUS_CFLAGS C compiler flags for IBUS, overriding pkg-config
  IBUS_LIBS   linker flags for IBUS, overriding pkg-config
  FCITX_CFLAGS
              C compiler flags for FCITX, overriding pkg-config
  FCITX_LIBS  linker flags for FCITX, overriding pkg-config
  LIBUSB_CFLAGS
              C compiler flags for LIBUSB, overriding pkg-config
  LIBUSB_LIBS linker flags for LIBUSB, overriding pkg-config
Use these variables to override the choices made by `configure' or to help
it to find libraries and programs with nonstandard names/locations.
@@ -2719,9 +2817,9 @@
#
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=0
SDL_MICRO_VERSION=9
SDL_MICRO_VERSION=12
SDL_INTERFACE_AGE=0
SDL_BINARY_AGE=9
SDL_BINARY_AGE=12
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
@@ -15679,6 +15777,125 @@
fi
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
    if test -n "$ac_tool_prefix"; then
  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
fi
if test -z "$ac_cv_path_PKG_CONFIG"; then
  ac_pt_PKG_CONFIG=$PKG_CONFIG
  # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $ac_pt_PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  ;;
esac
fi
ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
if test -n "$ac_pt_PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
$as_echo "$ac_pt_PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
  if test "x$ac_pt_PKG_CONFIG" = x; then
    PKG_CONFIG=""
  else
    case $cross_compiling:$ac_tool_warned in
yes:)
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
ac_tool_warned=yes ;;
esac
    PKG_CONFIG=$ac_pt_PKG_CONFIG
  fi
else
  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
fi
fi
if test -n "$PKG_CONFIG"; then
    _pkg_min_version=0.9.0
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
    if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    else
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
        PKG_CONFIG=""
    fi
fi
case "$host" in
    *-*-mingw32*)
        # Except on msys, where make can't handle full pathnames (bug 1972)
@@ -15785,6 +16002,14 @@
    fi
    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`
        if test x$lib != x; then
            echo $lib
            return
@@ -16062,6 +16287,108 @@
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_no_undefined" >&5
$as_echo "$have_no_undefined" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --dynamicbase" >&5
$as_echo_n "checking for linker option --dynamicbase... " >&6; }
have_dynamicbase=no
case "$host" in
    *)
        save_LDFLAGS="$LDFLAGS"
        LDFLAGS="$LDFLAGS -Wl,--dynamicbase"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int
main ()
{
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
        have_dynamicbase=yes
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--dynamicbase"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
        LDFLAGS="$save_LDFLAGS"
        ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_dynamicbase" >&5
$as_echo "$have_dynamicbase" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --nxcompat" >&5
$as_echo_n "checking for linker option --nxcompat... " >&6; }
have_nxcompat=no
case "$host" in
    *)
        save_LDFLAGS="$LDFLAGS"
        LDFLAGS="$LDFLAGS -Wl,--nxcompat"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int
main ()
{
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
        have_nxcompat=yes
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--nxcompat"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
        LDFLAGS="$save_LDFLAGS"
        ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_nxcompat" >&5
$as_echo "$have_nxcompat" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker option --high-entropy-va" >&5
$as_echo_n "checking for linker option --high-entropy-va... " >&6; }
have_high_entropy_va=no
case "$host" in
    *)
        save_LDFLAGS="$LDFLAGS"
        LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
int
main ()
{
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
        have_high_entropy_va=yes
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--high-entropy-va"
fi
rm -f core conftest.err conftest.$ac_objext \
    conftest$ac_exeext conftest.$ac_ext
        LDFLAGS="$save_LDFLAGS"
        ;;
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_high_entropy_va" >&5
$as_echo "$have_high_entropy_va" >&6; }
# Check whether --enable-libc was given.
if test "${enable_libc+set}" = set; then :
@@ -16651,7 +16978,7 @@
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi
    for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll
    for ac_func in malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit
do :
  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
@@ -17951,62 +18278,75 @@
fi
    if test x$enable_audio = xyes -a x$enable_jack = xyes; then
        audio_jack=no
        JACK_REQUIRED_VERSION=0.125
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK" >&5
$as_echo_n "checking for JACK... " >&6; }
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
if test -n "$JACK_CFLAGS"; then
    pkg_cv_JACK_CFLAGS="$JACK_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack >= 0.125\""; } >&5
  ($PKG_CONFIG --exists --print-errors "jack >= 0.125") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_JACK_CFLAGS=`$PKG_CONFIG --cflags "jack >= 0.125" 2>/dev/null`
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
  pkg_failed=yes
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
 else
    pkg_failed=untried
fi
if test -n "$JACK_LIBS"; then
    pkg_cv_JACK_LIBS="$JACK_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"jack >= 0.125\""; } >&5
  ($PKG_CONFIG --exists --print-errors "jack >= 0.125") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_JACK_LIBS=`$PKG_CONFIG --libs "jack >= 0.125" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JACK $JACK_REQUIRED_VERSION support" >&5
$as_echo_n "checking for JACK $JACK_REQUIRED_VERSION support... " >&6; }
        if test x$PKG_CONFIG != xno; then
        if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then
                JACK_CFLAGS=`$PKG_CONFIG --cflags jack`
                JACK_LIBS=`$PKG_CONFIG --libs jack`
                audio_jack=yes
            fi
        if test $_pkg_short_errors_supported = yes; then
            JACK_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "jack >= 0.125" 2>&1`
        else
            JACK_PKG_ERRORS=`$PKG_CONFIG --print-errors "jack >= 0.125" 2>&1`
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_jack" >&5
$as_echo "$audio_jack" >&6; }
    # Put the nasty error message in config.log where it belongs
    echo "$JACK_PKG_ERRORS" >&5
    audio_jack=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    audio_jack=no
else
    JACK_CFLAGS=$pkg_cv_JACK_CFLAGS
    JACK_LIBS=$pkg_cv_JACK_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    audio_jack=yes
fi
        if test x$audio_jack = xyes; then
            # Check whether --enable-jack-shared was given.
@@ -18349,62 +18689,75 @@
fi
    if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
        audio_pulseaudio=no
        PULSEAUDIO_REQUIRED_VERSION=0.9
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PULSEAUDIO" >&5
$as_echo_n "checking for PULSEAUDIO... " >&6; }
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
if test -n "$PULSEAUDIO_CFLAGS"; then
    pkg_cv_PULSEAUDIO_CFLAGS="$PULSEAUDIO_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags "libpulse-simple >= 0.9" 2>/dev/null`
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
  pkg_failed=yes
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
 else
    pkg_failed=untried
fi
if test -n "$PULSEAUDIO_LIBS"; then
    pkg_cv_PULSEAUDIO_LIBS="$PULSEAUDIO_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpulse-simple >= 0.9\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libpulse-simple >= 0.9") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_PULSEAUDIO_LIBS=`$PKG_CONFIG --libs "libpulse-simple >= 0.9" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support" >&5
$as_echo_n "checking for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support... " >&6; }
        if test x$PKG_CONFIG != xno; then
            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
                PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
                PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
                audio_pulseaudio=yes
            fi
        if test $_pkg_short_errors_supported = yes; then
            PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpulse-simple >= 0.9" 2>&1`
        else
            PULSEAUDIO_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpulse-simple >= 0.9" 2>&1`
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $audio_pulseaudio" >&5
$as_echo "$audio_pulseaudio" >&6; }
    # Put the nasty error message in config.log where it belongs
    echo "$PULSEAUDIO_PKG_ERRORS" >&5
    audio_pulseaudio=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    audio_pulseaudio=no
else
    PULSEAUDIO_CFLAGS=$pkg_cv_PULSEAUDIO_CFLAGS
    PULSEAUDIO_LIBS=$pkg_cv_PULSEAUDIO_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    audio_pulseaudio=yes
fi
        if test x$audio_pulseaudio = xyes; then
            # Check whether --enable-pulseaudio-shared was given.
@@ -18807,62 +19160,75 @@
fi
    if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
        fusionsound=no
        FUSIONSOUND_REQUIRED_VERSION=1.1.1
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FUSIONSOUND" >&5
$as_echo_n "checking for FUSIONSOUND... " >&6; }
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
if test -n "$FUSIONSOUND_CFLAGS"; then
    pkg_cv_FUSIONSOUND_CFLAGS="$FUSIONSOUND_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fusionsound >= 1.1.1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fusionsound >= 1.1.1") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags "fusionsound >= 1.1.1" 2>/dev/null`
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
  pkg_failed=yes
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
 else
    pkg_failed=untried
fi
if test -n "$FUSIONSOUND_LIBS"; then
    pkg_cv_FUSIONSOUND_LIBS="$FUSIONSOUND_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fusionsound >= 1.1.1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fusionsound >= 1.1.1") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FUSIONSOUND_LIBS=`$PKG_CONFIG --libs "fusionsound >= 1.1.1" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support" >&5
$as_echo_n "checking for FusionSound $FUSIONSOUND_REQUIRED_VERSION support... " >&6; }
        if test x$PKG_CONFIG != xno; then
            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
                FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
                FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
                fusionsound=yes
            fi
        if test $_pkg_short_errors_supported = yes; then
            FUSIONSOUND_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fusionsound >= 1.1.1" 2>&1`
        else
            FUSIONSOUND_PKG_ERRORS=`$PKG_CONFIG --print-errors "fusionsound >= 1.1.1" 2>&1`
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $fusionsound" >&5
$as_echo "$fusionsound" >&6; }
    # Put the nasty error message in config.log where it belongs
    echo "$FUSIONSOUND_PKG_ERRORS" >&5
    fusionsound=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    fusionsound=no
else
    FUSIONSOUND_CFLAGS=$pkg_cv_FUSIONSOUND_CFLAGS
    FUSIONSOUND_LIBS=$pkg_cv_FUSIONSOUND_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    fusionsound=yes
fi
        if test x$fusionsound = xyes; then
@@ -18996,6 +19362,106 @@
    fi
}
CheckARM()
{
    # Check whether --enable-arm-simd was given.
if test "${enable_arm_simd+set}" = set; then :
  enableval=$enable_arm_simd; enable_arm_simd=$enableval
else
  enable_arm_simd=yes
fi
    if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_simd = xyes; then
        save_CFLAGS="$CFLAGS"
        have_arm_simd=no
        CFLAGS="-x assembler-with-cpp $CFLAGS"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM SIMD" >&5
$as_echo_n "checking for ARM SIMD... " >&6; }
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
        .text
        .arch armv6
        .object_arch armv4
        .arm
        .altmacro
        #ifndef __ARM_EABI__
        #error EABI is required (to be sure that calling conventions are compatible)
        #endif
        pld [r0]
        uqadd8 r0, r0, r0
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  have_arm_simd=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_arm_simd" >&5
$as_echo "$have_arm_simd" >&6; }
        CFLAGS="$save_CFLAGS"
        if test x$have_arm_simd = xyes; then
            $as_echo "#define SDL_ARM_SIMD_BLITTERS 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
            WARN_ABOUT_ARM_SIMD_ASM_MIT="yes"
        fi
    fi
}
CheckNEON()
{
    # Check whether --enable-arm-neon was given.
if test "${enable_arm_neon+set}" = set; then :
  enableval=$enable_arm_neon; enable_arm_neon=$enableval
else
  enable_arm_neon=no
fi
    if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_neon = xyes; then
        save_CFLAGS="$CFLAGS"
        have_arm_neon=no
        CFLAGS="-x assembler-with-cpp $CFLAGS"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ARM NEON" >&5
$as_echo_n "checking for ARM NEON... " >&6; }
        cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
        .text
        .fpu neon
        .arch armv7a
        .object_arch armv4
        .eabi_attribute 10, 0
        .arm
        .altmacro
        #ifndef __ARM_EABI__
        #error EABI is required (to be sure that calling conventions are compatible)
        #endif
        pld [r0]
        vmovn.u16 d0, q0
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
  have_arm_neon=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_arm_neon" >&5
$as_echo "$have_arm_neon" >&6; }
        CFLAGS="$save_CFLAGS"
        if test x$have_arm_neon = xyes; then
            $as_echo "#define SDL_ARM_NEON_BLITTERS 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S"
            WARN_ABOUT_ARM_NEON_ASM_MIT="yes"
        fi
    fi
}
CheckVisibilityHidden()
{
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -fvisibility=hidden option" >&5
@@ -19033,6 +19499,43 @@
    if test x$have_gcc_fvisibility = xyes; then
        EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
    fi
}
CheckNoStrictAliasing()
{
    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GCC -fno-strict-aliasing option" >&5
$as_echo_n "checking for GCC -fno-strict-aliasing option... " >&6; }
    have_gcc_no_strict_aliasing=no
    save_CFLAGS="$CFLAGS"
    CFLAGS="$save_CFLAGS -fno-strict-aliasing"
    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
    int x = 0;
int
main ()
{
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
    have_gcc_no_strict_aliasing=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gcc_no_strict_aliasing" >&5
$as_echo "$have_gcc_no_strict_aliasing" >&6; }
    CFLAGS="$save_CFLAGS"
    if test x$have_gcc_no_strict_aliasing = xyes; then
        EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
    fi
}
@@ -19180,52 +19683,10 @@
    if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Wayland support" >&5
$as_echo_n "checking for Wayland support... " >&6; }
        video_wayland=no
        if  test x$PKG_CONFIG != xno && \
            test x$video_opengl_egl = xyes && \
        if  test x$video_opengl_egl = xyes && \
            test x$video_opengles_v2 = xyes; then
            if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
                WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
@@ -19320,151 +19781,6 @@
    fi
}
CheckMir()
{
    # Check whether --enable-video-mir was given.
if test "${enable_video_mir+set}" = set; then :
  enableval=$enable_video_mir;
else
  enable_video_mir=no
fi
    if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mir support" >&5
$as_echo_n "checking for Mir support... " >&6; }
        video_mir=no
        if test x$PKG_CONFIG != xno; then
            if $PKG_CONFIG --exists mirclient egl xkbcommon ; then
                MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon`
                MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
                save_CFLAGS="$CFLAGS"
                CFLAGS="$save_CFLAGS $MIR_CFLAGS"
                                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */
                #include <mir_toolkit/mir_client_library.h>
int
main ()
{
                    MirWindowAttrib attrib = mir_window_attrib_state
  ;
  return 0;
}
_ACEOF
if ac_fn_c_try_compile "$LINENO"; then :
                video_mir=yes
fi
rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
                CFLAGS="$save_CFLAGS"
            fi
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_mir" >&5
$as_echo "$video_mir" >&6; }
        if test x$video_mir = xyes; then
$as_echo "#define SDL_VIDEO_DRIVER_MIR 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $MIR_CFLAGS"
            # Check whether --enable-mir-shared was given.
if test "${enable_mir_shared+set}" = set; then :
  enableval=$enable_mir_shared;
else
  enable_mir_shared=maybe
fi
                        case "$host" in
                *)
                    mirclient_lib=`find_lib "libmirclient.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
                    xkbcommon_lib=`find_lib "libxkbcommon.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`
                    ;;
            esac
            if test x$enable_mir_shared = xmaybe; then
                enable_mir_shared=yes
            fi
            if test x$have_loadso != xyes && \
               test x$enable_mir_shared = xyes; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic Mir loading" >&5
$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic Mir loading" >&2;}
                enable_mir_shared=no
            fi
            if test x$have_loadso = xyes && \
               test x$enable_mir_shared = xyes && \
               test x$mirclient_lib != x && \
               test x$xkbcommon_lib != x; then
                echo "-- dynamic libmirclient -> $mirclient_lib"
                echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
cat >>confdefs.h <<_ACEOF
#define SDL_VIDEO_DRIVER_MIR_DYNAMIC "$mirclient_lib"
_ACEOF
cat >>confdefs.h <<_ACEOF
#define SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON "$xkbcommon_lib"
_ACEOF
                SUMMARY_video="${SUMMARY_video} mir(dynamic)"
            else
                enable_mir_shared=no
                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MIR_LIBS"
                SUMMARY_video="${SUMMARY_video} mir"
            fi
            have_video=yes
        fi
    fi
}
CheckNativeClient()
{
@@ -19528,63 +19844,91 @@
fi
    if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for RPI" >&5
$as_echo_n "checking for RPI... " >&6; }
if test -n "$RPI_CFLAGS"; then
    pkg_cv_RPI_CFLAGS="$RPI_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bcm_host brcmegl\""; } >&5
  ($PKG_CONFIG --exists --print-errors "bcm_host brcmegl") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_RPI_CFLAGS=`$PKG_CONFIG --cflags "bcm_host brcmegl" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$RPI_LIBS"; then
    pkg_cv_RPI_LIBS="$RPI_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"bcm_host brcmegl\""; } >&5
  ($PKG_CONFIG --exists --print-errors "bcm_host brcmegl") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_RPI_LIBS=`$PKG_CONFIG --libs "bcm_host brcmegl" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
            RPI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "bcm_host brcmegl" 2>&1`
        else
            RPI_PKG_ERRORS=`$PKG_CONFIG --print-errors "bcm_host brcmegl" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$RPI_PKG_ERRORS" >&5
    video_rpi=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    video_rpi=no
else
    RPI_CFLAGS=$pkg_cv_RPI_CFLAGS
    RPI_LIBS=$pkg_cv_RPI_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    video_rpi=yes
fi
        if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists bcm_host; then
            RPI_CFLAGS=`$PKG_CONFIG --cflags bcm_host brcmegl`
            RPI_LDFLAGS=`$PKG_CONFIG --libs bcm_host brcmegl`
        elif test x$ARCH = xnetbsd; then
            RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
            RPI_LDFLAGS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
        else
            RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
            RPI_LDFLAGS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
        if test x$video_rpi = xno; then
            if test x$ARCH = xnetbsd; then
                RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
                RPI_LIBS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
            else
                RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
                RPI_LIBS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
            fi
        fi
        # Save the original compiler flags and libraries
        ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
        # Add the Raspberry Pi compiler flags and libraries
        CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LDFLAGS"
        CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Raspberry Pi" >&5
$as_echo_n "checking for Raspberry Pi... " >&6; }
@@ -19621,7 +19965,7 @@
            CFLAGS="$CFLAGS $RPI_CFLAGS"
            SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LDFLAGS"
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LIBS"
            SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
$as_echo "#define SDL_VIDEO_DRIVER_RPI 1" >>confdefs.h
@@ -19646,10 +19990,10 @@
                # This isn't necessary for X11, but fixes GLX detection
                if test "x$x_includes" = xNONE && \
                   test "x$x_libraries" = xNONE && \
                   test -d /usr/X11R6/include && \
                   test -d /usr/X11R6/lib; then
                    x_includes="/usr/X11R6/include"
                    x_libraries="/usr/X11R6/lib"
                   test -d /opt/X11/include && \
                   test -d /opt/X11/lib; then
                    x_includes="/opt/X11/include"
                    x_libraries="/opt/X11/lib"
                fi
                ;;
        esac
@@ -20347,15 +20691,16 @@
            case "$host" in
                *-*-darwin*)
                    x11_lib='/usr/X11R6/lib/libX11.6.dylib'
                    x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
                    xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
                    xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
                    xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
                    xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
                    xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
                    xss_lib='/usr/X11R6/lib/libXss.1.dylib'
                    xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
                    # Apple now puts this in /opt/X11
                    x11_lib='/opt/X11/lib/libX11.6.dylib'
                    x11ext_lib='/opt/X11/lib/libXext.6.dylib'
                    xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
                    xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
                    xinput_lib='/opt/X11/lib/libXi.6.dylib'
                    xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
                    xrender_lib='/opt/X11/lib/libXrender.1.dylib'
                    xss_lib='/opt/X11/lib/libXss.1.dylib'
                    xvidmode_lib='/opt/X11/lib/libXxf86vm.1.dylib'
                    ;;
                *-*-openbsd*)
                    x11_lib='libX11.so'
@@ -21142,6 +21487,9 @@
                SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
            fi
        fi
    else
        # Prevent Mesa from including X11 headers
        EXTRA_CFLAGS="$EXTRA_CFLAGS -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11"
    fi
}
@@ -21292,6 +21640,13 @@
CheckMETAL()
{
    # Check whether --enable-video-metal was given.
if test "${enable_video_metal+set}" = set; then :
  enableval=$enable_video_metal;
else
  enable_video_metal=yes
fi
    # Check whether --enable-render-metal was given.
if test "${enable_render_metal+set}" = set; then :
  enableval=$enable_render_metal;
@@ -21299,7 +21654,7 @@
  enable_render_metal=yes
fi
    if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
    if test x$enable_video = xyes -a x$enable_video_metal = xyes; then
        save_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS -x objective-c"
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Metal framework" >&5
@@ -21336,11 +21691,17 @@
$as_echo "$have_metal" >&6; }
        if test x$have_metal = xyes; then
$as_echo "#define SDL_VIDEO_METAL 1" >>confdefs.h
            if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
$as_echo "#define SDL_VIDEO_RENDER_METAL 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
                SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
            fi
            SUMMARY_video="${SUMMARY_video} metal"
        else
            enable_video_metal=no
            enable_render_metal=no
        fi
    fi
@@ -21357,118 +21718,76 @@
fi
    if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
        video_directfb=no
        DIRECTFB_REQUIRED_VERSION=1.0.0
        for ac_prog in directfb-config
do
  # Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_DIRECTFBCONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRECTFB" >&5
$as_echo_n "checking for DIRECTFB... " >&6; }
if test -n "$DIRECTFB_CFLAGS"; then
    pkg_cv_DIRECTFB_CFLAGS="$DIRECTFB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 1.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "directfb >= 1.0.0") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags "directfb >= 1.0.0" 2>/dev/null`
else
  case $DIRECTFBCONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_DIRECTFBCONFIG="$DIRECTFBCONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
as_dummy="$prefix/bin:$PATH"
for as_dir in $as_dummy
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_DIRECTFBCONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  ;;
esac
  pkg_failed=yes
fi
DIRECTFBCONFIG=$ac_cv_path_DIRECTFBCONFIG
if test -n "$DIRECTFBCONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRECTFBCONFIG" >&5
$as_echo "$DIRECTFBCONFIG" >&6; }
 else
    pkg_failed=untried
fi
if test -n "$DIRECTFB_LIBS"; then
    pkg_cv_DIRECTFB_LIBS="$DIRECTFB_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"directfb >= 1.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "directfb >= 1.0.0") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_DIRECTFB_LIBS=`$PKG_CONFIG --libs "directfb >= 1.0.0" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
  test -n "$DIRECTFBCONFIG" && break
done
test -n "$DIRECTFBCONFIG" || DIRECTFBCONFIG="no"
        if test x$DIRECTFBCONFIG = xno; then
            # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
        _pkg_short_errors_supported=no
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
            if test x$PKG_CONFIG != xno; then
                if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
                    DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
                    DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
                    DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
                    video_directfb=yes
                fi
            fi
        if test $_pkg_short_errors_supported = yes; then
            DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "directfb >= 1.0.0" 2>&1`
        else
            set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
            NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
            set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'`
            HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
            if test $HAVE_VERSION -ge $NEED_VERSION; then
                DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
                DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
                DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
                video_directfb=yes
            fi
            DIRECTFB_PKG_ERRORS=`$PKG_CONFIG --print-errors "directfb >= 1.0.0" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$DIRECTFB_PKG_ERRORS" >&5
    video_directfb=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    video_directfb=no
else
    DIRECTFB_CFLAGS=$pkg_cv_DIRECTFB_CFLAGS
    DIRECTFB_LIBS=$pkg_cv_DIRECTFB_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    video_directfb=yes
fi
        if test x$video_directfb = xyes; then
            # SuSE 11.1 installs directfb-config without directfb-devel
            save_CPPFLAGS="$CPPFLAGS"
@@ -21484,10 +21803,6 @@
            CPPFLAGS="$save_CPPFLAGS"
            video_directfb=$have_directfb_hdr
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DirectFB $DIRECTFB_REQUIRED_VERSION support" >&5
$as_echo_n "checking for DirectFB $DIRECTFB_REQUIRED_VERSION support... " >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $video_directfb" >&5
$as_echo "$video_directfb" >&6; }
        if test x$video_directfb = xyes; then
            # Check whether --enable-directfb-shared was given.
@@ -21553,82 +21868,152 @@
    if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
        video_kmsdrm=no
        libdrm_avail=no
        libgbm_avail=no
        LIBDRM_REQUIRED_VERSION=2.4.46
        LIBGBM_REQUIRED_VERSION=9.0.0
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBDRM" >&5
$as_echo_n "checking for LIBDRM... " >&6; }
if test -n "$LIBDRM_CFLAGS"; then
    pkg_cv_LIBDRM_CFLAGS="$LIBDRM_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBDRM_CFLAGS=`$PKG_CONFIG --cflags "libdrm >= 2.4.46" 2>/dev/null`
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
  pkg_failed=yes
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
 else
    pkg_failed=untried
fi
if test -n "$LIBDRM_LIBS"; then
    pkg_cv_LIBDRM_LIBS="$LIBDRM_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdrm >= 2.4.46\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libdrm >= 2.4.46") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBDRM_LIBS=`$PKG_CONFIG --libs "libdrm >= 2.4.46" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
            LIBDRM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libdrm >= 2.4.46" 2>&1`
        else
            LIBDRM_PKG_ERRORS=`$PKG_CONFIG --print-errors "libdrm >= 2.4.46" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$LIBDRM_PKG_ERRORS" >&5
    libdrm_avail=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    libdrm_avail=no
else
    LIBDRM_CFLAGS=$pkg_cv_LIBDRM_CFLAGS
    LIBDRM_LIBS=$pkg_cv_LIBDRM_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    libdrm_avail=yes
fi
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGBM" >&5
$as_echo_n "checking for LIBGBM... " >&6; }
if test -n "$LIBGBM_CFLAGS"; then
    pkg_cv_LIBGBM_CFLAGS="$LIBGBM_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 9.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gbm >= 9.0.0") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBGBM_CFLAGS=`$PKG_CONFIG --cflags "gbm >= 9.0.0" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBGBM_LIBS"; then
    pkg_cv_LIBGBM_LIBS="$LIBGBM_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gbm >= 9.0.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "gbm >= 9.0.0") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBGBM_LIBS=`$PKG_CONFIG --libs "gbm >= 9.0.0" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
        if test x$PKG_CONFIG != xno; then
            if $PKG_CONFIG --atleast-pkgconfig-version 0.7; then
                if $PKG_CONFIG --atleast-version $LIBDRM_REQUIRED_VERSION libdrm; then
                    LIBDRM_CFLAGS=`$PKG_CONFIG --cflags libdrm`
                    LIBDRM_LIBS=`$PKG_CONFIG --libs libdrm`
                    LIBDRM_PREFIX=`$PKG_CONFIG --variable=prefix libdrm`
                    libdrm_avail=yes
                fi
                if $PKG_CONFIG --atleast-version $LIBGBM_REQUIRED_VERSION gbm; then
                    LIBGBM_CFLAGS=`$PKG_CONFIG --cflags gbm`
                    LIBGBM_LIBS=`$PKG_CONFIG --libs gbm`
                    LIBGBM_PREFIX=`$PKG_CONFIG --variable=prefix gbm`
                    libgbm_avail=yes
                fi
                if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
                    video_kmsdrm=yes
                fi
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support" >&5
$as_echo_n "checking for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support... " >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libdrm_avail" >&5
$as_echo "$libdrm_avail" >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support" >&5
$as_echo_n "checking for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support... " >&6; }
                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgbm_avail" >&5
$as_echo "$libgbm_avail" >&6; }
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
                if test x$video_kmsdrm = xyes; then
                    # Check whether --enable-kmsdrm-shared was given.
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
            LIBGBM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gbm >= 9.0.0" 2>&1`
        else
            LIBGBM_PKG_ERRORS=`$PKG_CONFIG --print-errors "gbm >= 9.0.0" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$LIBGBM_PKG_ERRORS" >&5
    libgbm_avail=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    libgbm_avail=no
else
    LIBGBM_CFLAGS=$pkg_cv_LIBGBM_CFLAGS
    LIBGBM_LIBS=$pkg_cv_LIBGBM_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    libgbm_avail=yes
fi
        if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
            video_kmsdrm=yes
        fi
        if test x$video_kmsdrm = xyes; then
            # Check whether --enable-kmsdrm-shared was given.
if test "${enable_kmsdrm_shared+set}" = set; then :
  enableval=$enable_kmsdrm_shared;
else
@@ -21639,22 +22024,22 @@
$as_echo "#define SDL_VIDEO_DRIVER_KMSDRM 1" >>confdefs.h
                    SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
                    EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
            SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
                    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5
            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for kmsdrm dynamic loading support" >&5
$as_echo_n "checking for kmsdrm dynamic loading support... " >&6; }
                    kmsdrm_shared=no
                    drm_lib=`find_lib "libdrm.so.*" "$DRM_LIBS"`
                    gbm_lib=`find_lib "libgbm.so.*" "$DRM_LIBS"`
                    if test x$have_loadso != xyes && \
                       test x$enable_kmsdrm_shared = xyes; then
                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&5
            kmsdrm_shared=no
            drm_lib=`find_lib "libdrm.so.*" "$DRM_LIBS"`
            gbm_lib=`find_lib "libgbm.so.*" "$DRM_LIBS"`
            if test x$have_loadso != xyes && \
               test x$enable_kmsdrm_shared = xyes; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&5
$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic kmsdrm loading" >&2;}
                    fi
                    if test x$have_loadso = xyes && \
                       test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
                        kmsdrm_shared=yes
            fi
            if test x$have_loadso = xyes && \
               test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
                kmsdrm_shared=yes
cat >>confdefs.h <<_ACEOF
#define SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC "$drm_lib"
@@ -21670,16 +22055,14 @@
#define HAVE_KMSDRM_SHARED "TRUE"
_ACEOF
                        SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
                    else
                        EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
                        SUMMARY_video="${SUMMARY_video} kmsdrm"
                    fi
                    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kmsdrm_shared" >&5
$as_echo "$kmsdrm_shared" >&6; }
                    have_video=yes
                fi
                SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
            else
                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
                SUMMARY_video="${SUMMARY_video} kmsdrm"
            fi
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $kmsdrm_shared" >&5
$as_echo "$kmsdrm_shared" >&6; }
            have_video=yes
        fi
    fi
}
@@ -21814,6 +22197,7 @@
          #define LINUX
          #define EGL_API_FB
          #define MESA_EGL_NO_X11_HEADERS
          #include <EGL/egl.h>
          #include <EGL/eglext.h>
@@ -22352,52 +22736,78 @@
fi
    if test x$enable_dbus = xyes; then
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for DBUS" >&5
$as_echo_n "checking for DBUS... " >&6; }
if test -n "$DBUS_CFLAGS"; then
    pkg_cv_DBUS_CFLAGS="$DBUS_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$DBUS_LIBS"; then
    pkg_cv_DBUS_LIBS="$DBUS_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5
  ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
            DBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "dbus-1" 2>&1`
        else
            DBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "dbus-1" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$DBUS_PKG_ERRORS" >&5
        if test x$PKG_CONFIG != xno; then
            DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1`
            save_CFLAGS="$CFLAGS"
            CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
            ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
    have_dbus=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    have_dbus=no
else
    DBUS_CFLAGS=$pkg_cv_DBUS_CFLAGS
    DBUS_LIBS=$pkg_cv_DBUS_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    have_dbus=yes
fi
        save_CFLAGS="$CFLAGS"
        CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
        ac_fn_c_check_header_mongrel "$LINENO" "dbus/dbus.h" "ac_cv_header_dbus_dbus_h" "$ac_includes_default"
if test "x$ac_cv_header_dbus_dbus_h" = xyes; then :
  have_dbus_dbus_h_hdr=yes
else
@@ -22405,14 +22815,13 @@
fi
            CFLAGS="$save_CFLAGS"
            if test x$have_dbus_dbus_h_hdr = xyes; then
        CFLAGS="$save_CFLAGS"
        if test x$have_dbus_dbus_h_hdr = xyes; then
$as_echo "#define HAVE_DBUS_DBUS_H 1" >>confdefs.h
                EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
            fi
            EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
        fi
    fi
}
@@ -22430,7 +22839,7 @@
$as_echo "#define SDL_USE_IME 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
        SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
    fi
}
@@ -22444,52 +22853,78 @@
fi
    if test x$enable_ibus = xyes; then
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for IBUS" >&5
$as_echo_n "checking for IBUS... " >&6; }
if test -n "$IBUS_CFLAGS"; then
    pkg_cv_IBUS_CFLAGS="$IBUS_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibus-1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "ibus-1.0") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_IBUS_CFLAGS=`$PKG_CONFIG --cflags "ibus-1.0" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$IBUS_LIBS"; then
    pkg_cv_IBUS_LIBS="$IBUS_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ibus-1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "ibus-1.0") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_IBUS_LIBS=`$PKG_CONFIG --libs "ibus-1.0" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
            IBUS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ibus-1.0" 2>&1`
        else
            IBUS_PKG_ERRORS=`$PKG_CONFIG --print-errors "ibus-1.0" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$IBUS_PKG_ERRORS" >&5
        if test x$PKG_CONFIG != xno; then
            IBUS_CFLAGS=`$PKG_CONFIG --cflags ibus-1.0`
            save_CFLAGS="$CFLAGS"
            CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
            ac_fn_c_check_header_mongrel "$LINENO" "ibus-1.0/ibus.h" "ac_cv_header_ibus_1_0_ibus_h" "$ac_includes_default"
    have_ibus=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    have_ibus=no
else
    IBUS_CFLAGS=$pkg_cv_IBUS_CFLAGS
    IBUS_LIBS=$pkg_cv_IBUS_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    have_ibus=yes
fi
        save_CFLAGS="$CFLAGS"
        CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
        ac_fn_c_check_header_mongrel "$LINENO" "ibus-1.0/ibus.h" "ac_cv_header_ibus_1_0_ibus_h" "$ac_includes_default"
if test "x$ac_cv_header_ibus_1_0_ibus_h" = xyes; then :
  have_ibus_ibus_h_hdr=yes
else
@@ -22497,7 +22932,7 @@
fi
            ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
        ac_fn_c_check_header_mongrel "$LINENO" "sys/inotify.h" "ac_cv_header_sys_inotify_h" "$ac_includes_default"
if test "x$ac_cv_header_sys_inotify_h" = xyes; then :
  have_inotify_inotify_h_hdr=yes
else
@@ -22505,27 +22940,26 @@
fi
            CFLAGS="$save_CFLAGS"
            if test x$have_ibus_ibus_h_hdr = xyes; then
                if test x$enable_ime != xyes; then
                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
        CFLAGS="$save_CFLAGS"
        if test x$have_ibus_ibus_h_hdr = xyes; then
            if test x$enable_ime != xyes; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for IBus." >&5
$as_echo "$as_me: WARNING: IME support is required for IBus." >&2;}
                    have_ibus_ibus_h_hdr=no
                elif test x$enable_dbus != xyes; then
                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
                have_ibus_ibus_h_hdr=no
            elif test x$enable_dbus != xyes; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for IBus." >&5
$as_echo "$as_me: WARNING: DBus support is required for IBus." >&2;}
                    have_ibus_ibus_h_hdr=no
                elif test x$have_inotify_inotify_h_hdr != xyes; then
                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: INotify support is required for IBus." >&5
                have_ibus_ibus_h_hdr=no
            elif test x$have_inotify_inotify_h_hdr != xyes; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: INotify support is required for IBus." >&5
$as_echo "$as_me: WARNING: INotify support is required for IBus." >&2;}
                    have_ibus_ibus_h_hdr=no
                else
                have_ibus_ibus_h_hdr=no
            else
$as_echo "#define HAVE_IBUS_IBUS_H 1" >>confdefs.h
                    EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
               fi
                EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
            fi
        fi
    fi
@@ -22541,51 +22975,77 @@
fi
    if test x$enable_fcitx = xyes; then
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FCITX" >&5
$as_echo_n "checking for FCITX... " >&6; }
if test -n "$FCITX_CFLAGS"; then
    pkg_cv_FCITX_CFLAGS="$FCITX_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fcitx\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fcitx") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FCITX_CFLAGS=`$PKG_CONFIG --cflags "fcitx" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$FCITX_LIBS"; then
    pkg_cv_FCITX_LIBS="$FCITX_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"fcitx\""; } >&5
  ($PKG_CONFIG --exists --print-errors "fcitx") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_FCITX_LIBS=`$PKG_CONFIG --libs "fcitx" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
            FCITX_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fcitx" 2>&1`
        else
            FCITX_PKG_ERRORS=`$PKG_CONFIG --print-errors "fcitx" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$FCITX_PKG_ERRORS" >&5
        if test x$PKG_CONFIG != xno; then
            FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
            CFLAGS="$CFLAGS $FCITX_CFLAGS"
            ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
    have_fcitx=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    have_fcitx=no
else
    FCITX_CFLAGS=$pkg_cv_FCITX_CFLAGS
    FCITX_LIBS=$pkg_cv_FCITX_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    have_fcitx=yes
fi
        CFLAGS="$CFLAGS $FCITX_CFLAGS"
        ac_fn_c_check_header_mongrel "$LINENO" "fcitx/frontend.h" "ac_cv_header_fcitx_frontend_h" "$ac_includes_default"
if test "x$ac_cv_header_fcitx_frontend_h" = xyes; then :
  have_fcitx_frontend_h_hdr=yes
else
@@ -22593,23 +23053,22 @@
fi
            CFLAGS="$save_CFLAGS"
            if test x$have_fcitx_frontend_h_hdr = xyes; then
                if test x$enable_ime != xyes; then
                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
        CFLAGS="$save_CFLAGS"
        if test x$have_fcitx_frontend_h_hdr = xyes; then
            if test x$enable_ime != xyes; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IME support is required for fcitx." >&5
$as_echo "$as_me: WARNING: IME support is required for fcitx." >&2;}
                    have_fcitx_frontend_h_hdr=no
                elif test x$enable_dbus != xyes; then
                    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
                have_fcitx_frontend_h_hdr=no
            elif test x$enable_dbus != xyes; then
                { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DBus support is required for fcitx." >&5
$as_echo "$as_me: WARNING: DBus support is required for fcitx." >&2;}
                    have_fcitx_frontend_h_hdr=no
                else
                have_fcitx_frontend_h_hdr=no
            else
$as_echo "#define HAVE_FCITX_FRONTEND_H 1" >>confdefs.h
                    EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
               fi
                EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
            fi
        fi
    fi
@@ -23240,9 +23699,6 @@
        fi
        SUMMARY_video="${SUMMARY_video} directx"
        SUMMARY_audio="${SUMMARY_audio} directx"
        # FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
        # FIXME:  ...so force it off for now.
        case "$host" in
@@ -23274,14 +23730,6 @@
        $as_echo "#define HAVE_AUDIOCLIENT_H 1" >>confdefs.h
    fi
    ac_fn_c_check_header_mongrel "$LINENO" "endpointvolume.h" "ac_cv_header_endpointvolume_h" "$ac_includes_default"
if test "x$ac_cv_header_endpointvolume_h" = xyes; then :
  $as_echo "#define HAVE_ENDPOINTVOLUME_H 1" >>confdefs.h
fi
    # Check whether --enable-wasapi was given.
if test "${enable_wasapi+set}" = set; then :
@@ -23772,8 +24220,17 @@
{
    # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
    # so we'll just use libusb when it's available.
    #
    # Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
    case "$host" in
        # libusb does not support iOS
        arm*-apple-darwin* | *-ios-* )
            skiplibusb=yes
            ;;
        # On the other hand, *BSD specifically uses libusb only
        *-*-*bsd* )
            onlylibusb=yes
            ;;
    esac
    # Check whether --enable-hidapi was given.
if test "${enable_hidapi+set}" = set; then :
  enableval=$enable_hidapi;
@@ -23782,51 +24239,78 @@
fi
    if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
        hidapi_support=no
        # Extract the first word of "pkg-config", so it can be a program name with args.
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
if ${ac_cv_path_PKG_CONFIG+:} false; then :
  $as_echo_n "(cached) " >&6
else
  case $PKG_CONFIG in
  [\\/]* | ?:[\\/]*)
  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
  ;;
  *)
  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
for as_dir in $PATH
do
  IFS=$as_save_IFS
  test -z "$as_dir" && as_dir=.
    for ac_exec_ext in '' $ac_executable_extensions; do
  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
    break 2
  fi
done
  done
IFS=$as_save_IFS
        if test x$skiplibusb = xyes; then
            hidapi_support=yes
        else
  test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
  ;;
esac
fi
PKG_CONFIG=$ac_cv_path_PKG_CONFIG
if test -n "$PKG_CONFIG"; then
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
$as_echo "$PKG_CONFIG" >&6; }
pkg_failed=no
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBUSB" >&5
$as_echo_n "checking for LIBUSB... " >&6; }
if test -n "$LIBUSB_CFLAGS"; then
    pkg_cv_LIBUSB_CFLAGS="$LIBUSB_CFLAGS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBUSB_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0" 2>/dev/null`
else
  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test -n "$LIBUSB_LIBS"; then
    pkg_cv_LIBUSB_LIBS="$LIBUSB_LIBS"
 elif test -n "$PKG_CONFIG"; then
    if test -n "$PKG_CONFIG" && \
    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0\""; } >&5
  ($PKG_CONFIG --exists --print-errors "libusb-1.0") 2>&5
  ac_status=$?
  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
  test $ac_status = 0; }; then
  pkg_cv_LIBUSB_LIBS=`$PKG_CONFIG --libs "libusb-1.0" 2>/dev/null`
else
  pkg_failed=yes
fi
 else
    pkg_failed=untried
fi
if test $pkg_failed = yes; then
       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
        _pkg_short_errors_supported=yes
else
        _pkg_short_errors_supported=no
fi
        if test $_pkg_short_errors_supported = yes; then
            LIBUSB_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libusb-1.0" 2>&1`
        else
            LIBUSB_PKG_ERRORS=`$PKG_CONFIG --print-errors "libusb-1.0" 2>&1`
        fi
    # Put the nasty error message in config.log where it belongs
    echo "$LIBUSB_PKG_ERRORS" >&5
        if test x$PKG_CONFIG != xno; then
            LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0`
            LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0`
    have_libusb=no
elif test $pkg_failed = untried; then
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
    have_libusb=no
else
    LIBUSB_CFLAGS=$pkg_cv_LIBUSB_CFLAGS
    LIBUSB_LIBS=$pkg_cv_LIBUSB_LIBS
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
    have_libusb=yes
fi
            save_CFLAGS="$CFLAGS"
            CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
            ac_fn_c_check_header_mongrel "$LINENO" "libusb.h" "ac_cv_header_libusb_h" "$ac_includes_default"
@@ -23836,18 +24320,55 @@
            CFLAGS="$save_CFLAGS"
            if test x$have_libusb_h = xyes; then
                hidapi_support=yes
            elif test x$onlylibusb = xyes; then
                hidapi_support=no
            else
                hidapi_support=yes
            fi
        fi
        if test x$have_libusb_h = xyes; then
            hidapi_support=yes
        if test x$hidapi_support = xyes; then
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
            EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
            SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
            SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS"
            SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
            if test x$have_libusb_h = xyes; then
                EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
                if test x$onlylibusb = xyes; then
                    SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
                    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
                else
                    if test x$have_loadso != xyes; then
                        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You must have SDL_LoadObject() support for dynamic libusb loading" >&5
$as_echo "$as_me: WARNING: You must have SDL_LoadObject() support for dynamic libusb loading" >&2;}
                    fi
                    # libusb is loaded dynamically, so don't add it to LDFLAGS
                    libusb_lib=""
                    case "$host" in
                        *-*-darwin* )
                            libusb_lib="libusb-1.0.0.dylib"
                            ;;
                        *-*-cygwin* | *-*-mingw32* )
                            libusb_lib="libusb-1.0.dll"
                            ;;
                    esac
                    if test x$libusb_lib = x; then
                        libusb_lib=`find_lib "libusb-1.0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`
                    fi
cat >>confdefs.h <<_ACEOF
#define SDL_LIBUSB_DYNAMIC "$libusb_lib"
_ACEOF
                fi
            fi
        fi
        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hidapi support" >&5
$as_echo_n "checking for hidapi support... " >&6; }
        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hidapi_support" >&5
@@ -23985,7 +24506,37 @@
}
CheckEventSignals()
{
    # Check whether --enable-backgrounding-signal was given.
if test "${enable_backgrounding_signal+set}" = set; then :
  enableval=$enable_backgrounding_signal;
else
  enable_backgrounding_signal=no
fi
    if test x$enable_backgrounding_signal != xno; then
        EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_BACKGROUNDING_SIGNAL=$enable_backgrounding_signal"
    fi
    # Check whether --enable-foregrounding-signal was given.
if test "${enable_foregrounding_signal+set}" = set; then :
  enableval=$enable_foregrounding_signal;
else
  enable_foregrounding_signal=no
fi
    if test x$enable_foregrounding_signal != xno; then
        EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_FOREGROUNDING_SIGNAL=$enable_foregrounding_signal"
    fi
}
CheckWarnAll
CheckNoStrictAliasing
CheckEventSignals
case "$host" in
    *-*-linux*|*-*-uclinux*|*-*-gnu*|*-*-k*bsd*-gnu|*-*-bsdi*|*-*-freebsd*|*-*-dragonfly*|*-*-netbsd*|*-*-openbsd*|*-*-sysv5*|*-*-solaris*|*-*-hpux*|*-*-aix*|*-*-minix*|*-*-nto*)
@@ -24033,6 +24584,8 @@
        CheckDiskAudio
        CheckDummyAudio
        CheckDLOPEN
        CheckARM
        CheckNEON
        CheckOSS
        CheckALSA
        CheckPulseAudio
@@ -24051,8 +24604,8 @@
        CheckOpenGLX11
        CheckOpenGLESX11
        CheckVulkan
        CheckMir
        CheckWayland
        CheckInputEvents
        CheckLibUDev
        CheckDBus
        CheckIME
@@ -24060,7 +24613,6 @@
        CheckFcitx
        case $ARCH in
          linux)
              CheckInputEvents
              CheckInputKD
          ;;
        esac
@@ -24222,6 +24774,7 @@
            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev*.c"
        fi
        # Set up other core UNIX files
        SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
        SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
        ;;
    *-*-cygwin* | *-*-mingw32*)
@@ -24244,6 +24797,7 @@
        CheckWINDOWSGLES
        CheckVulkan
        CheckDIRECTX
        CheckHIDAPI
        # Set up the core platform files
        SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
@@ -24266,11 +24820,13 @@
$as_echo "#define SDL_VIDEO_RENDER_D3D 1" >>confdefs.h
                SUMMARY_video="${SUMMARY_video} d3d9"
            fi
            if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then
$as_echo "#define SDL_VIDEO_RENDER_D3D11 1" >>confdefs.h
                SUMMARY_video="${SUMMARY_video} d3d11"
            fi
        fi
        # Set up files for the audio library
@@ -24278,11 +24834,13 @@
$as_echo "#define SDL_AUDIO_DRIVER_WINMM 1" >>confdefs.h
            SUMMARY_audio="${SUMMARY_audio} winmm"
            SOURCES="$SOURCES $srcdir/src/audio/winmm/*.c"
            if test x$have_dsound = xyes; then
$as_echo "#define SDL_AUDIO_DRIVER_DSOUND 1" >>confdefs.h
                SUMMARY_audio="${SUMMARY_audio} directsound"
                SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
            fi
            if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then
@@ -24313,13 +24871,7 @@
$as_echo "#define SDL_JOYSTICK_WINMM 1" >>confdefs.h
            fi
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
            SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
            SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
            have_joystick=yes
        fi
        if test x$enable_haptic = xyes; then
@@ -24557,6 +25109,14 @@
        #    have_haptic=yes
        #    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
        #fi
        # Set up files for the sensor library
        if test x$enable_sensor = xyes; then
$as_echo "#define SDL_SENSOR_COREMOTION 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m"
            have_sensor=yes
        fi
        # Set up files for the power library
        if test x$enable_power = xyes; then
@@ -24616,7 +25176,7 @@
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
        if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
        if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
        fi
        ;;
@@ -24644,6 +25204,7 @@
        CheckOpenGLX11
        CheckVulkan
        CheckPTHREAD
        CheckHIDAPI
        # Set up files for the audio library
        if test x$enable_audio = xyes; then
@@ -24660,13 +25221,7 @@
$as_echo "#define SDL_JOYSTICK_IOKIT 1" >>confdefs.h
$as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
            SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
            SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
            have_joystick=yes
        fi
        # Set up files for the haptic library
@@ -24715,7 +25270,7 @@
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
        if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
        if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
        fi
        ;;
@@ -24807,12 +25362,57 @@
            have_timers=yes
        fi
        ;;
    *-*-riscos*)
        ARCH=riscos
        CheckVisibilityHidden
        CheckDeclarationAfterStatement
        CheckDummyVideo
        CheckDiskAudio
        CheckDummyAudio
        CheckDLOPEN
        CheckOSS
        CheckPTHREAD
        CheckClockGettime
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
$as_echo "#define SDL_TIMER_UNIX 1" >>confdefs.h
            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
            have_timers=yes
        fi
        ;;
    *)
        as_fn_error $? "
*** Unsupported host:  Please add to configure.in
*** Unsupported host:  Please add to configure.ac
        " "$LINENO" 5
        ;;
esac
# Check whether to install sdl2-config
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install sdl2-config" >&5
$as_echo_n "checking whether to install sdl2-config... " >&6; }
# Check whether --enable-sdl2-config was given.
if test "${enable_sdl2_config+set}" = set; then :
  enableval=$enable_sdl2_config; case "${enableval}" in
        yes) enable_sdl2_config="TRUE" ;;
        no) enable_sdl2_config="FALSE" ;;
        *) as_fn_error $? "bad value '${enableval}' for --enable-sdl2-config" "$LINENO" 5 ;;
    esac
else
  enable_sdl2_config="TRUE"
fi
if test "$enable_sdl2_config" = "TRUE"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }
fi
INSTALL_SDL2_CONFIG=$enable_sdl2_config
# Verify that we have all the platform specific files we need
@@ -24906,7 +25506,7 @@
for EXT in asm cc m c S; do
    OBJECTS=`echo "$OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.'$EXT',$(objects)/\1.lo,g'`
    DEPENDS=`echo "$DEPENDS" | sed "s,^\\([^ ]*\\)/\\([^ ]*\\)\\.$EXT\\$,\\\\
\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created\\\\
    \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
done
@@ -24916,21 +25516,21 @@
VERSION_DEPENDS=`echo $VERSION_SOURCES`
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.rc,$(objects)/\1.o,g'`
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.rc,\\\\
\\$(objects)/\\2.o: \\1/\\2.rc\\\\
\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
    \\$(WINDRES) \\$< \\$@,g"`
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\\\
\\$(objects)/\\2.lo: \\1/\\2.c\\\\
\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
    \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[^ ]*/\([^ ]*\)\.c,$(objects)/\1.lo,g'`
SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([^ ]*\\)/\\([^ ]*\\)\\.c,\\\\
\\$(objects)/\\2.lo: \\1/\\2.c\\\\
\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
    \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
# Set runtime shared library paths as needed
@@ -25030,7 +25630,7 @@
$WAYLAND_PROTOCOLS_DEPENDS
__EOF__
ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc"
ac_config_files="$ac_config_files Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc"
ac_config_commands="$ac_config_commands sdl2_config"
@@ -25080,6 +25680,23 @@
else
    SUMMARY="${SUMMARY}Using fcitx         : NO\n"
fi
if test x$WARN_ABOUT_ARM_SIMD_ASM_MIT = xyes; then
    SUMMARY="${SUMMARY}\nSDL is being built with ARM SIMD optimizations, which\n"
    SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
    SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
    SUMMARY="${SUMMARY}configure script with:\n"
    SUMMARY="${SUMMARY}\n    --disable-arm-simd\n"
fi
if test x$WARN_ABOUT_ARM_NEON_ASM_MIT = xyes; then
    SUMMARY="${SUMMARY}\nSDL is being built with ARM NEON optimizations, which\n"
    SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
    SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
    SUMMARY="${SUMMARY}configure script with:\n"
    SUMMARY="${SUMMARY}\n    --disable-arm-neon\n"
fi
ac_config_commands="$ac_config_commands summary"
@@ -26165,6 +26782,7 @@
    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile:Makefile.in:Makefile.rules" ;;
    "sdl2-config") CONFIG_FILES="$CONFIG_FILES sdl2-config" ;;
    "sdl2-config.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config.cmake" ;;
    "sdl2-config-version.cmake") CONFIG_FILES="$CONFIG_FILES sdl2-config-version.cmake" ;;
    "SDL2.spec") CONFIG_FILES="$CONFIG_FILES SDL2.spec" ;;
    "sdl2.pc") CONFIG_FILES="$CONFIG_FILES sdl2.pc" ;;
    "sdl2_config") CONFIG_COMMANDS="$CONFIG_COMMANDS sdl2_config" ;;
source/configure.ac
File was renamed from source/configure.in
@@ -20,9 +20,9 @@
#
SDL_MAJOR_VERSION=2
SDL_MINOR_VERSION=0
SDL_MICRO_VERSION=9
SDL_MICRO_VERSION=12
SDL_INTERFACE_AGE=0
SDL_BINARY_AGE=9
SDL_BINARY_AGE=12
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
AC_SUBST(SDL_MAJOR_VERSION)
@@ -56,6 +56,7 @@
AC_PROG_INSTALL
AC_PROG_MAKE_SET
AC_CHECK_TOOL(WINDRES, [windres], [:])
PKG_PROG_PKG_CONFIG
dnl Make sure that srcdir is a full pathname
case "$host" in
@@ -156,6 +157,14 @@
            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`]
        if test x$lib != x; then
            echo $lib
            return
        fi
    done
}
dnl Check for compiler characteristics
@@ -165,7 +174,7 @@
dnl See whether we want assertions for debugging/sanity checking SDL itself.
AC_ARG_ENABLE(assertions,
AC_HELP_STRING([--enable-assertions],
AS_HELP_STRING([--enable-assertions],
               [Enable internal sanity checks (auto/disabled/release/enabled/paranoid) [[default=auto]]]),
              , enable_assertions=auto)
case "$enable_assertions" in
@@ -190,7 +199,7 @@
dnl See whether we can use gcc style dependency tracking
AC_ARG_ENABLE(dependency-tracking,
AC_HELP_STRING([--enable-dependency-tracking],
AS_HELP_STRING([--enable-dependency-tracking],
               [Use gcc -MMD -MT dependency tracking [[default=yes]]]),
              , enable_dependency_tracking=yes)
if test x$enable_dependency_tracking = xyes; then
@@ -232,9 +241,60 @@
esac
AC_MSG_RESULT($have_no_undefined)
AC_MSG_CHECKING(for linker option --dynamicbase)
have_dynamicbase=no
case "$host" in
    *)
        save_LDFLAGS="$LDFLAGS"
        LDFLAGS="$LDFLAGS -Wl,--dynamicbase"
        AC_TRY_LINK([
        ],[
        ],[
        have_dynamicbase=yes
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--dynamicbase"
        ])
        LDFLAGS="$save_LDFLAGS"
        ;;
esac
AC_MSG_RESULT($have_dynamicbase)
AC_MSG_CHECKING(for linker option --nxcompat)
have_nxcompat=no
case "$host" in
    *)
        save_LDFLAGS="$LDFLAGS"
        LDFLAGS="$LDFLAGS -Wl,--nxcompat"
        AC_TRY_LINK([
        ],[
        ],[
        have_nxcompat=yes
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--nxcompat"
        ])
        LDFLAGS="$save_LDFLAGS"
        ;;
esac
AC_MSG_RESULT($have_nxcompat)
AC_MSG_CHECKING(for linker option --high-entropy-va)
have_high_entropy_va=no
case "$host" in
    *)
        save_LDFLAGS="$LDFLAGS"
        LDFLAGS="$LDFLAGS -Wl,--high-entropy-va"
        AC_TRY_LINK([
        ],[
        ],[
        have_high_entropy_va=yes
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,--high-entropy-va"
        ])
        LDFLAGS="$save_LDFLAGS"
        ;;
esac
AC_MSG_RESULT($have_high_entropy_va)
dnl See whether we are allowed to use the system C library
AC_ARG_ENABLE(libc,
AC_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)
if test x$enable_libc = xyes; then
    AC_DEFINE(HAVE_LIBC, 1, [ ])
@@ -275,7 +335,7 @@
        AC_DEFINE(HAVE_MPROTECT, 1, [ ])
        ]),
    )
    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcscmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll)
    AC_CHECK_FUNCS(malloc calloc realloc free getenv setenv putenv unsetenv qsort abs bcopy memset memcpy memmove wcslen wcslcpy wcslcat wcsdup wcsstr wcscmp wcsncmp strlen strlcpy strlcat _strrev _strupr _strlwr strchr strrchr strstr strtok_r itoa _ltoa _uitoa _ultoa strtol strtoul _i64toa _ui64toa strtoll strtoull atoi atof strcmp strncmp _stricmp strcasecmp _strnicmp strncasecmp vsscanf vsnprintf fopen64 fseeko fseeko64 sigaction setjmp nanosleep sysconf sysctlbyname getauxval poll _Exit)
    AC_CHECK_LIB(m, pow, [LIBS="$LIBS -lm"; EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lm"])
    AC_CHECK_FUNCS(acos acosf asin asinf atan atanf atan2 atan2f ceil ceilf copysign copysignf cos cosf exp expf fabs fabsf floor floorf fmod fmodf log logf log10 log10f pow powf scalbn scalbnf sin sinf sqrt sqrtf tan tanf)
@@ -293,7 +353,7 @@
dnl See whether we can use gcc atomic operations on this architecture
AC_ARG_ENABLE(gcc-atomics,
AC_HELP_STRING([--enable-gcc-atomics],
AS_HELP_STRING([--enable-gcc-atomics],
               [Use gcc builtin atomics [[default=yes]]]),
              , enable_gcc_atomics=yes)
if test x$enable_gcc_atomics = xyes; then
@@ -356,7 +416,7 @@
dnl Enable/disable various subsystems of the SDL library
AC_ARG_ENABLE(atomic,
AC_HELP_STRING([--enable-atomic], [Enable the atomic operations subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-atomic], [Enable the atomic operations subsystem [[default=yes]]]),
              , enable_atomic=yes)
if test x$enable_atomic != xyes; then
    AC_DEFINE(SDL_ATOMIC_DISABLED, 1, [ ])
@@ -364,7 +424,7 @@
    SUMMARY_modules="${SUMMARY_modules} atomic"
fi
AC_ARG_ENABLE(audio,
AC_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-audio], [Enable the audio subsystem [[default=yes]]]),
              , enable_audio=yes)
if test x$enable_audio != xyes; then
    AC_DEFINE(SDL_AUDIO_DISABLED, 1, [ ])
@@ -372,7 +432,7 @@
    SUMMARY_modules="${SUMMARY_modules} audio"
fi
AC_ARG_ENABLE(video,
AC_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-video], [Enable the video subsystem [[default=yes]]]),
              , enable_video=yes)
if test x$enable_video != xyes; then
    AC_DEFINE(SDL_VIDEO_DISABLED, 1, [ ])
@@ -380,7 +440,7 @@
    SUMMARY_modules="${SUMMARY_modules} video"
fi
AC_ARG_ENABLE(render,
AC_HELP_STRING([--enable-render], [Enable the render subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-render], [Enable the render subsystem [[default=yes]]]),
              , enable_render=yes)
if test x$enable_render != xyes; then
    AC_DEFINE(SDL_RENDER_DISABLED, 1, [ ])
@@ -388,7 +448,7 @@
    SUMMARY_modules="${SUMMARY_modules} render"
fi
AC_ARG_ENABLE(events,
AC_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-events], [Enable the events subsystem [[default=yes]]]),
              , enable_events=yes)
if test x$enable_events != xyes; then
    AC_DEFINE(SDL_EVENTS_DISABLED, 1, [ ])
@@ -396,7 +456,7 @@
    SUMMARY_modules="${SUMMARY_modules} events"
fi
AC_ARG_ENABLE(joystick,
AC_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-joystick], [Enable the joystick subsystem [[default=yes]]]),
              , enable_joystick=yes)
if test x$enable_joystick != xyes; then
    AC_DEFINE(SDL_JOYSTICK_DISABLED, 1, [ ])
@@ -404,7 +464,7 @@
    SUMMARY_modules="${SUMMARY_modules} joystick"
fi
AC_ARG_ENABLE(haptic,
AC_HELP_STRING([--enable-haptic], [Enable the haptic (force feedback) subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-haptic], [Enable the haptic (force feedback) subsystem [[default=yes]]]),
              , enable_haptic=yes)
if test x$enable_haptic != xyes; then
    AC_DEFINE(SDL_HAPTIC_DISABLED, 1, [ ])
@@ -412,7 +472,7 @@
    SUMMARY_modules="${SUMMARY_modules} haptic"
fi
AC_ARG_ENABLE(sensor,
AC_HELP_STRING([--enable-sensor], [Enable the sensor subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-sensor], [Enable the sensor subsystem [[default=yes]]]),
              , enable_sensor=yes)
if test x$enable_sensor != xyes; then
    AC_DEFINE(SDL_SENSOR_DISABLED, 1, [ ])
@@ -420,7 +480,7 @@
    SUMMARY_modules="${SUMMARY_modules} sensor"
fi
AC_ARG_ENABLE(power,
AC_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-power], [Enable the power subsystem [[default=yes]]]),
              , enable_power=yes)
if test x$enable_power != xyes; then
    AC_DEFINE(SDL_POWER_DISABLED, 1, [ ])
@@ -428,7 +488,7 @@
    SUMMARY_modules="${SUMMARY_modules} power"
fi
AC_ARG_ENABLE(filesystem,
AC_HELP_STRING([--enable-filesystem], [Enable the filesystem subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-filesystem], [Enable the filesystem subsystem [[default=yes]]]),
              , enable_filesystem=yes)
if test x$enable_filesystem != xyes; then
    AC_DEFINE(SDL_FILESYSTEM_DISABLED, 1, [ ])
@@ -436,7 +496,7 @@
    SUMMARY_modules="${SUMMARY_modules} filesystem"
fi
AC_ARG_ENABLE(threads,
AC_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-threads], [Enable the threading subsystem [[default=yes]]]),
              , enable_threads=yes)
if test x$enable_threads != xyes; then
    AC_DEFINE(SDL_THREADS_DISABLED, 1, [ ])
@@ -444,7 +504,7 @@
    SUMMARY_modules="${SUMMARY_modules} threads"
fi
AC_ARG_ENABLE(timers,
AC_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-timers], [Enable the timer subsystem [[default=yes]]]),
              , enable_timers=yes)
if test x$enable_timers != xyes; then
    AC_DEFINE(SDL_TIMERS_DISABLED, 1, [ ])
@@ -452,7 +512,7 @@
    SUMMARY_modules="${SUMMARY_modules} timers"
fi
AC_ARG_ENABLE(file,
AC_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-file], [Enable the file subsystem [[default=yes]]]),
              , enable_file=yes)
if test x$enable_file != xyes; then
    AC_DEFINE(SDL_FILE_DISABLED, 1, [ ])
@@ -460,7 +520,7 @@
    SUMMARY_modules="${SUMMARY_modules} file"
fi
AC_ARG_ENABLE(loadso,
AC_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-loadso], [Enable the shared object loading subsystem [[default=yes]]]),
              , enable_loadso=yes)
if test x$enable_loadso != xyes; then
    AC_DEFINE(SDL_LOADSO_DISABLED, 1, [ ])
@@ -468,7 +528,7 @@
    SUMMARY_modules="${SUMMARY_modules} loadso"
fi
AC_ARG_ENABLE(cpuinfo,
AC_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
AS_HELP_STRING([--enable-cpuinfo], [Enable the cpuinfo subsystem [[default=yes]]]),
              , enable_cpuinfo=yes)
if test x$enable_cpuinfo != xyes; then
    AC_DEFINE(SDL_CPUINFO_DISABLED, 1, [ ])
@@ -476,7 +536,7 @@
    SUMMARY_modules="${SUMMARY_modules} cpuinfo"
fi
AC_ARG_ENABLE(assembly,
AC_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
AS_HELP_STRING([--enable-assembly], [Enable assembly routines [[default=yes]]]),
              , enable_assembly=yes)
if test x$enable_assembly = xyes; then
    SUMMARY_modules="${SUMMARY_modules} assembly"
@@ -499,7 +559,7 @@
            ;;
    esac
    AC_ARG_ENABLE(ssemath,
AC_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=maybe]]]),
AS_HELP_STRING([--enable-ssemath], [Allow GCC to use SSE floating point math [[default=maybe]]]),
                  , enable_ssemath=$default_ssemath)
    if test x$enable_ssemath = xno; then
        if test x$have_gcc_sse = xyes -o x$have_gcc_sse2 = xyes -o x$have_gcc_sse3 = xyes; then
@@ -509,7 +569,7 @@
    dnl Check for various instruction support
    AC_ARG_ENABLE(mmx,
AC_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
AS_HELP_STRING([--enable-mmx], [use MMX assembly routines [[default=yes]]]),
                  , enable_mmx=yes)
    if test x$enable_mmx = xyes; then
        save_CFLAGS="$CFLAGS"
@@ -546,7 +606,7 @@
    fi
    AC_ARG_ENABLE(3dnow,
AC_HELP_STRING([--enable-3dnow], [use 3DNow! assembly routines [[default=yes]]]),
AS_HELP_STRING([--enable-3dnow], [use 3DNow! assembly routines [[default=yes]]]),
                  , enable_3dnow=yes)
    if test x$enable_3dnow = xyes; then
        save_CFLAGS="$CFLAGS"
@@ -576,7 +636,7 @@
    fi
    AC_ARG_ENABLE(sse,
AC_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
AS_HELP_STRING([--enable-sse], [use SSE assembly routines [[default=yes]]]),
                  , enable_sse=yes)
    if test x$enable_sse = xyes; then
        save_CFLAGS="$CFLAGS"
@@ -613,7 +673,7 @@
    fi
    AC_ARG_ENABLE(sse2,
AC_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=maybe]]]),
AS_HELP_STRING([--enable-sse2], [use SSE2 assembly routines [[default=maybe]]]),
                  , enable_sse2=$default_ssemath)
    if test x$enable_sse2 = xyes; then
        save_CFLAGS="$CFLAGS"
@@ -650,7 +710,7 @@
    fi
    AC_ARG_ENABLE(sse3,
AC_HELP_STRING([--enable-sse3], [use SSE3 assembly routines [[default=maybe]]]),
AS_HELP_STRING([--enable-sse3], [use SSE3 assembly routines [[default=maybe]]]),
                  , enable_sse3=$default_ssemath)
    if test x$enable_sse3 = xyes; then
        save_CFLAGS="$CFLAGS"
@@ -694,7 +754,7 @@
    fi
    AC_ARG_ENABLE(altivec,
AC_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
AS_HELP_STRING([--enable-altivec], [use Altivec assembly routines [[default=yes]]]),
                  , enable_altivec=yes)
    if test x$enable_altivec = xyes; then
        save_CFLAGS="$CFLAGS"
@@ -775,7 +835,7 @@
CheckOSS()
{
    AC_ARG_ENABLE(oss,
AC_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)
    # OpenBSD "has" OSS, but it's not really for app use. They want you to
@@ -831,7 +891,7 @@
CheckALSA()
{
    AC_ARG_ENABLE(alsa,
AC_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
AS_HELP_STRING([--enable-alsa], [support the ALSA audio API [[default=yes]]]),
                  , enable_alsa=yes)
    if test x$enable_audio = xyes -a x$enable_alsa = xyes; then
        AM_PATH_ALSA(1.0.11, have_alsa=yes, have_alsa=no)
@@ -841,7 +901,7 @@
        LIBS="$alsa_save_LIBS"
        if test x$have_alsa = xyes; then
            AC_ARG_ENABLE(alsa-shared,
AC_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
AS_HELP_STRING([--enable-alsa-shared], [dynamically load ALSA audio support [[default=yes]]]),
                          , enable_alsa_shared=yes)
            alsa_lib=[`find_lib "libasound.so.*" "$ALSA_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -870,27 +930,14 @@
CheckJACK()
{
    AC_ARG_ENABLE(jack,
AC_HELP_STRING([--enable-jack], [use JACK audio [[default=yes]]]),
AS_HELP_STRING([--enable-jack], [use JACK audio [[default=yes]]]),
                  , enable_jack=yes)
    if test x$enable_audio = xyes -a x$enable_jack = xyes; then
        audio_jack=no
        JACK_REQUIRED_VERSION=0.125
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        AC_MSG_CHECKING(for JACK $JACK_REQUIRED_VERSION support)
        if test x$PKG_CONFIG != xno; then
        if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $JACK_REQUIRED_VERSION jack; then
                JACK_CFLAGS=`$PKG_CONFIG --cflags jack`
                JACK_LIBS=`$PKG_CONFIG --libs jack`
                audio_jack=yes
            fi
        fi
        AC_MSG_RESULT($audio_jack)
        PKG_CHECK_MODULES([JACK], [jack >= 0.125], audio_jack=yes, audio_jack=no)
        if test x$audio_jack = xyes; then
            AC_ARG_ENABLE(jack-shared,
AC_HELP_STRING([--enable-jack-shared], [dynamically load JACK audio support [[default=yes]]]),
AS_HELP_STRING([--enable-jack-shared], [dynamically load JACK audio support [[default=yes]]]),
                          , enable_jack_shared=yes)
            jack_lib=[`find_lib "libjack.so.*" "$JACK_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -927,13 +974,13 @@
CheckESD()
{
    AC_ARG_ENABLE(esd,
AC_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)
    if test x$enable_audio = xyes -a x$enable_esd = xyes; then
        AM_PATH_ESD(0.2.8, have_esd=yes, have_esd=no)
        if test x$have_esd = xyes; then
            AC_ARG_ENABLE(esd-shared,
AC_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]]]),
                          , enable_esd_shared=yes)
            esd_lib=[`find_lib "libesd.so.*" "$ESD_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -962,27 +1009,14 @@
CheckPulseAudio()
{
    AC_ARG_ENABLE(pulseaudio,
AC_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
AS_HELP_STRING([--enable-pulseaudio], [use PulseAudio [[default=yes]]]),
                  , enable_pulseaudio=yes)
    if test x$enable_audio = xyes -a x$enable_pulseaudio = xyes; then
        audio_pulseaudio=no
        PULSEAUDIO_REQUIRED_VERSION=0.9
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        AC_MSG_CHECKING(for PulseAudio $PULSEAUDIO_REQUIRED_VERSION support)
        if test x$PKG_CONFIG != xno; then
            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $PULSEAUDIO_REQUIRED_VERSION libpulse-simple; then
                PULSEAUDIO_CFLAGS=`$PKG_CONFIG --cflags libpulse-simple`
                PULSEAUDIO_LIBS=`$PKG_CONFIG --libs libpulse-simple`
                audio_pulseaudio=yes
            fi
        fi
        AC_MSG_RESULT($audio_pulseaudio)
        PKG_CHECK_MODULES([PULSEAUDIO], [libpulse-simple >= 0.9], audio_pulseaudio=yes, audio_pulseaudio=no)
        if test x$audio_pulseaudio = xyes; then
            AC_ARG_ENABLE(pulseaudio-shared,
AC_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
AS_HELP_STRING([--enable-pulseaudio-shared], [dynamically load PulseAudio support [[default=yes]]]),
                          , enable_pulseaudio_shared=yes)
            pulseaudio_lib=[`find_lib "libpulse-simple.so.*" "$PULSEAUDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -1018,7 +1052,7 @@
CheckARTSC()
{
    AC_ARG_ENABLE(arts,
AC_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]),
AS_HELP_STRING([--enable-arts], [support the Analog Real Time Synthesizer [[default=yes]]]),
                  , enable_arts=yes)
    if test x$enable_audio = xyes -a x$enable_arts = xyes; then
        AC_PATH_PROG(ARTSCONFIG, artsc-config)
@@ -1042,7 +1076,7 @@
            AC_MSG_RESULT($audio_arts)
            if test x$audio_arts = xyes; then
                AC_ARG_ENABLE(arts-shared,
AC_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
AS_HELP_STRING([--enable-arts-shared], [dynamically load aRts audio support [[default=yes]]]),
                              , enable_arts_shared=yes)
                arts_lib=[`find_lib "libartsc.so.*" "$ARTS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -1072,7 +1106,7 @@
CheckNAS()
{
    AC_ARG_ENABLE(nas,
AC_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
AS_HELP_STRING([--enable-nas], [support the NAS audio API [[default=yes]]]),
                  , enable_nas=yes)
    if test x$enable_audio = xyes -a x$enable_nas = xyes; then
        AC_CHECK_HEADER(audio/audiolib.h, have_nas_hdr=yes)
@@ -1096,7 +1130,7 @@
        if test x$have_nas = xyes; then
            AC_ARG_ENABLE(nas-shared,
AC_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[default=yes]]]),
AS_HELP_STRING([--enable-nas-shared], [dynamically load NAS audio support [[default=yes]]]),
                          , enable_nas_shared=yes)
            nas_lib=[`find_lib "libaudio.so.*" "$NAS_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -1126,7 +1160,7 @@
CheckSNDIO()
{
    AC_ARG_ENABLE(sndio,
AC_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)
    if test x$enable_audio = xyes -a x$enable_sndio = xyes; then
        AC_CHECK_HEADER(sndio.h, have_sndio_hdr=yes)
@@ -1144,7 +1178,7 @@
        if test x$have_sndio = xyes; then
            AC_ARG_ENABLE(sndio-shared,
AC_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)
            sndio_lib=[`find_lib "libsndio.so.*" "$SNDIO_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -1174,23 +1208,10 @@
CheckFusionSound()
{
    AC_ARG_ENABLE(fusionsound,
AC_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
AS_HELP_STRING([--enable-fusionsound], [use FusionSound audio driver [[default=no]]]),
                  , enable_fusionsound=no)
    if test x$enable_audio = xyes -a x$enable_fusionsound = xyes; then
        fusionsound=no
        FUSIONSOUND_REQUIRED_VERSION=1.1.1
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        AC_MSG_CHECKING(for FusionSound $FUSIONSOUND_REQUIRED_VERSION support)
        if test x$PKG_CONFIG != xno; then
            if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $FUSIONSOUND_REQUIRED_VERSION fusionsound; then
                FUSIONSOUND_CFLAGS=`$PKG_CONFIG --cflags fusionsound`
                FUSIONSOUND_LIBS=`$PKG_CONFIG --libs fusionsound`
                fusionsound=yes
            fi
        fi
        AC_MSG_RESULT($fusionsound)
        PKG_CHECK_MODULES([FUSIONSOUND], [fusionsound >= 1.1.1], fusionsound=yes, fusionsound=no)
        if test x$fusionsound = xyes; then
            AC_DEFINE(SDL_AUDIO_DRIVER_FUSIONSOUND, 1, [ ])
@@ -1198,7 +1219,7 @@
            EXTRA_CFLAGS="$EXTRA_CFLAGS $FUSIONSOUND_CFLAGS"
            
            AC_ARG_ENABLE(fusionsound-shared,
AC_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
AS_HELP_STRING([--enable-fusionsound-shared], [dynamically load fusionsound audio support [[default=yes]]]),
                          , enable_fusionsound_shared=yes)
            fusionsound_shared=no
            AC_MSG_CHECKING(for FusionSound dynamic loading support)
@@ -1226,7 +1247,7 @@
CheckDiskAudio()
{
    AC_ARG_ENABLE(diskaudio,
AC_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
AS_HELP_STRING([--enable-diskaudio], [support the disk writer audio driver [[default=yes]]]),
                  , enable_diskaudio=yes)
    if test x$enable_audio = xyes -a x$enable_diskaudio = xyes; then
        AC_DEFINE(SDL_AUDIO_DRIVER_DISK, 1, [ ])
@@ -1239,7 +1260,7 @@
CheckDummyAudio()
{
    AC_ARG_ENABLE(dummyaudio,
AC_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
AS_HELP_STRING([--enable-dummyaudio], [support the dummy audio driver [[default=yes]]]),
                  , enable_dummyaudio=yes)
    if test x$enable_audio = xyes -a x$enable_dummyaudio = xyes; then
        AC_DEFINE(SDL_AUDIO_DRIVER_DUMMY, 1, [ ])
@@ -1252,7 +1273,7 @@
CheckLibSampleRate()
{
    AC_ARG_ENABLE(libsamplerate,
AC_HELP_STRING([--enable-libsamplerate], [use libsamplerate for audio rate conversion [[default=yes]]]),
AS_HELP_STRING([--enable-libsamplerate], [use libsamplerate for audio rate conversion [[default=yes]]]),
                  , enable_libsamplerate=yes)
    if test x$enable_libsamplerate = xyes; then
        AC_CHECK_HEADER(samplerate.h,
@@ -1262,7 +1283,7 @@
            AC_DEFINE(HAVE_LIBSAMPLERATE_H, 1, [ ])
            AC_ARG_ENABLE(libsamplerate-shared,
AC_HELP_STRING([--enable-libsamplerate-shared], [dynamically load libsamplerate [[default=yes]]]),
AS_HELP_STRING([--enable-libsamplerate-shared], [dynamically load libsamplerate [[default=yes]]]),
                          , enable_libsamplerate_shared=yes)
            samplerate_lib=[`find_lib "libsamplerate.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
@@ -1278,6 +1299,82 @@
            else
                EXTRA_LDFLAGS="$EXTRA_LDFLAGS -lsamplerate"
            fi
        fi
    fi
}
dnl Check for ARM instruction support using gas syntax
CheckARM()
{
    AC_ARG_ENABLE(arm-simd,
AC_HELP_STRING([--enable-arm-simd], [use SIMD assembly blitters on ARM [[default=yes]]]),
                  enable_arm_simd=$enableval, enable_arm_simd=yes)
    if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_simd = xyes; then
        save_CFLAGS="$CFLAGS"
        have_arm_simd=no
        CFLAGS="-x assembler-with-cpp $CFLAGS"
        AC_MSG_CHECKING(for ARM SIMD)
        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
        .text
        .arch armv6
        .object_arch armv4
        .arm
        .altmacro
        #ifndef __ARM_EABI__
        #error EABI is required (to be sure that calling conventions are compatible)
        #endif
        pld [r0]
        uqadd8 r0, r0, r0
        ]])], have_arm_simd=yes)
        AC_MSG_RESULT($have_arm_simd)
        CFLAGS="$save_CFLAGS"
        if test x$have_arm_simd = xyes; then
            AC_DEFINE(SDL_ARM_SIMD_BLITTERS)
dnl            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.c"
            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-simd*.S"
            WARN_ABOUT_ARM_SIMD_ASM_MIT="yes"
        fi
    fi
}
dnl Check for ARM NEON instruction support using gas syntax
CheckNEON()
{
    AC_ARG_ENABLE(arm-neon,
AC_HELP_STRING([--enable-arm-neon], [use NEON assembly blitters on ARM [[default=no]]]),
                  enable_arm_neon=$enableval, enable_arm_neon=no)
    if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_neon = xyes; then
        save_CFLAGS="$CFLAGS"
        have_arm_neon=no
        CFLAGS="-x assembler-with-cpp $CFLAGS"
        AC_MSG_CHECKING(for ARM NEON)
        AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
        .text
        .fpu neon
        .arch armv7a
        .object_arch armv4
        .eabi_attribute 10, 0
        .arm
        .altmacro
        #ifndef __ARM_EABI__
        #error EABI is required (to be sure that calling conventions are compatible)
        #endif
        pld [r0]
        vmovn.u16 d0, q0
        ]])], have_arm_neon=yes)
        AC_MSG_RESULT($have_arm_neon)
        CFLAGS="$save_CFLAGS"
        if test x$have_arm_neon = xyes; then
            AC_DEFINE(SDL_ARM_NEON_BLITTERS)
dnl            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.c"
            SOURCES="$SOURCES $srcdir/src/video/arm/pixman-arm-neon*.S"
            WARN_ABOUT_ARM_NEON_ASM_MIT="yes"
        fi
    fi
}
@@ -1305,6 +1402,29 @@
    if test x$have_gcc_fvisibility = xyes; then
        EXTRA_CFLAGS="$EXTRA_CFLAGS $visibility_CFLAGS"
    fi
}
dnl See if GCC's -fno-strict-aliasingis supported.
dnl  Reference: https://bugzilla.libsdl.org/show_bug.cgi?id=4254
CheckNoStrictAliasing()
{
    AC_MSG_CHECKING(for GCC -fno-strict-aliasing option)
    have_gcc_no_strict_aliasing=no
    save_CFLAGS="$CFLAGS"
    CFLAGS="$save_CFLAGS -fno-strict-aliasing"
    AC_TRY_COMPILE([
    int x = 0;
    ],[
    ],[
    have_gcc_no_strict_aliasing=yes
    ])
    AC_MSG_RESULT($have_gcc_no_strict_aliasing)
    CFLAGS="$save_CFLAGS"
    if test x$have_gcc_no_strict_aliasing = xyes; then
        EXTRA_CFLAGS="$EXTRA_CFLAGS -fno-strict-aliasing"
    fi
}
@@ -1394,19 +1514,17 @@
CheckWayland()
{
    AC_ARG_ENABLE(video-wayland,
AC_HELP_STRING([--enable-video-wayland], [use Wayland video driver [[default=yes]]]),
AS_HELP_STRING([--enable-video-wayland], [use Wayland video driver [[default=yes]]]),
                  ,enable_video_wayland=yes)
    AC_ARG_ENABLE(video-wayland-qt-touch,
AC_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for Wayland video driver [[default=yes]]]),
AS_HELP_STRING([--enable-video-wayland-qt-touch], [QtWayland server support for Wayland video driver [[default=yes]]]),
                  ,enable_video_wayland_qt_touch=yes)
    if test x$enable_video = xyes -a x$enable_video_wayland = xyes; then
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        AC_MSG_CHECKING(for Wayland support)
        video_wayland=no
        if  test x$PKG_CONFIG != xno && \
            test x$video_opengl_egl = xyes && \
        if  test x$video_opengl_egl = xyes && \
            test x$video_opengles_v2 = xyes; then
            if $PKG_CONFIG --exists wayland-client wayland-scanner wayland-protocols wayland-egl wayland-cursor egl xkbcommon ; then
                WAYLAND_CFLAGS=`$PKG_CONFIG --cflags wayland-client wayland-egl wayland-cursor xkbcommon`
@@ -1427,7 +1545,7 @@
            SOURCES="$SOURCES $WAYLAND_SOURCES"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $WAYLAND_CFLAGS -I\$(gen)"
            AC_ARG_ENABLE(wayland-shared,
AC_HELP_STRING([--enable-wayland-shared], [dynamically load Wayland support [[default=maybe]]]),
AS_HELP_STRING([--enable-wayland-shared], [dynamically load Wayland support [[default=maybe]]]),
                          , enable_wayland_shared=maybe)
            dnl FIXME: Do BSD and OS X need special cases?
@@ -1477,79 +1595,6 @@
    fi
}
dnl Check for Mir
CheckMir()
{
    AC_ARG_ENABLE(video-mir,
AC_HELP_STRING([--enable-video-mir], [use Mir video driver [[default=no]]]),
                  ,enable_video_mir=no)
    if test x$enable_video = xyes -a x$enable_video_mir = xyes; then
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        AC_MSG_CHECKING(for Mir support)
        video_mir=no
        if test x$PKG_CONFIG != xno; then
            if $PKG_CONFIG --exists mirclient egl xkbcommon ; then
                MIR_CFLAGS=`$PKG_CONFIG --cflags mirclient egl xkbcommon`
                MIR_LIBS=`$PKG_CONFIG --libs mirclient egl xkbcommon`
                save_CFLAGS="$CFLAGS"
                CFLAGS="$save_CFLAGS $MIR_CFLAGS"
                dnl This will disable Mir if >= v0.26 is not available
                AC_TRY_COMPILE([
                #include <mir_toolkit/mir_client_library.h>
                ],[
                    MirWindowAttrib attrib = mir_window_attrib_state
                ],[
                video_mir=yes
                ])
                CFLAGS="$save_CFLAGS"
            fi
        fi
        AC_MSG_RESULT($video_mir)
        if test x$video_mir = xyes; then
            AC_DEFINE(SDL_VIDEO_DRIVER_MIR, 1, [ ])
            SOURCES="$SOURCES $srcdir/src/video/mir/*.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $MIR_CFLAGS"
            AC_ARG_ENABLE(mir-shared,
AC_HELP_STRING([--enable-mir-shared], [dynamically load Mir support [[default=maybe]]]),
                          , enable_mir_shared=maybe)
            dnl FIXME: Do BSD and OS X need special cases?
            case "$host" in
                *)
                    mirclient_lib=[`find_lib "libmirclient.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
                    xkbcommon_lib=[`find_lib "libxkbcommon.so.*" "$MIR_LIBS" | sed 's/.*\/\(.*\)/\1/; q'`]
                    ;;
            esac
            if test x$enable_mir_shared = xmaybe; then
                enable_mir_shared=yes
            fi
            if test x$have_loadso != xyes && \
               test x$enable_mir_shared = xyes; then
                AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic Mir loading])
                enable_mir_shared=no
            fi
            if test x$have_loadso = xyes && \
               test x$enable_mir_shared = xyes && \
               test x$mirclient_lib != x && \
               test x$xkbcommon_lib != x; then
                echo "-- dynamic libmirclient -> $mirclient_lib"
                echo "-- dynamic libxkbcommon -> $xkbcommon_lib"
                AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_MIR_DYNAMIC, "$mirclient_lib", [ ])
                AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON, "$xkbcommon_lib", [ ])
                SUMMARY_video="${SUMMARY_video} mir(dynamic)"
            else
                enable_mir_shared=no
                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $MIR_LIBS"
                SUMMARY_video="${SUMMARY_video} mir"
            fi
            have_video=yes
        fi
    fi
}
dnl Check for Native Client stuff
CheckNativeClient()
@@ -1581,26 +1626,26 @@
CheckRPI()
{
    AC_ARG_ENABLE(video-rpi,
AC_HELP_STRING([--enable-video-rpi], [use Raspberry Pi video driver [[default=yes]]]),
AS_HELP_STRING([--enable-video-rpi], [use Raspberry Pi video driver [[default=yes]]]),
                  , enable_video_rpi=yes)
    if test x$enable_video = xyes -a x$enable_video_rpi = xyes; then
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        if test x$PKG_CONFIG != xno && $PKG_CONFIG --exists bcm_host; then
            RPI_CFLAGS=`$PKG_CONFIG --cflags bcm_host brcmegl`
            RPI_LDFLAGS=`$PKG_CONFIG --libs bcm_host brcmegl`
        elif test x$ARCH = xnetbsd; then
            RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
            RPI_LDFLAGS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
        else
            RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
            RPI_LDFLAGS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
        PKG_CHECK_MODULES([RPI], [bcm_host brcmegl], video_rpi=yes, video_rpi=no)
        if test x$video_rpi = xno; then
            if test x$ARCH = xnetbsd; then
                RPI_CFLAGS="-I/usr/pkg/include -I/usr/pkg/include/interface/vcos/pthreads -I/usr/pkg/include/interface/vmcs_host/linux"
                RPI_LIBS="-Wl,-R/usr/pkg/lib -L/usr/pkg/lib -lbcm_host"
            else
                RPI_CFLAGS="-I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/interface/vmcs_host/linux"
                RPI_LIBS="-Wl,-rpath,/opt/vc/lib -L/opt/vc/lib -lbcm_host"
            fi
        fi
        # Save the original compiler flags and libraries
        ac_save_cflags="$CFLAGS"; ac_save_libs="$LIBS"
        # Add the Raspberry Pi compiler flags and libraries
        CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LDFLAGS"
        CFLAGS="$CFLAGS $RPI_CFLAGS"; LIBS="$LIBS $RPI_LIBS"
        AC_MSG_CHECKING(for Raspberry Pi)
        have_video_rpi=no
@@ -1621,7 +1666,7 @@
            CFLAGS="$CFLAGS $RPI_CFLAGS"
            SDL_CFLAGS="$SDL_CFLAGS $RPI_CFLAGS"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $RPI_CFLAGS"
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LDFLAGS"
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $RPI_LIBS"
            SOURCES="$SOURCES $srcdir/src/video/raspberry/*.c"
            AC_DEFINE(SDL_VIDEO_DRIVER_RPI, 1, [ ])
            SUMMARY_video="${SUMMARY_video} rpi"
@@ -1633,7 +1678,7 @@
CheckX11()
{
    AC_ARG_ENABLE(video-x11,
AC_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11], [use X11 video driver [[default=yes]]]),
                  , enable_video_x11=yes)
    if test x$enable_video = xyes -a x$enable_video_x11 = xyes; then
        case "$host" in
@@ -1641,10 +1686,10 @@
                # This isn't necessary for X11, but fixes GLX detection
                if test "x$x_includes" = xNONE && \
                   test "x$x_libraries" = xNONE && \
                   test -d /usr/X11R6/include && \
                   test -d /usr/X11R6/lib; then
                    x_includes="/usr/X11R6/include"
                    x_libraries="/usr/X11R6/lib"
                   test -d /opt/X11/include && \
                   test -d /opt/X11/lib; then
                    x_includes="/opt/X11/include"
                    x_libraries="/opt/X11/lib"
                fi
                ;;
        esac
@@ -1652,20 +1697,21 @@
        AC_PATH_XTRA
        if test x$have_x = xyes; then
            AC_ARG_ENABLE(x11-shared,
AC_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
AS_HELP_STRING([--enable-x11-shared], [dynamically load X11 support [[default=maybe]]]),
                          , enable_x11_shared=maybe)
            case "$host" in
                *-*-darwin*)
                    x11_lib='/usr/X11R6/lib/libX11.6.dylib'
                    x11ext_lib='/usr/X11R6/lib/libXext.6.dylib'
                    xcursor_lib='/usr/X11R6/lib/libXcursor.1.dylib'
                    xinerama_lib='/usr/X11R6/lib/libXinerama.1.dylib'
                    xinput_lib='/usr/X11R6/lib/libXi.6.dylib'
                    xrandr_lib='/usr/X11R6/lib/libXrandr.2.dylib'
                    xrender_lib='/usr/X11R6/lib/libXrender.1.dylib'
                    xss_lib='/usr/X11R6/lib/libXss.1.dylib'
                    xvidmode_lib='/usr/X11R6/lib/libXxf86vm.1.dylib'
                    # Apple now puts this in /opt/X11
                    x11_lib='/opt/X11/lib/libX11.6.dylib'
                    x11ext_lib='/opt/X11/lib/libXext.6.dylib'
                    xcursor_lib='/opt/X11/lib/libXcursor.1.dylib'
                    xinerama_lib='/opt/X11/lib/libXinerama.1.dylib'
                    xinput_lib='/opt/X11/lib/libXi.6.dylib'
                    xrandr_lib='/opt/X11/lib/libXrandr.2.dylib'
                    xrender_lib='/opt/X11/lib/libXrender.1.dylib'
                    xss_lib='/opt/X11/lib/libXss.1.dylib'
                    xvidmode_lib='/opt/X11/lib/libXxf86vm.1.dylib'
                    ;;
                *-*-openbsd*)
                    x11_lib='libX11.so'
@@ -1774,7 +1820,7 @@
            AC_CHECK_LIB(X11, XkbKeycodeToKeysym, AC_DEFINE(SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM, 1, [Have XkbKeycodeToKeysym]))
            AC_ARG_ENABLE(video-x11-xcursor,
AC_HELP_STRING([--enable-video-x11-xcursor], [enable X11 Xcursor support [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11-xcursor], [enable X11 Xcursor support [[default=yes]]]),
                            , enable_video_x11_xcursor=yes)
            if test x$enable_video_x11_xcursor = xyes; then
                definitely_enable_video_x11_xcursor=no
@@ -1802,7 +1848,7 @@
                SUMMARY_video_x11="${SUMMARY_video_x11} xcursor"
            fi
            AC_ARG_ENABLE(video-x11-xdbe,
AC_HELP_STRING([--enable-video-x11-xdbe], [enable X11 Xdbe support [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11-xdbe], [enable X11 Xdbe support [[default=yes]]]),
                            , enable_video_x11_xdbe=yes)
            if test x$enable_video_x11_xdbe = xyes; then
                AC_CHECK_HEADER(X11/extensions/Xdbe.h,
@@ -1816,7 +1862,7 @@
                fi
            fi
            AC_ARG_ENABLE(video-x11-xinerama,
AC_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11-xinerama], [enable X11 Xinerama support [[default=yes]]]),
                            , enable_video_x11_xinerama=yes)
            if test x$enable_video_x11_xinerama = xyes; then
                definitely_enable_video_x11_xinerama=no
@@ -1844,7 +1890,7 @@
                SUMMARY_video_x11="${SUMMARY_video_x11} xinerama"
            fi
            AC_ARG_ENABLE(video-x11-xinput,
AC_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11-xinput], [enable X11 XInput extension for manymouse, tablets, etc [[default=yes]]]),
                            , enable_video_x11_xinput=yes)
            if test x$enable_video_x11_xinput = xyes; then
                definitely_enable_video_x11_xinput=no
@@ -1887,7 +1933,7 @@
                AC_MSG_RESULT($have_xinput2_multitouch)
            fi
            AC_ARG_ENABLE(video-x11-xrandr,
AC_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11-xrandr], [enable X11 Xrandr extension for fullscreen [[default=yes]]]),
                            , enable_video_x11_xrandr=yes)
            if test x$enable_video_x11_xrandr = xyes; then
                dnl XRRScreenResources is only present in Xrandr >= 1.2, we use that as a test.
@@ -1920,7 +1966,7 @@
                SUMMARY_video_x11="${SUMMARY_video_x11} xrandr"
            fi
            AC_ARG_ENABLE(video-x11-scrnsaver,
AC_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11-scrnsaver], [enable X11 screensaver extension [[default=yes]]]),
                            , enable_video_x11_scrnsaver=yes)
            if test x$enable_video_x11_scrnsaver = xyes; then
                AC_CHECK_HEADER(X11/extensions/scrnsaver.h,
@@ -1947,7 +1993,7 @@
                SUMMARY_video_x11="${SUMMARY_video_x11} xscrnsaver"
            fi
            AC_ARG_ENABLE(video-x11-xshape,
AC_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11-xshape], [enable X11 XShape support [[default=yes]]]),
                            , enable_video_x11_xshape=yes)
            if test x$enable_video_x11_xshape = xyes; then
                AC_CHECK_HEADER(X11/extensions/shape.h,
@@ -1961,7 +2007,7 @@
                fi
            fi
            AC_ARG_ENABLE(video-x11-vm,
AC_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
AS_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[default=yes]]]),
                            , enable_video_x11_vm=yes)
            if test x$enable_video_x11_vm = xyes; then
                definitely_enable_video_x11_vm=no
@@ -1989,6 +2035,9 @@
                SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
            fi
        fi
    else
        # Prevent Mesa from including X11 headers
        EXTRA_CFLAGS="$EXTRA_CFLAGS -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11"
    fi
}
@@ -1996,7 +2045,7 @@
CheckVivanteVideo()
{
    AC_ARG_ENABLE(video-vivante,
AC_HELP_STRING([--enable-video-vivante], [use Vivante EGL video driver [[default=yes]]]),
AS_HELP_STRING([--enable-video-vivante], [use Vivante EGL video driver [[default=yes]]]),
                  , enable_video_vivante=yes)
    if test x$enable_video = xyes -a x$enable_video_vivante = xyes; then
        AC_MSG_CHECKING(for Vivante VDK API)
@@ -2052,7 +2101,7 @@
CheckCOCOA()
{
    AC_ARG_ENABLE(video-cocoa,
AC_HELP_STRING([--enable-video-cocoa], [use Cocoa video driver [[default=yes]]]),
AS_HELP_STRING([--enable-video-cocoa], [use Cocoa video driver [[default=yes]]]),
                  , enable_video_cocoa=yes)
    if test x$enable_video = xyes -a x$enable_video_cocoa = xyes; then
        save_CFLAGS="$CFLAGS"
@@ -2079,10 +2128,13 @@
CheckMETAL()
{
    AC_ARG_ENABLE(video-metal,
AC_HELP_STRING([--enable-video-metal], [include Metal support [[default=yes]]]),
              , enable_video_metal=yes)
    AC_ARG_ENABLE(render-metal,
AC_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[default=yes]]]),
AS_HELP_STRING([--enable-render-metal], [enable the Metal render driver [[default=yes]]]),
                                , enable_render_metal=yes)
    if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
    if test x$enable_video = xyes -a x$enable_video_metal = xyes; then
        save_CFLAGS="$CFLAGS"
        dnl Work around that we don't have Objective-C support in autoconf
        CFLAGS="$CFLAGS -x objective-c"
@@ -2103,10 +2155,14 @@
        CFLAGS="$save_CFLAGS"
        AC_MSG_RESULT($have_metal)
        if test x$have_metal = xyes; then
            AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
            SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
            AC_DEFINE(SDL_VIDEO_METAL, 1, [ ])
            if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
                AC_DEFINE(SDL_VIDEO_RENDER_METAL, 1, [ ])
                SOURCES="$SOURCES $srcdir/src/render/metal/*.m"
            fi
            SUMMARY_video="${SUMMARY_video} metal"
        else
            enable_video_metal=no
            enable_render_metal=no
        fi
    fi
@@ -2117,35 +2173,11 @@
CheckDirectFB()
{
    AC_ARG_ENABLE(video-directfb,
AC_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [[default=no]]]),
AS_HELP_STRING([--enable-video-directfb], [use DirectFB video driver [[default=no]]]),
                  , enable_video_directfb=no)
    if test x$enable_video = xyes -a x$enable_video_directfb = xyes; then
        video_directfb=no
        PKG_CHECK_MODULES([DIRECTFB], [directfb >= 1.0.0], video_directfb=yes, video_directfb=no)
        DIRECTFB_REQUIRED_VERSION=1.0.0
        AC_PATH_PROGS(DIRECTFBCONFIG, directfb-config, no, [$prefix/bin:$PATH])
        if test x$DIRECTFBCONFIG = xno; then
            AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
            if test x$PKG_CONFIG != xno; then
                if $PKG_CONFIG --atleast-pkgconfig-version 0.7 && $PKG_CONFIG --atleast-version $DIRECTFB_REQUIRED_VERSION directfb; then
                    DIRECTFB_CFLAGS=`$PKG_CONFIG --cflags directfb`
                    DIRECTFB_LIBS=`$PKG_CONFIG --libs directfb`
                    DIRECTFB_PREFIX=`$PKG_CONFIG --variable=prefix directfb`
                    video_directfb=yes
                fi
            fi
        else
            set -- `echo $DIRECTFB_REQUIRED_VERSION | sed 's/\./ /g'`
            NEED_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
            set -- `$DIRECTFBCONFIG --version | sed 's/\./ /g'`
            HAVE_VERSION=`expr $1 \* 10000 + $2 \* 100 + $3`
            if test $HAVE_VERSION -ge $NEED_VERSION; then
                DIRECTFB_CFLAGS=`$DIRECTFBCONFIG --cflags`
                DIRECTFB_LIBS=`$DIRECTFBCONFIG --libs`
                DIRECTFB_PREFIX=`$DIRECTFBCONFIG --prefix`
                video_directfb=yes
            fi
        fi
        if test x$video_directfb = xyes; then
            # SuSE 11.1 installs directfb-config without directfb-devel
            save_CPPFLAGS="$CPPFLAGS"
@@ -2154,12 +2186,10 @@
            CPPFLAGS="$save_CPPFLAGS"
            video_directfb=$have_directfb_hdr
        fi
        AC_MSG_CHECKING(for DirectFB $DIRECTFB_REQUIRED_VERSION support)
        AC_MSG_RESULT($video_directfb)
        if test x$video_directfb = xyes; then
            AC_ARG_ENABLE(directfb-shared,
AC_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[default=yes]]]),
AS_HELP_STRING([--enable-directfb-shared], [dynamically load directfb support [[default=yes]]]),
                              , enable_directfb_shared=yes)
            AC_DEFINE(SDL_VIDEO_DRIVER_DIRECTFB, 1, [ ])
@@ -2197,73 +2227,49 @@
CheckKMSDRM()
{
    AC_ARG_ENABLE(video-kmsdrm,
AC_HELP_STRING([--enable-video-kmsdrm], [use KMSDRM video driver [[default=no]]]),
AS_HELP_STRING([--enable-video-kmsdrm], [use KMSDRM video driver [[default=no]]]),
                  , enable_video_kmsdrm=no)
    if test x$enable_video = xyes -a x$enable_video_kmsdrm = xyes; then
        video_kmsdrm=no
        libdrm_avail=no
        libgbm_avail=no
        LIBDRM_REQUIRED_VERSION=2.4.46
        LIBGBM_REQUIRED_VERSION=9.0.0
        PKG_CHECK_MODULES([LIBDRM], [libdrm >= 2.4.46], libdrm_avail=yes, libdrm_avail=no)
        PKG_CHECK_MODULES([LIBGBM], [gbm >= 9.0.0], libgbm_avail=yes, libgbm_avail=no)
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        if test x$PKG_CONFIG != xno; then
            if $PKG_CONFIG --atleast-pkgconfig-version 0.7; then
                if $PKG_CONFIG --atleast-version $LIBDRM_REQUIRED_VERSION libdrm; then
                    LIBDRM_CFLAGS=`$PKG_CONFIG --cflags libdrm`
                    LIBDRM_LIBS=`$PKG_CONFIG --libs libdrm`
                    LIBDRM_PREFIX=`$PKG_CONFIG --variable=prefix libdrm`
                    libdrm_avail=yes
                fi
                if $PKG_CONFIG --atleast-version $LIBGBM_REQUIRED_VERSION gbm; then
                    LIBGBM_CFLAGS=`$PKG_CONFIG --cflags gbm`
                    LIBGBM_LIBS=`$PKG_CONFIG --libs gbm`
                    LIBGBM_PREFIX=`$PKG_CONFIG --variable=prefix gbm`
                    libgbm_avail=yes
                fi
                if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
                    video_kmsdrm=yes
                fi
                AC_MSG_CHECKING(for libdrm $LIBDRM_REQUIRED_VERSION library for kmsdrm support)
                AC_MSG_RESULT($libdrm_avail)
                AC_MSG_CHECKING(for libgbm $LIBGBM_REQUIRED_VERSION library for kmsdrm support)
                AC_MSG_RESULT($libgbm_avail)
        if test x$libdrm_avail = xyes -a x$libgbm_avail = xyes; then
            video_kmsdrm=yes
        fi
                if test x$video_kmsdrm = xyes; then
                    AC_ARG_ENABLE(kmsdrm-shared,
AC_HELP_STRING([--enable-kmsdrm-shared], [dynamically load kmsdrm support [[default=yes]]]),
                              , enable_kmsdrm_shared=yes)
        if test x$video_kmsdrm = xyes; then
            AC_ARG_ENABLE(kmsdrm-shared,
AS_HELP_STRING([--enable-kmsdrm-shared], [dynamically load kmsdrm support [[default=yes]]]),
                , enable_kmsdrm_shared=yes)
                    AC_DEFINE(SDL_VIDEO_DRIVER_KMSDRM, 1, [ ])
                    SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
                    EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
            AC_DEFINE(SDL_VIDEO_DRIVER_KMSDRM, 1, [ ])
            SOURCES="$SOURCES $srcdir/src/video/kmsdrm/*.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBDRM_CFLAGS $LIBGBM_CFLAGS"
                    AC_MSG_CHECKING(for kmsdrm dynamic loading support)
                    kmsdrm_shared=no
                    drm_lib=[`find_lib "libdrm.so.*" "$DRM_LIBS"`]
                    gbm_lib=[`find_lib "libgbm.so.*" "$DRM_LIBS"`]
                    if test x$have_loadso != xyes && \
                       test x$enable_kmsdrm_shared = xyes; then
                        AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic kmsdrm loading])
                    fi
                    if test x$have_loadso = xyes && \
                       test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
                        kmsdrm_shared=yes
                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC, "$drm_lib", [ ])
                        AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM, "$gbm_lib", [ ])
                        AC_DEFINE_UNQUOTED(HAVE_KMSDRM_SHARED, "TRUE", [ ])
                        SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
                    else
                        EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
                        SUMMARY_video="${SUMMARY_video} kmsdrm"
                    fi
                    AC_MSG_RESULT($kmsdrm_shared)
                    have_video=yes
                fi
            AC_MSG_CHECKING(for kmsdrm dynamic loading support)
            kmsdrm_shared=no
            drm_lib=[`find_lib "libdrm.so.*" "$DRM_LIBS"`]
            gbm_lib=[`find_lib "libgbm.so.*" "$DRM_LIBS"`]
            if test x$have_loadso != xyes && \
               test x$enable_kmsdrm_shared = xyes; then
                AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic kmsdrm loading])
            fi
            if test x$have_loadso = xyes && \
               test x$enable_kmsdrm_shared = xyes && test x$drm_lib != x && test x$gbm_lib != x; then
                kmsdrm_shared=yes
                AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC, "$drm_lib", [ ])
                AC_DEFINE_UNQUOTED(SDL_VIDEO_DRIVER_KMSDRM_DYNAMIC_GBM, "$gbm_lib", [ ])
                AC_DEFINE_UNQUOTED(HAVE_KMSDRM_SHARED, "TRUE", [ ])
                SUMMARY_video="${SUMMARY_video} kmsdrm(dynamic)"
            else
                EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBDRM_LIBS $LIBGBM_LIBS"
                SUMMARY_video="${SUMMARY_video} kmsdrm"
            fi
            AC_MSG_RESULT($kmsdrm_shared)
            have_video=yes
        fi
    fi
}
@@ -2272,7 +2278,7 @@
CheckDummyVideo()
{
    AC_ARG_ENABLE(video-dummy,
AC_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
AS_HELP_STRING([--enable-video-dummy], [use dummy video driver [[default=yes]]]),
                  , enable_video_dummy=yes)
    if test x$enable_video_dummy = xyes; then
        AC_DEFINE(SDL_VIDEO_DRIVER_DUMMY, 1, [ ])
@@ -2308,7 +2314,7 @@
dnl Check to see if OpenGL support is desired
AC_ARG_ENABLE(video-opengl,
AC_HELP_STRING([--enable-video-opengl], [include OpenGL support [[default=yes]]]),
AS_HELP_STRING([--enable-video-opengl], [include OpenGL support [[default=yes]]]),
              , enable_video_opengl=yes)
dnl Find OpenGL
@@ -2336,13 +2342,13 @@
dnl Check to see if OpenGL ES support is desired
AC_ARG_ENABLE(video-opengles,
AC_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
AS_HELP_STRING([--enable-video-opengles], [include OpenGL ES support [[default=yes]]]),
              , enable_video_opengles=yes)
AC_ARG_ENABLE(video-opengles1,
AC_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[default=yes]]]),
AS_HELP_STRING([--enable-video-opengles1], [include OpenGL ES 1.1 support [[default=yes]]]),
              , enable_video_opengles1=yes)
AC_ARG_ENABLE(video-opengles2,
AC_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
AS_HELP_STRING([--enable-video-opengles2], [include OpenGL ES 2.0 support [[default=yes]]]),
              , enable_video_opengles2=yes)
dnl Find OpenGL ES
@@ -2354,6 +2360,7 @@
        AC_TRY_COMPILE([
          #define LINUX
          #define EGL_API_FB
          #define MESA_EGL_NO_X11_HEADERS
          #include <EGL/egl.h>
          #include <EGL/eglext.h>
        ],[
@@ -2364,7 +2371,7 @@
        if test x$video_opengl_egl = xyes; then
            AC_DEFINE(SDL_VIDEO_OPENGL_EGL, 1, [ ])
        fi
        if test x$enable_video_opengles1 = xyes; then
            AC_MSG_CHECKING(for OpenGL ES v1 headers)
            video_opengles_v1=no
@@ -2525,7 +2532,7 @@
dnl Check to see if Vulkan support is desired
AC_ARG_ENABLE(video-vulkan,
AC_HELP_STRING([--enable-video-vulkan], [include Vulkan support [[default=yes]]]),
AS_HELP_STRING([--enable-video-vulkan], [include Vulkan support [[default=yes]]]),
              , enable_video_vulkan=yes)
dnl Find Vulkan Header
@@ -2627,7 +2634,7 @@
CheckLibUDev()
{
    AC_ARG_ENABLE(libudev,
AC_HELP_STRING([--enable-libudev], [enable libudev support [[default=yes]]]),
AS_HELP_STRING([--enable-libudev], [enable libudev support [[default=yes]]]),
                        , enable_libudev=yes)
    if test x$enable_libudev = xyes; then
        AC_CHECK_HEADER(libudev.h,
@@ -2649,23 +2656,20 @@
CheckDBus()
{
    AC_ARG_ENABLE(dbus,
AC_HELP_STRING([--enable-dbus], [enable D-Bus support [[default=yes]]]),
AS_HELP_STRING([--enable-dbus], [enable D-Bus support [[default=yes]]]),
                        , enable_dbus=yes)
    if test x$enable_dbus = xyes; then
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        if test x$PKG_CONFIG != xno; then
            DBUS_CFLAGS=`$PKG_CONFIG --cflags dbus-1`
            save_CFLAGS="$CFLAGS"
            CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
            AC_CHECK_HEADER(dbus/dbus.h,
                            have_dbus_dbus_h_hdr=yes,
                            have_dbus_dbus_h_hdr=no)
            CFLAGS="$save_CFLAGS"
            if test x$have_dbus_dbus_h_hdr = xyes; then
                AC_DEFINE(HAVE_DBUS_DBUS_H, 1, [ ])
                EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
            fi
        PKG_CHECK_MODULES([DBUS], [dbus-1], have_dbus=yes, have_dbus=no)
        save_CFLAGS="$CFLAGS"
        CFLAGS="$save_CFLAGS $DBUS_CFLAGS"
        AC_CHECK_HEADER(dbus/dbus.h,
                        have_dbus_dbus_h_hdr=yes,
                        have_dbus_dbus_h_hdr=no)
        CFLAGS="$save_CFLAGS"
        if test x$have_dbus_dbus_h_hdr = xyes; then
            AC_DEFINE(HAVE_DBUS_DBUS_H, 1, [ ])
            EXTRA_CFLAGS="$EXTRA_CFLAGS $DBUS_CFLAGS"
            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_dbus.c"
        fi
    fi
}
@@ -2674,11 +2678,11 @@
CheckIME()
{
    AC_ARG_ENABLE(ime,
AC_HELP_STRING([--enable-ime], [enable IME support [[default=yes]]]),
AS_HELP_STRING([--enable-ime], [enable IME support [[default=yes]]]),
                  , enable_ime=yes)
    if test x$enable_ime = xyes; then
        AC_DEFINE(SDL_USE_IME, 1, [ ])
            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
        SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ime.c"
    fi
}
@@ -2686,36 +2690,33 @@
CheckIBus()
{
    AC_ARG_ENABLE(ibus,
AC_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]),
AS_HELP_STRING([--enable-ibus], [enable IBus support [[default=yes]]]),
                  , enable_ibus=yes)
    if test x$enable_ibus = xyes; then
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        if test x$PKG_CONFIG != xno; then
            IBUS_CFLAGS=`$PKG_CONFIG --cflags ibus-1.0`
            save_CFLAGS="$CFLAGS"
            CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
            AC_CHECK_HEADER(ibus-1.0/ibus.h,
                            have_ibus_ibus_h_hdr=yes,
                            have_ibus_ibus_h_hdr=no)
            AC_CHECK_HEADER(sys/inotify.h,
                            have_inotify_inotify_h_hdr=yes,
                            have_inotify_inotify_h_hdr=no)
            CFLAGS="$save_CFLAGS"
            if test x$have_ibus_ibus_h_hdr = xyes; then
                if test x$enable_ime != xyes; then
                    AC_MSG_WARN([IME support is required for IBus.])
                    have_ibus_ibus_h_hdr=no
                elif test x$enable_dbus != xyes; then
                    AC_MSG_WARN([DBus support is required for IBus.])
                    have_ibus_ibus_h_hdr=no
                elif test x$have_inotify_inotify_h_hdr != xyes; then
                    AC_MSG_WARN([INotify support is required for IBus.])
                    have_ibus_ibus_h_hdr=no
                else
                    AC_DEFINE(HAVE_IBUS_IBUS_H, 1, [ ])
                    EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
               fi
        PKG_CHECK_MODULES([IBUS], [ibus-1.0], have_ibus=yes, have_ibus=no)
        save_CFLAGS="$CFLAGS"
        CFLAGS="$save_CFLAGS $IBUS_CFLAGS"
        AC_CHECK_HEADER(ibus-1.0/ibus.h,
                        have_ibus_ibus_h_hdr=yes,
                        have_ibus_ibus_h_hdr=no)
        AC_CHECK_HEADER(sys/inotify.h,
                        have_inotify_inotify_h_hdr=yes,
                        have_inotify_inotify_h_hdr=no)
        CFLAGS="$save_CFLAGS"
        if test x$have_ibus_ibus_h_hdr = xyes; then
            if test x$enable_ime != xyes; then
                AC_MSG_WARN([IME support is required for IBus.])
                have_ibus_ibus_h_hdr=no
            elif test x$enable_dbus != xyes; then
                AC_MSG_WARN([DBus support is required for IBus.])
                have_ibus_ibus_h_hdr=no
            elif test x$have_inotify_inotify_h_hdr != xyes; then
                AC_MSG_WARN([INotify support is required for IBus.])
                have_ibus_ibus_h_hdr=no
            else
                AC_DEFINE(HAVE_IBUS_IBUS_H, 1, [ ])
                EXTRA_CFLAGS="$EXTRA_CFLAGS $IBUS_CFLAGS"
                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_ibus.c"
            fi
        fi
    fi
@@ -2725,29 +2726,26 @@
CheckFcitx()
{
    AC_ARG_ENABLE(fcitx,
AC_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
AS_HELP_STRING([--enable-fcitx], [enable fcitx support [[default=yes]]]),
                  , enable_fcitx=yes)
    if test x$enable_fcitx = xyes; then
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        if test x$PKG_CONFIG != xno; then
            FCITX_CFLAGS=`$PKG_CONFIG --cflags fcitx`
            CFLAGS="$CFLAGS $FCITX_CFLAGS"
            AC_CHECK_HEADER(fcitx/frontend.h,
                            have_fcitx_frontend_h_hdr=yes,
                            have_fcitx_frontend_h_hdr=no)
            CFLAGS="$save_CFLAGS"
            if test x$have_fcitx_frontend_h_hdr = xyes; then
                if test x$enable_ime != xyes; then
                    AC_MSG_WARN([IME support is required for fcitx.])
                    have_fcitx_frontend_h_hdr=no
                elif test x$enable_dbus != xyes; then
                    AC_MSG_WARN([DBus support is required for fcitx.])
                    have_fcitx_frontend_h_hdr=no
                else
                    AC_DEFINE(HAVE_FCITX_FRONTEND_H, 1, [ ])
                    EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
                    SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
               fi
        PKG_CHECK_MODULES([FCITX], [fcitx], have_fcitx=yes, have_fcitx=no)
        CFLAGS="$CFLAGS $FCITX_CFLAGS"
        AC_CHECK_HEADER(fcitx/frontend.h,
                        have_fcitx_frontend_h_hdr=yes,
                        have_fcitx_frontend_h_hdr=no)
        CFLAGS="$save_CFLAGS"
        if test x$have_fcitx_frontend_h_hdr = xyes; then
            if test x$enable_ime != xyes; then
                AC_MSG_WARN([IME support is required for fcitx.])
                have_fcitx_frontend_h_hdr=no
            elif test x$enable_dbus != xyes; then
                AC_MSG_WARN([DBus support is required for fcitx.])
                have_fcitx_frontend_h_hdr=no
            else
                AC_DEFINE(HAVE_FCITX_FRONTEND_H, 1, [ ])
                EXTRA_CFLAGS="$EXTRA_CFLAGS $FCITX_CFLAGS"
                SOURCES="$SOURCES $srcdir/src/core/linux/SDL_fcitx.c"
            fi
        fi
    fi
@@ -2757,7 +2755,7 @@
CheckTslib()
{
    AC_ARG_ENABLE(input-tslib,
AC_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[default=yes]]]),
AS_HELP_STRING([--enable-input-tslib], [use the Touchscreen library for input [[default=yes]]]),
                  , enable_input_tslib=yes)
    if test x$enable_input_tslib = xyes; then
        AC_MSG_CHECKING(for Touchscreen library support)
@@ -2782,11 +2780,11 @@
{
    dnl Check for pthread support
    AC_ARG_ENABLE(pthreads,
AC_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [[default=yes]]]),
AS_HELP_STRING([--enable-pthreads], [use POSIX threads for multi-threading [[default=yes]]]),
                  , enable_pthreads=yes)
    dnl This is used on Linux for glibc binary compatibility (Doh!)
    AC_ARG_ENABLE(pthread-sem,
AC_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
AS_HELP_STRING([--enable-pthread-sem], [use pthread semaphores [[default=yes]]]),
                  , enable_pthread_sem=yes)
    case "$host" in
         *-*-android*)
@@ -3042,7 +3040,7 @@
CheckDIRECTX()
{
    AC_ARG_ENABLE(directx,
AC_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[default=yes]]]),
AS_HELP_STRING([--enable-directx], [use DirectX for Windows audio/video [[default=yes]]]),
                  , enable_directx=yes)
    if test x$enable_directx = xyes; then
        AC_CHECK_HEADER(d3d9.h, have_d3d=yes)
@@ -3085,9 +3083,6 @@
            AC_DEFINE(HAVE_XINPUT_STATE_EX, 1, [ ])
        fi
        SUMMARY_video="${SUMMARY_video} directx"
        SUMMARY_audio="${SUMMARY_audio} directx"
        # FIXME: latest Cygwin finds dinput headers, but we die on other win32 headers.
        # FIXME:  ...so force it off for now.
        case "$host" in
@@ -3106,10 +3101,8 @@
        AC_DEFINE(HAVE_AUDIOCLIENT_H,1,[])
    fi
    AC_CHECK_HEADER(endpointvolume.h,AC_DEFINE(HAVE_ENDPOINTVOLUME_H,1,[]))
    AC_ARG_ENABLE(wasapi,
AC_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]),
AS_HELP_STRING([--enable-wasapi], [use the Windows WASAPI audio driver [[default=yes]]]),
                                , enable_wasapi=yes)
}
@@ -3117,7 +3110,7 @@
CheckDLOPEN()
{
    AC_ARG_ENABLE(sdl-dlopen,
AC_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [[default=yes]]]),
AS_HELP_STRING([--enable-sdl-dlopen], [use dlopen for shared object loading [[default=yes]]]),
                  , enable_sdl_dlopen=yes)
    if test x$enable_sdl_dlopen = xyes; then
        AC_MSG_CHECKING(for dlopen)
@@ -3159,7 +3152,7 @@
                    AC_CHECK_HEADER(libusb.h, [USB_CFLAGS="-DHAVE_LIBUSB_H"])
                    AC_CHECK_LIB(usb, hid_init, [USB_LIBS="$USB_LIBS -lusb"])
                fi
                save_CFLAGS="$CFLAGS"
                CFLAGS="$CFLAGS $USB_CFLAGS"
@@ -3289,31 +3282,71 @@
{
    # The hidraw support doesn't catch Xbox, PS4 and Nintendo controllers,
    # so we'll just use libusb when it's available.
    #
    # Except that libusb requires root permissions to open devices, so that's not generally useful, and we'll disable this by default.
    case "$host" in
        # libusb does not support iOS
        arm*-apple-darwin* | *-ios-* )
            skiplibusb=yes
            ;;
        # On the other hand, *BSD specifically uses libusb only
        *-*-*bsd* )
            onlylibusb=yes
            ;;
    esac
    AC_ARG_ENABLE(hidapi,
AC_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]),
AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[default=no]]]),
                  , enable_hidapi=no)
    if test x$enable_joystick = xyes -a x$enable_hidapi = xyes; then
        hidapi_support=no
        AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
        if test x$PKG_CONFIG != xno; then
            LIBUSB_CFLAGS=`$PKG_CONFIG --cflags libusb-1.0`
            LIBUSB_LDFLAGS=`$PKG_CONFIG --libs libusb-1.0`
        if test x$skiplibusb = xyes; then
            hidapi_support=yes
        else
            PKG_CHECK_MODULES([LIBUSB], [libusb-1.0], have_libusb=yes, have_libusb=no)
            save_CFLAGS="$CFLAGS"
            CFLAGS="$save_CFLAGS $LIBUSB_CFLAGS"
            AC_CHECK_HEADER(libusb.h, have_libusb_h=yes)
            CFLAGS="$save_CFLAGS"
            if test x$have_libusb_h = xyes; then
                hidapi_support=yes
            elif test x$onlylibusb = xyes; then
                hidapi_support=no
            else
                hidapi_support=yes
            fi
        fi
        if test x$have_libusb_h = xyes; then
            hidapi_support=yes
        if test x$hidapi_support = xyes; then
            AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
            EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
            SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
            SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LDFLAGS"
            SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
            if test x$have_libusb_h = xyes; then
                EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
                if test x$onlylibusb = xyes; then
                    SOURCES="$SOURCES $srcdir/src/hidapi/libusb/hid.c"
                    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $LIBUSB_LIBS"
                else
                    if test x$have_loadso != xyes; then
                        AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libusb loading])
                    fi
                    # libusb is loaded dynamically, so don't add it to LDFLAGS
                    libusb_lib=""
                    case "$host" in
                        *-*-darwin* )
                            libusb_lib="libusb-1.0.0.dylib"
                            ;;
                        *-*-cygwin* | *-*-mingw32* )
                            libusb_lib="libusb-1.0.dll"
                            ;;
                    esac
                    if test x$libusb_lib = x; then
                        libusb_lib=[`find_lib "libusb-1.0.so.*" "" | sed 's/.*\/\(.*\)/\1/; q'`]
                    fi
                    AC_DEFINE_UNQUOTED(SDL_LIBUSB_DYNAMIC, "$libusb_lib", [ ])
                fi
            fi
        fi
        AC_MSG_CHECKING(for hidapi support)
        AC_MSG_RESULT($hidapi_support)
    fi
@@ -3323,7 +3356,7 @@
CheckClockGettime()
{
    AC_ARG_ENABLE(clock_gettime,
AC_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [[default=yes]]]),
AS_HELP_STRING([--enable-clock_gettime], [use clock_gettime() instead of gettimeofday() on UNIX [[default=yes]]]),
                  , enable_clock_gettime=yes)
    if test x$enable_clock_gettime = xyes; then
        AC_CHECK_LIB(rt, clock_gettime, have_clock_gettime=yes)
@@ -3353,12 +3386,38 @@
CheckRPATH()
{
    AC_ARG_ENABLE(rpath,
AC_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [[default=yes]]]),
AS_HELP_STRING([--enable-rpath], [use an rpath when linking SDL [[default=yes]]]),
                  , enable_rpath=yes)
}
dnl Check if we want to use custom signals to fake iOS/Android's backgrounding
dnl  events. These could be useful if you're building a custom embedded
dnl  environment, etc, but most people don't need this.
CheckEventSignals()
{
    AC_ARG_ENABLE(backgrounding-signal,
AS_HELP_STRING([--enable-backgrounding-signal], [number to use for magic backgrounding signal or 'no' [[default=no]]]),
                  , enable_backgrounding_signal=no)
    if test x$enable_backgrounding_signal != xno; then
        EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_BACKGROUNDING_SIGNAL=$enable_backgrounding_signal"
    fi
    AC_ARG_ENABLE(foregrounding-signal,
AS_HELP_STRING([--enable-foregrounding-signal], [number to use for magic foregrounding signal or 'no' [[default=no]]]),
                  , enable_foregrounding_signal=no)
    if test x$enable_foregrounding_signal != xno; then
        EXTRA_CFLAGS="$EXTRA_CFLAGS -DSDL_FOREGROUNDING_SIGNAL=$enable_foregrounding_signal"
    fi
}
dnl Do this on all platforms, before everything else (other things might want to override it).
CheckWarnAll
CheckNoStrictAliasing
dnl Do this for every platform, but for some it doesn't mean anything, but better to catch it here anyhow.
CheckEventSignals
dnl Set up the configuration based on the host platform!
case "$host" in
@@ -3407,6 +3466,8 @@
        CheckDiskAudio
        CheckDummyAudio
        CheckDLOPEN
        CheckARM
        CheckNEON
        CheckOSS
        CheckALSA
        CheckPulseAudio
@@ -3425,8 +3486,8 @@
        CheckOpenGLX11
        CheckOpenGLESX11
        CheckVulkan
        CheckMir
        CheckWayland
        CheckInputEvents
        CheckLibUDev
        CheckDBus
        CheckIME
@@ -3434,7 +3495,6 @@
        CheckFcitx
        case $ARCH in
          linux)
              CheckInputEvents
              CheckInputKD
          ;;
        esac
@@ -3568,6 +3628,7 @@
            SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev*.c"
        fi       
        # Set up other core UNIX files
        SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
        SOURCES="$SOURCES $srcdir/src/core/unix/*.c"
        ;;
    *-*-cygwin* | *-*-mingw32*)
@@ -3590,6 +3651,7 @@
        CheckWINDOWSGLES
        CheckVulkan
        CheckDIRECTX
        CheckHIDAPI
        # Set up the core platform files
        SOURCES="$SOURCES $srcdir/src/core/windows/*.c"
@@ -3600,21 +3662,25 @@
            SOURCES="$SOURCES $srcdir/src/video/windows/*.c"
            have_video=yes
            AC_ARG_ENABLE(render-d3d,
AC_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[default=yes]]]),
                                , enable_render_d3d=yes)
            if test x$enable_render_d3d = xyes -a x$have_d3d = xyes; then
                AC_DEFINE(SDL_VIDEO_RENDER_D3D, 1, [ ])
                SUMMARY_video="${SUMMARY_video} d3d9"
            fi
            if test x$enable_render_d3d = xyes -a x$have_d3d11 = xyes; then
                AC_DEFINE(SDL_VIDEO_RENDER_D3D11, 1, [ ])
                SUMMARY_video="${SUMMARY_video} d3d11"
            fi
        fi
        # Set up files for the audio library
        if test x$enable_audio = xyes; then
            AC_DEFINE(SDL_AUDIO_DRIVER_WINMM, 1, [ ])
            SUMMARY_audio="${SUMMARY_audio} winmm"
            SOURCES="$SOURCES $srcdir/src/audio/winmm/*.c"
            if test x$have_dsound = xyes; then
                AC_DEFINE(SDL_AUDIO_DRIVER_DSOUND, 1, [ ])
                SUMMARY_audio="${SUMMARY_audio} directsound"
                SOURCES="$SOURCES $srcdir/src/audio/directsound/*.c"
            fi
            if test x$have_wasapi = xyes -a x$enable_wasapi = xyes; then
@@ -3637,11 +3703,7 @@
            else
                AC_DEFINE(SDL_JOYSTICK_WINMM, 1, [ ])
            fi
            AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
            SOURCES="$SOURCES $srcdir/src/joystick/windows/*.c"
            SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
            SOURCES="$SOURCES $srcdir/src/hidapi/windows/hid.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
            have_joystick=yes
        fi
        if test x$enable_haptic = xyes; then
@@ -3797,6 +3859,12 @@
        #    have_haptic=yes
        #    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
        #fi
        # Set up files for the sensor library
        if test x$enable_sensor = xyes; then
            AC_DEFINE(SDL_SENSOR_COREMOTION, 1, [ ])
            SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m"
            have_sensor=yes
        fi
        # Set up files for the power library
        if test x$enable_power = xyes; then
            AC_DEFINE(SDL_POWER_UIKIT, 1, [ ])
@@ -3840,7 +3908,7 @@
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,QuartzCore"
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,UIKit"
        if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
        if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Metal"
        fi
        ;;
@@ -3868,6 +3936,7 @@
        CheckOpenGLX11
        CheckVulkan
        CheckPTHREAD
        CheckHIDAPI
        # Set up files for the audio library
        if test x$enable_audio = xyes; then
@@ -3880,11 +3949,7 @@
        # Set up files for the joystick library
        if test x$enable_joystick = xyes; then
            AC_DEFINE(SDL_JOYSTICK_IOKIT, 1, [ ])
            AC_DEFINE(SDL_JOYSTICK_HIDAPI, 1, [ ])
            SOURCES="$SOURCES $srcdir/src/joystick/darwin/*.c"
            SOURCES="$SOURCES $srcdir/src/joystick/hidapi/*.c"
            SOURCES="$SOURCES $srcdir/src/hidapi/mac/hid.c"
            EXTRA_CFLAGS="$EXTRA_CFLAGS -I$srcdir/src/hidapi/hidapi"
            have_joystick=yes
        fi
        # Set up files for the haptic library
@@ -3925,7 +3990,7 @@
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,Carbon"
        EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,IOKit"
        if test x$enable_render = xyes -a x$enable_render_metal = xyes; then
        if test x$enable_video_metal = xyes -o x$enable_video_vulkan = xyes; then
            EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-weak_framework,QuartzCore -Wl,-weak_framework,Metal"
        fi
        ;;
@@ -3936,7 +4001,7 @@
        CheckDummyVideo
        CheckInputEvents
        CheckPTHREAD
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
@@ -4001,12 +4066,47 @@
            have_timers=yes
        fi
        ;;
    *-*-riscos*)
        ARCH=riscos
        CheckVisibilityHidden
        CheckDeclarationAfterStatement
        CheckDummyVideo
        CheckDiskAudio
        CheckDummyAudio
        CheckDLOPEN
        CheckOSS
        CheckPTHREAD
        CheckClockGettime
        # Set up files for the timer library
        if test x$enable_timers = xyes; then
            AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
            have_timers=yes
        fi
        ;;
    *)
        AC_MSG_ERROR([
*** Unsupported host:  Please add to configure.in
*** Unsupported host:  Please add to configure.ac
        ])
        ;;
esac
# Check whether to install sdl2-config
AC_MSG_CHECKING(whether to install sdl2-config)
AC_ARG_ENABLE([sdl2-config],
    AS_HELP_STRING([--enable-sdl2-config], [Install sdl2-config [default=yes]]),
    [case "${enableval}" in
        yes) enable_sdl2_config="TRUE" ;;
        no) enable_sdl2_config="FALSE" ;;
        *) AC_MSG_ERROR([bad value '${enableval}' for --enable-sdl2-config]) ;;
    esac], [enable_sdl2_config="TRUE"])
if test "$enable_sdl2_config" = "TRUE"; then
    AC_MSG_RESULT(yes)
else
    AC_MSG_RESULT(no)
fi
AC_SUBST([INSTALL_SDL2_CONFIG], [$enable_sdl2_config])
# Verify that we have all the platform specific files we need
@@ -4086,7 +4186,7 @@
for EXT in asm cc m c S; do
    OBJECTS=`echo "$OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.'$EXT',$(objects)/\1.lo,g'`
    DEPENDS=`echo "$DEPENDS" | sed "s,^\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.$EXT\\$,\\\\
\\$(objects)/\\2.lo: \\1/\\2.$EXT\\\\
\\$(objects)/\\2.lo: \\1/\\2.$EXT \\$(objects)/.created\\\\
    \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
done
@@ -4096,21 +4196,21 @@
VERSION_DEPENDS=`echo $VERSION_SOURCES`
VERSION_OBJECTS=`echo "$VERSION_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.rc,$(objects)/\1.o,g'`
VERSION_DEPENDS=`echo "$VERSION_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.rc,\\\\
\\$(objects)/\\2.o: \\1/\\2.rc\\\\
\\$(objects)/\\2.o: \\1/\\2.rc \\$(objects)/.created\\\\
    \\$(WINDRES) \\$< \\$@,g"`
SDLMAIN_OBJECTS=`echo $SDLMAIN_SOURCES`
SDLMAIN_DEPENDS=`echo $SDLMAIN_SOURCES`
SDLMAIN_OBJECTS=`echo "$SDLMAIN_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
SDLMAIN_DEPENDS=`echo "$SDLMAIN_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
\\$(objects)/\\2.lo: \\1/\\2.c\\\\
\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
    \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
SDLTEST_OBJECTS=`echo $SDLTEST_SOURCES`
SDLTEST_DEPENDS=`echo $SDLTEST_SOURCES`
SDLTEST_OBJECTS=`echo "$SDLTEST_OBJECTS" | sed 's,[[^ ]]*/\([[^ ]]*\)\.c,$(objects)/\1.lo,g'`
SDLTEST_DEPENDS=`echo "$SDLTEST_DEPENDS" | sed "s,\\([[^ ]]*\\)/\\([[^ ]]*\\)\\.c,\\\\
\\$(objects)/\\2.lo: \\1/\\2.c\\\\
\\$(objects)/\\2.lo: \\1/\\2.c \\$(objects)/.created\\\\
    \\$(RUN_CMD_CC)\\$(LIBTOOL) --tag=CC --mode=compile \\$(CC) \\$(CFLAGS) \\$(EXTRA_CFLAGS) $DEPENDENCY_TRACKING_OPTIONS -c \\$< -o \\$@,g"`
# Set runtime shared library paths as needed
@@ -4196,7 +4296,7 @@
__EOF__
AC_CONFIG_FILES([
    Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc
    Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc
])
AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
@@ -4245,6 +4345,23 @@
else
    SUMMARY="${SUMMARY}Using fcitx         : NO\n"
fi
if test x$WARN_ABOUT_ARM_SIMD_ASM_MIT = xyes; then
    SUMMARY="${SUMMARY}\nSDL is being built with ARM SIMD optimizations, which\n"
    SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
    SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
    SUMMARY="${SUMMARY}configure script with:\n"
    SUMMARY="${SUMMARY}\n    --disable-arm-simd\n"
fi
if test x$WARN_ABOUT_ARM_NEON_ASM_MIT = xyes; then
    SUMMARY="${SUMMARY}\nSDL is being built with ARM NEON optimizations, which\n"
    SUMMARY="${SUMMARY}uses code licensed under the MIT license. If this is a\n"
    SUMMARY="${SUMMARY}problem, please disable that code by rerunning the\n"
    SUMMARY="${SUMMARY}configure script with:\n"
    SUMMARY="${SUMMARY}\n    --disable-arm-neon\n"
fi
AC_CONFIG_COMMANDS([summary], [echo -en "$SUMMARY"], [SUMMARY="$SUMMARY"])
AC_OUTPUT
source/debian/changelog
@@ -1,3 +1,21 @@
libsdl2 (2.0.12) UNRELEASED; urgency=low
  * Updated SDL to version 2.0.12 for development builds
 -- Sam Lantinga <slouken@libsdl.org>  Sun, 1 Mar 2020 14:57:07 -0800
libsdl2 (2.0.11) UNRELEASED; urgency=low
  * Updated SDL to version 2.0.11 for development builds
 -- Sam Lantinga <slouken@libsdl.org>  Sun, 22 Sep 2019 10:33:03 -0800
libsdl2 (2.0.10) UNRELEASED; urgency=low
  * Updated SDL to version 2.0.10
 -- Sam Lantinga <slouken@libsdl.org>  Mon, 17 Jun 2019 08:48:47 -0800
libsdl2 (2.0.9) UNRELEASED; urgency=low
  * Updated SDL to version 2.0.9
source/debian/copyright
@@ -4,7 +4,7 @@
Source: http://www.libsdl.org/
Files: *
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
License: zlib/libpng
Files: src/libm/*
@@ -12,7 +12,7 @@
License: SunPro
Files: src/main/windows/SDL_windows_main.c
Copyright: 2018 Sam Lantinga
Copyright: 2020 Sam Lantinga
License: PublicDomain_Sam_Lantinga
Comment: SDL_main.c, placed in the public domain by Sam Lantinga  4/13/98
@@ -32,7 +32,7 @@
License: BrownUn_UnCalifornia_ErikCorry
Files: src/test/SDL_test_md5.c
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
           1990 RSA Data Security, Inc.
License: zlib/libpng and RSA_Data_Security
@@ -46,12 +46,12 @@
License: MIT/X11
Files: test/testhaptic.c
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
           2008 Edgar Simo Serra
License: BSD_3_clause
Files: test/testrumble.c
Copyright: 1997-2018 Sam Lantinga <slouken@libsdl.org>
Copyright: 1997-2020 Sam Lantinga <slouken@libsdl.org>
           2011 Edgar Simo Serra
License: BSD_3_clause
@@ -169,7 +169,7 @@
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Comment:
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  .
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/debian/libsdl2-dev.install
@@ -5,4 +5,5 @@
usr/lib/*/*.so
usr/lib/*/pkgconfig/sdl2.pc
usr/lib/*/cmake/SDL2/sdl2-config.cmake
usr/lib/*/cmake/SDL2/sdl2-config-version.cmake
usr/share/aclocal/sdl2.m4
source/debian/rules
@@ -4,9 +4,22 @@
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
confflags = --disable-rpath --disable-video-directfb \
            --disable-nas --disable-esd --disable-arts \
            --disable-alsa-shared --disable-pulseaudio-shared \
            --disable-x11-shared
            --disable-nas --disable-esd --disable-arts
# These flags can be used to create a package directly linking with external libraries and having the appropriate package dependencies
#confflags += --disable-alsa-shared
#confflags += --disable-arts-shared
#confflags += --disable-directfb-shared
#confflags += --disable-esd-shared
#confflags += --disable-fusionsound-shared
#confflags += --disable-jack-shared
#confflags += --disable-kmsdrm-shared
#confflags += --disable-libsamplerate-shared
#confflags += --disable-nas-shared
#confflags += --disable-pulseaudio-shared
#confflags += --disable-sndio-shared
#confflags += --disable-wayland-shared
#confflags += --disable-x11-shared
%:
    dh $@ --parallel
source/docs/README-android.md
@@ -20,7 +20,7 @@
Android NDK r15c or later
https://developer.android.com/tools/sdk/ndk/index.html
Minimum API level supported by SDL: 14 (Android 4.0.1)
Minimum API level supported by SDL: 16 (Android 4.1)
================================================================================
@@ -82,6 +82,23 @@
4b. If you want to build manually, run './gradlew installDebug' in the project directory. This compiles the .java, creates an .apk with the native code embedded, and installs it on any connected Android device
If you already have a project that uses CMake, the instructions change somewhat:
1. Do points 1 and 2 from the instruction above.
2. Edit "<project>/app/build.gradle" to comment out or remove sections containing ndk-build
   and uncomment the cmake sections. Add arguments to the CMake invocation as needed.
3. Edit "<project>/app/jni/CMakeLists.txt" to include your project (it defaults to
   adding the "src" subdirectory). Note that you'll have SDL2, SDL2main and SDL2-static
   as targets in your project, so you should have "target_link_libraries(yourgame SDL2 SDL2main)"
   in your CMakeLists.txt file. Also be aware that you should use add_library() instead of
   add_executable() for the target containing your "main" function.
If you wish to use Android Studio, you can skip the last step.
4. Run './gradlew installDebug' or './gradlew installRelease' in the project directory. It will build and install your .apk on any
   connected Android device
Here's an explanation of the files in the Android project, so you can customize them:
    android-project/app
@@ -90,10 +107,12 @@
        jni/            - directory holding native code
        jni/Application.mk    - Application JNI settings, including target platform and STL library
        jni/Android.mk        - Android makefile that can call recursively the Android.mk files in all subdirectories
        jni/CMakeLists.txt    - Top-level CMake project that adds SDL as a subproject
        jni/SDL/        - (symlink to) directory holding the SDL library files
        jni/SDL/Android.mk    - Android makefile for creating the SDL shared library
        jni/src/        - directory holding your C/C++ source
        jni/src/Android.mk    - Android makefile that you should customize to include your source code and any library references
        jni/src/CMakeLists.txt    - CMake file that you may customize to include your source code and any library references
        src/main/assets/    - directory holding asset files for your application
        src/main/res/        - directory holding resources for your application
        src/main/res/mipmap-*    - directories holding icons for different phone hardware
@@ -174,7 +193,7 @@
 Pause / Resume behaviour
================================================================================
If SDL is compiled with SDL_ANDROID_BLOCK_ON_PAUSE defined (the default),
If SDL_HINT_ANDROID_BLOCK_ON_PAUSE hint is set (the default),
the event loop will block itself when the app is paused (ie, when the user
returns to the main Android dashboard). Blocking is better in terms of battery
use, and it allows your app to spring back to life instantaneously after resume
@@ -380,13 +399,13 @@
================================================================================
 Why is API level 14 the minimum required?
 Why is API level 16 the minimum required?
================================================================================
The latest NDK toolchain doesn't support targeting earlier than API level 14.
The latest NDK toolchain doesn't support targeting earlier than API level 16.
As of this writing, according to https://developer.android.com/about/dashboards/index.html
about 99% of the Android devices accessing Google Play support API level 14 or
higher (October 2017).
about 99% of the Android devices accessing Google Play support API level 16 or
higher (January 2018).
================================================================================
@@ -409,6 +428,24 @@
================================================================================
 Ending your application
================================================================================
Two legitimate ways:
- return from your main() function. Java side will automatically terminate the
Activity by calling Activity.finish().
- Android OS can decide to terminate your application by calling onDestroy()
(see Activity life cycle). Your application will receive a SDL_QUIT event you
can handle to save things and quit.
Don't call exit() as it stops the activity badly.
NB: "Back button" can be handled as a SDL_KEYDOWN/UP events, with Keycode
SDLK_AC_BACK, for any purpose.
================================================================================
 Known issues
================================================================================
source/docs/README-cmake.md
@@ -1,6 +1,6 @@
CMake
CMake
================================================================================
(www.cmake.org)
(www.cmake.org)
SDL's build system was traditionally based on autotools. Over time, this
approach has suffered from several issues across the different supported 
@@ -15,7 +15,7 @@
* Linux
* VS.NET 2010
* MinGW and Msys
* OS X with support for XCode
* macOS, iOS, and tvOS, with support for XCode
================================================================================
@@ -30,3 +30,55 @@
    cmake ../sdl
This will build the static and dynamic versions of SDL in the ~/build directory.
================================================================================
Usage, iOS/tvOS
================================================================================
CMake 3.14+ natively includes support for iOS and tvOS.  SDL binaries may be built
using Xcode or Make, possibly among other build-systems.
When using a recent version of CMake (3.14+), it should be possible to:
- build SDL for iOS, both static and dynamic
- build SDL test apps (as iOS/tvOS .app bundles)
- generate a working SDL_config.h for iOS (using SDL_config.h.cmake as a basis)
To use, set the following CMake variables when running CMake's configuration stage:
- `CMAKE_SYSTEM_NAME=<OS>`   (either `iOS` or `tvOS`)
- `CMAKE_OSX_SYSROOT=<SDK>`  (examples: `iphoneos`, `iphonesimulator`, `iphoneos12.4`, `/full/path/to/iPhoneOS.sdk`,
                              `appletvos`, `appletvsimulator`, `appletvos12.4`, `/full/path/to/AppleTVOS.sdk`, etc.)
- `CMAKE_OSX_ARCHITECTURES=<semicolon-separated list of CPU architectures>` (example: "arm64;armv7s;x86_64")
### Examples (for iOS/tvOS):
- for iOS-Simulator, using the latest, installed SDK:
    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for iOS-Device, using the latest, installed SDK, 64-bit only
    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES=arm64`
- for iOS-Device, using the latest, installed SDK, mixed 32/64 bit
    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos -DCMAKE_OSX_ARCHITECTURES="arm64;armv7s"`
- for iOS-Device, using a specific SDK revision (iOS 12.4, in this example):
    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphoneos12.4 -DCMAKE_OSX_ARCHITECTURES=arm64`
- for iOS-Simulator, using the latest, installed SDK, and building SDL test apps (as .app bundles):
    `cmake ~/sdl -DSDL_TEST=1 -DCMAKE_SYSTEM_NAME=iOS -DCMAKE_OSX_SYSROOT=iphonesimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for tvOS-Simulator, using the latest, installed SDK:
    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvsimulator -DCMAKE_OSX_ARCHITECTURES=x86_64`
- for tvOS-Device, using the latest, installed SDK:
    `cmake ~/sdl -DCMAKE_SYSTEM_NAME=tvOS -DCMAKE_OSX_SYSROOT=appletvos -DCMAKE_OSX_ARCHITECTURES=arm64`
source/docs/README-directfb.md
@@ -1,5 +1,5 @@
DirectFB
========
========
Supports:
source/docs/README-linux.md
@@ -25,9 +25,6 @@
Ubuntu 16.04+ can also add "libwayland-dev libxkbcommon-dev wayland-protocols"
to that command line for Wayland support.
Ubuntu 16.10 can also add "libmirclient-dev libxkbcommon-dev" to that command
line for Mir support.
NOTES:
- This includes all the audio targets except arts, because Ubuntu pulled the 
  artsc0-dev package, but in theory SDL still supports it.
source/docs/README-macosx.md
@@ -100,7 +100,7 @@
will be visible to the user in the Finder. Usually it will be the same
as EXE_NAME but capitalized. E.g. if EXE_NAME is "testgame" then APP_NAME 
usually is "TestGame". You might also want to use `@PACKAGE@` to use the package
name as specified in your configure.in file.
name as specified in your configure.ac file.
If your project builds more than one application, you will have to do a bit
more. For each of your target applications, you need a separate rule.
source/docs/README-nacl.md
@@ -1,103 +1,103 @@
Native Client
================================================================================
Requirements:
* Native Client SDK (https://developer.chrome.com/native-client),
  (tested with Pepper version 33 or higher).
The SDL backend for Chrome's Native Client has been tested only with the PNaCl
toolchain, which generates binaries designed to run on ARM and x86_32/64
platforms. This does not mean it won't work with the other toolchains!
================================================================================
Building SDL for NaCl
================================================================================
Set up the right environment variables (see naclbuild.sh), then configure SDL with:
    configure --host=pnacl --prefix some/install/destination
Then "make".
As an example of how to create a deployable app a Makefile project is provided
in test/nacl/Makefile, which includes some monkey patching of the common.mk file
provided by NaCl, without which linking properly to SDL won't work (the search
path can't be modified externally, so the linker won't find SDL's binaries unless
you dump them into the SDK path, which is inconvenient).
Also provided in test/nacl is the required support file, such as index.html,
manifest.json, etc.
SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure.
This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem),
hiding the asynchronous nature of the browser behind the scenes...which is not the
same as making it disappear!
================================================================================
Running tests
================================================================================
Due to the nature of NaCl programs, building and running SDL tests is not as
straightforward as one would hope. The script naclbuild.sh in build-scripts
automates the process and should serve as a guide for users of SDL trying to build
their own applications.
Basic usage:
    ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35)
This will build testgles2.c by default.
If you want to build a different test, for example testrendercopyex.c:
    SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35
Once the build finishes, you have to serve the contents with a web server (the
script will give you instructions on how to do that with Python).
================================================================================
RWops and nacl_io
================================================================================
SDL_RWops work transparently with nacl_io. Two functions control the mount points:
    int mount(const char* source, const char* target,
                      const char* filesystemtype,
                      unsigned long mountflags, const void *data);
    int umount(const char *target);
    For convenience, SDL will by default mount an httpfs tree at / before calling
the app's main function. Such setting can be overridden by calling:
    umount("/");
And then mounting a different filesystem at /
It's important to consider that the asynchronous nature of file operations on a
browser is hidden from the application, effectively providing the developer with
a set of blocking file operations just like you get in a regular desktop
environment, which eases the job of porting to Native Client, but also introduces
a set of challenges of its own, in particular when big file sizes and slow
connections are involved.
For more information on how nacl_io and mount points work, see:
    https://developer.chrome.com/native-client/devguide/coding/nacl_io
    https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h
To be able to save into the directory "/save/" (like backup of game) :
    mount("", "/save", "html5fs", 0, "type=PERSISTENT");
And add to manifest.json :
    "permissions": [
        "unlimitedStorage"
    ]
================================================================================
TODO - Known Issues
================================================================================
* Testing of all systems with a real application (something other than SDL's tests)
* Key events don't seem to work properly
Native Client
================================================================================
Requirements:
* Native Client SDK (https://developer.chrome.com/native-client),
  (tested with Pepper version 33 or higher).
The SDL backend for Chrome's Native Client has been tested only with the PNaCl
toolchain, which generates binaries designed to run on ARM and x86_32/64
platforms. This does not mean it won't work with the other toolchains!
================================================================================
Building SDL for NaCl
================================================================================
Set up the right environment variables (see naclbuild.sh), then configure SDL with:
    configure --host=pnacl --prefix some/install/destination
Then "make".
As an example of how to create a deployable app a Makefile project is provided
in test/nacl/Makefile, which includes some monkey patching of the common.mk file
provided by NaCl, without which linking properly to SDL won't work (the search
path can't be modified externally, so the linker won't find SDL's binaries unless
you dump them into the SDK path, which is inconvenient).
Also provided in test/nacl is the required support file, such as index.html,
manifest.json, etc.
SDL apps for NaCl run on a worker thread using the ppapi_simple infrastructure.
This allows for blocking calls on all the relevant systems (OpenGL ES, filesystem),
hiding the asynchronous nature of the browser behind the scenes...which is not the
same as making it disappear!
================================================================================
Running tests
================================================================================
Due to the nature of NaCl programs, building and running SDL tests is not as
straightforward as one would hope. The script naclbuild.sh in build-scripts
automates the process and should serve as a guide for users of SDL trying to build
their own applications.
Basic usage:
    ./naclbuild.sh path/to/pepper/toolchain (i.e. ~/naclsdk/pepper_35)
This will build testgles2.c by default.
If you want to build a different test, for example testrendercopyex.c:
    SOURCES=~/sdl/SDL/test/testrendercopyex.c ./naclbuild.sh ~/naclsdk/pepper_35
Once the build finishes, you have to serve the contents with a web server (the
script will give you instructions on how to do that with Python).
================================================================================
RWops and nacl_io
================================================================================
SDL_RWops work transparently with nacl_io. Two functions control the mount points:
    int mount(const char* source, const char* target,
                      const char* filesystemtype,
                      unsigned long mountflags, const void *data);
    int umount(const char *target);
    For convenience, SDL will by default mount an httpfs tree at / before calling
the app's main function. Such setting can be overridden by calling:
    umount("/");
And then mounting a different filesystem at /
It's important to consider that the asynchronous nature of file operations on a
browser is hidden from the application, effectively providing the developer with
a set of blocking file operations just like you get in a regular desktop
environment, which eases the job of porting to Native Client, but also introduces
a set of challenges of its own, in particular when big file sizes and slow
connections are involved.
For more information on how nacl_io and mount points work, see:
    https://developer.chrome.com/native-client/devguide/coding/nacl_io
    https://src.chromium.org/chrome/trunk/src/native_client_sdk/src/libraries/nacl_io/nacl_io.h
To be able to save into the directory "/save/" (like backup of game) :
    mount("", "/save", "html5fs", 0, "type=PERSISTENT");
And add to manifest.json :
    "permissions": [
        "unlimitedStorage"
    ]
================================================================================
TODO - Known Issues
================================================================================
* Testing of all systems with a real application (something other than SDL's tests)
* Key events don't seem to work properly
source/docs/README-pandora.md
@@ -1,7 +1,7 @@
Pandora
Pandora
=====================================================================
( http://openpandora.org/ )
( http://openpandora.org/ )
- A pandora specific video driver was written to allow SDL 2.0 with OpenGL ES
support to work on the pandora under the framebuffer. This driver do not have
input support for now, so if you use it you will have to add your own control code.
source/docs/README-platforms.md
@@ -1,8 +1,8 @@
Platforms
=========
We maintain the list of supported platforms on our wiki now, and how to
build and install SDL for those platforms:
    https://wiki.libsdl.org/Installation
Platforms
=========
We maintain the list of supported platforms on our wiki now, and how to
build and install SDL for those platforms:
    https://wiki.libsdl.org/Installation
source/docs/README-porting.md
@@ -13,7 +13,7 @@
1. The "UNIX" way:  ./configure; make; make install
   If you have a GNUish system, then you might try this.  Edit configure.in,
   If you have a GNUish system, then you might try this.  Edit configure.ac,
   take a look at the large section labelled:
    "Set up the configuration based on the host platform!"
source/docs/README-psp.md
@@ -1,5 +1,5 @@
PSP
======
PSP
======
SDL port for the Sony PSP contributed by 
   Captian Lex 
source/docs/README-wince.md
@@ -1,5 +1,5 @@
WinCE
=====
WinCE
=====
Windows CE is no longer supported by SDL.
source/docs/README-winrt.md
@@ -296,7 +296,7 @@
   included, mouse-position reporting may fail if and when the cursor is
   hidden, due to possible bugs/design-oddities in Windows itself.*
To include these files:
To include these files for C/C++ projects:
1. right-click on your project (again, in Visual C++'s Solution Explorer), 
   navigate to "Add", then choose "Existing Item...".
@@ -313,11 +313,14 @@
7. change the setting for "Consume Windows Runtime Extension" to "Yes (/ZW)".
8. click the OK button.  This will close the dialog.
**NOTE: C++/CX compilation is currently required in at least one file of your 
app's project.  This is to make sure that Visual C++'s linker builds a 'Windows 
Metadata' file (.winmd) for your app.  Not doing so can lead to build errors.**
For non-C++ projects, you will need to call SDL_WinRTRunApp from your language's
main function, and generate SDL2-WinRTResources.res manually by using `rc` via
the Developer Command Prompt and including it as a <Win32Resource> within the
first <PropertyGroup> block in your Visual Studio project file.
### 6. Add app code and assets ###
source/include/SDL.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -47,6 +47,7 @@
#include "SDL_loadso.h"
#include "SDL_log.h"
#include "SDL_messagebox.h"
#include "SDL_metal.h"
#include "SDL_mutex.h"
#include "SDL_power.h"
#include "SDL_render.h"
source/include/SDL_assert.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_atomic.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -162,12 +162,29 @@
#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__GNUC__) && defined(__arm__)
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__)
#if 0 /* defined(__LINUX__) || defined(__ANDROID__) */
/* Information from:
   https://chromium.googlesource.com/chromium/chromium/+/trunk/base/atomicops_internals_arm_gcc.h#19
   The Linux kernel provides a helper function which provides the right code for a memory barrier,
   hard-coded at address 0xffff0fa0
*/
typedef void (*SDL_KernelMemoryBarrierFunc)();
#define SDL_MemoryBarrierRelease()    ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
#define SDL_MemoryBarrierAcquire()    ((SDL_KernelMemoryBarrierFunc)0xffff0fa0)()
#elif 0 /* defined(__QNXNTO__) */
#include <sys/cpuinline.h>
#define SDL_MemoryBarrierRelease()   __cpu_membarrier()
#define SDL_MemoryBarrierAcquire()   __cpu_membarrier()
#else
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) || defined(__ARM_ARCH_7EM__) || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) || defined(__ARM_ARCH_7S__) || defined(__ARM_ARCH_8A__)
#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("dmb ish" : : : "memory")
#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("dmb ish" : : : "memory")
#elif defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6T2__) || defined(__ARM_ARCH_6Z__) || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_5TE__)
#ifdef __thumb__
/* The mcr instruction isn't available in thumb mode, use real functions */
#define SDL_MEMORY_BARRIER_USES_FUNCTION
#define SDL_MemoryBarrierRelease()   SDL_MemoryBarrierReleaseFunction()
#define SDL_MemoryBarrierAcquire()   SDL_MemoryBarrierAcquireFunction()
#else
@@ -177,6 +194,7 @@
#else
#define SDL_MemoryBarrierRelease()   __asm__ __volatile__ ("" : : : "memory")
#define SDL_MemoryBarrierAcquire()   __asm__ __volatile__ ("" : : : "memory")
#endif /* __LINUX__ || __ANDROID__ */
#endif /* __GNUC__ && __arm__ */
#else
#if (defined(__SUNPRO_C) && (__SUNPRO_C >= 0x5120))
source/include/SDL_audio.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -420,23 +420,56 @@
/* @} *//* Pause audio functions */
/**
 *  This function loads a WAVE from the data source, automatically freeing
 *  that source if \c freesrc is non-zero.  For example, to load a WAVE file,
 *  you could do:
 *  \brief Load the audio data of a WAVE file into memory
 *
 *  Loading a WAVE file requires \c src, \c spec, \c audio_buf and \c audio_len
 *  to be valid pointers. The entire data portion of the file is then loaded
 *  into memory and decoded if necessary.
 *
 *  If \c freesrc is non-zero, the data source gets automatically closed and
 *  freed before the function returns.
 *
 *  Supported are RIFF WAVE files with the formats PCM (8, 16, 24, and 32 bits),
 *  IEEE Float (32 bits), Microsoft ADPCM and IMA ADPCM (4 bits), and A-law and
 *  Âµ-law (8 bits). Other formats are currently unsupported and cause an error.
 *
 *  If this function succeeds, the pointer returned by it is equal to \c spec
 *  and the pointer to the audio data allocated by the function is written to
 *  \c audio_buf and its length in bytes to \c audio_len. The \ref SDL_AudioSpec
 *  members \c freq, \c channels, and \c format are set to the values of the
 *  audio data in the buffer. The \c samples member is set to a sane default and
 *  all others are set to zero.
 *
 *  It's necessary to use SDL_FreeWAV() to free the audio data returned in
 *  \c audio_buf when it is no longer used.
 *
 *  Because of the underspecification of the Waveform format, there are many
 *  problematic files in the wild that cause issues with strict decoders. To
 *  provide compatibility with these files, this decoder is lenient in regards
 *  to the truncation of the file, the fact chunk, and the size of the RIFF
 *  chunk. The hints SDL_HINT_WAVE_RIFF_CHUNK_SIZE, SDL_HINT_WAVE_TRUNCATION,
 *  and SDL_HINT_WAVE_FACT_CHUNK can be used to tune the behavior of the
 *  loading process.
 *
 *  Any file that is invalid (due to truncation, corruption, or wrong values in
 *  the headers), too big, or unsupported causes an error. Additionally, any
 *  critical I/O error from the data source will terminate the loading process
 *  with an error. The function returns NULL on error and in all cases (with the
 *  exception of \c src being NULL), an appropriate error message will be set.
 *
 *  It is required that the data source supports seeking.
 *
 *  Example:
 *  \code
 *      SDL_LoadWAV_RW(SDL_RWFromFile("sample.wav", "rb"), 1, ...);
 *  \endcode
 *
 *  If this function succeeds, it returns the given SDL_AudioSpec,
 *  filled with the audio data format of the wave data, and sets
 *  \c *audio_buf to a malloc()'d buffer containing the audio data,
 *  and sets \c *audio_len to the length of that audio buffer, in bytes.
 *  You need to free the audio buffer with SDL_FreeWAV() when you are
 *  done with it.
 *
 *  This function returns NULL and sets the SDL error message if the
 *  wave file cannot be opened, uses an unknown data format, or is
 *  corrupt.  Currently raw and MS-ADPCM WAVE files are supported.
 *  \param src The data source with the WAVE data
 *  \param freesrc A integer value that makes the function close the data source if non-zero
 *  \param spec A pointer filled with the audio format of the audio data
 *  \param audio_buf A pointer filled with the audio data allocated by the function
 *  \param audio_len A pointer filled with the length of the audio data buffer in bytes
 *  \return NULL on error, or non-NULL on success.
 */
extern DECLSPEC SDL_AudioSpec *SDLCALL SDL_LoadWAV_RW(SDL_RWops * src,
                                                      int freesrc,
source/include/SDL_bits.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -101,6 +101,15 @@
#endif
}
SDL_FORCE_INLINE SDL_bool
SDL_HasExactlyOneBitSet32(Uint32 x)
{
    if (x && !(x & (x - 1))) {
        return SDL_TRUE;
    }
    return SDL_FALSE;
}
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
source/include/SDL_blendmode.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -50,6 +50,9 @@
    SDL_BLENDMODE_MOD = 0x00000004,      /**< color modulate
                                              dstRGB = srcRGB * dstRGB
                                              dstA = dstA */
    SDL_BLENDMODE_MUL = 0x00000008,      /**< color multiply
                                              dstRGB = (srcRGB * dstRGB) + (dstRGB * (1-srcA))
                                              dstA = (srcA * dstA) + (dstA * (1-srcA)) */
    SDL_BLENDMODE_INVALID = 0x7FFFFFFF
    /* Additional custom blend modes can be returned by SDL_ComposeCustomBlendMode() */
@@ -90,12 +93,12 @@
/**
 *  \brief Create a custom blend mode, which may or may not be supported by a given renderer
 *
 *  \param srcColorFactor
 *  \param dstColorFactor
 *  \param colorOperation
 *  \param srcAlphaFactor
 *  \param dstAlphaFactor
 *  \param alphaOperation
 *  \param srcColorFactor source color factor
 *  \param dstColorFactor destination color factor
 *  \param colorOperation color operation
 *  \param srcAlphaFactor source alpha factor
 *  \param dstAlphaFactor destination alpha factor
 *  \param alphaOperation alpha operation
 *
 *  The result of the blend mode operation will be:
 *      dstRGB = dstRGB * dstColorFactor colorOperation srcRGB * srcColorFactor
source/include/SDL_clipboard.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_config.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_config.h.cmake
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -96,7 +96,10 @@
#cmakedefine HAVE_WCSLEN 1
#cmakedefine HAVE_WCSLCPY 1
#cmakedefine HAVE_WCSLCAT 1
#cmakedefine HAVE_WCSDUP 1
#cmakedefine HAVE_WCSSTR 1
#cmakedefine HAVE_WCSCMP 1
#cmakedefine HAVE_WCSNCMP 1
#cmakedefine HAVE_STRLEN 1
#cmakedefine HAVE_STRLCPY 1
#cmakedefine HAVE_STRLCAT 1
@@ -108,6 +111,8 @@
#cmakedefine HAVE_STRCHR 1
#cmakedefine HAVE_STRRCHR 1
#cmakedefine HAVE_STRSTR 1
#cmakedefine HAVE_STRTOK_R 1
#cmakedefine HAVE_STRTOK_S 1
#cmakedefine HAVE_ITOA 1
#cmakedefine HAVE__LTOA 1
#cmakedefine HAVE__UITOA 1
@@ -127,6 +132,7 @@
#cmakedefine HAVE_STRCASECMP 1
#cmakedefine HAVE__STRNICMP 1
#cmakedefine HAVE_STRNCASECMP 1
#cmakedefine HAVE_SSCANF 1
#cmakedefine HAVE_VSSCANF 1
#cmakedefine HAVE_VSNPRINTF 1
#cmakedefine HAVE_M_PI 1
@@ -184,6 +190,7 @@
#cmakedefine HAVE_SEM_TIMEDWAIT 1
#cmakedefine HAVE_GETAUXVAL 1
#cmakedefine HAVE_POLL 1
#cmakedefine HAVE__EXIT 1
#elif __WIN32__
#cmakedefine HAVE_STDARG_H 1
@@ -210,7 +217,6 @@
#cmakedefine HAVE_XINPUT_H @HAVE_XINPUT_H@
#cmakedefine HAVE_DXGI_H @HAVE_DXGI_H@
#cmakedefine HAVE_ENDPOINTVOLUME_H @HAVE_ENDPOINTVOLUME_H@
#cmakedefine HAVE_MMDEVICEAPI_H @HAVE_MMDEVICEAPI_H@
#cmakedefine HAVE_AUDIOCLIENT_H @HAVE_AUDIOCLIENT_H@
@@ -285,6 +291,7 @@
#cmakedefine SDL_JOYSTICK_WINMM @SDL_JOYSTICK_WINMM@
#cmakedefine SDL_JOYSTICK_USBHID @SDL_JOYSTICK_USBHID@
#cmakedefine SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H @SDL_JOYSTICK_USBHID_MACHINE_JOYSTICK_H@
#cmakedefine SDL_JOYSTICK_HIDAPI @SDL_JOYSTICK_HIDAPI@
#cmakedefine SDL_JOYSTICK_EMSCRIPTEN @SDL_JOYSTICK_EMSCRIPTEN@
#cmakedefine SDL_HAPTIC_DUMMY @SDL_HAPTIC_DUMMY@
#cmakedefine SDL_HAPTIC_LINUX @SDL_HAPTIC_LINUX@
@@ -292,9 +299,11 @@
#cmakedefine SDL_HAPTIC_DINPUT @SDL_HAPTIC_DINPUT@
#cmakedefine SDL_HAPTIC_XINPUT @SDL_HAPTIC_XINPUT@
#cmakedefine SDL_HAPTIC_ANDROID @SDL_HAPTIC_ANDROID@
#cmakedefine SDL_LIBUSB_DYNAMIC @SDL_LIBUSB_DYNAMIC@
/* Enable various sensor drivers */
#cmakedefine SDL_SENSOR_ANDROID @SDL_SENSOR_ANDROID@
#cmakedefine SDL_SENSOR_COREMOTION @SDL_SENSOR_COREMOTION@
#cmakedefine SDL_SENSOR_DUMMY @SDL_SENSOR_DUMMY@
/* Enable various shared object loading systems */
@@ -320,9 +329,11 @@
#cmakedefine SDL_VIDEO_DRIVER_ANDROID @SDL_VIDEO_DRIVER_ANDROID@
#cmakedefine SDL_VIDEO_DRIVER_HAIKU @SDL_VIDEO_DRIVER_HAIKU@
#cmakedefine SDL_VIDEO_DRIVER_COCOA @SDL_VIDEO_DRIVER_COCOA@
#cmakedefine SDL_VIDEO_DRIVER_UIKIT @SDL_VIDEO_DRIVER_UIKIT@
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB @SDL_VIDEO_DRIVER_DIRECTFB@
#cmakedefine SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC @SDL_VIDEO_DRIVER_DIRECTFB_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_DUMMY @SDL_VIDEO_DRIVER_DUMMY@
#cmakedefine SDL_VIDEO_DRIVER_OFFSCREEN @SDL_VIDEO_DRIVER_OFFSCREEN@
#cmakedefine SDL_VIDEO_DRIVER_WINDOWS @SDL_VIDEO_DRIVER_WINDOWS@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND @SDL_VIDEO_DRIVER_WAYLAND@
#cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@
@@ -339,9 +350,6 @@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR@
#cmakedefine SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_MIR @SDL_VIDEO_DRIVER_MIR@
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC @SDL_VIDEO_DRIVER_MIR_DYNAMIC@
#cmakedefine SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON @SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON@
#cmakedefine SDL_VIDEO_DRIVER_EMSCRIPTEN @SDL_VIDEO_DRIVER_EMSCRIPTEN@
#cmakedefine SDL_VIDEO_DRIVER_X11 @SDL_VIDEO_DRIVER_X11@
#cmakedefine SDL_VIDEO_DRIVER_X11_DYNAMIC @SDL_VIDEO_DRIVER_X11_DYNAMIC@
@@ -388,11 +396,15 @@
/* Enable Vulkan support */
#cmakedefine SDL_VIDEO_VULKAN @SDL_VIDEO_VULKAN@
/* Enable Metal support */
#cmakedefine SDL_VIDEO_METAL @SDL_VIDEO_METAL@
/* Enable system power support */
#cmakedefine SDL_POWER_ANDROID @SDL_POWER_ANDROID@
#cmakedefine SDL_POWER_LINUX @SDL_POWER_LINUX@
#cmakedefine SDL_POWER_WINDOWS @SDL_POWER_WINDOWS@
#cmakedefine SDL_POWER_MACOSX @SDL_POWER_MACOSX@
#cmakedefine SDL_POWER_UIKIT @SDL_POWER_UIKIT@
#cmakedefine SDL_POWER_HAIKU @SDL_POWER_HAIKU@
#cmakedefine SDL_POWER_EMSCRIPTEN @SDL_POWER_EMSCRIPTEN@
#cmakedefine SDL_POWER_HARDWIRED @SDL_POWER_HARDWIRED@
@@ -409,11 +421,16 @@
/* Enable assembly routines */
#cmakedefine SDL_ASSEMBLY_ROUTINES @SDL_ASSEMBLY_ROUTINES@
#cmakedefine SDL_ALTIVEC_BLITTERS @SDL_ALTIVEC_BLITTERS@
#cmakedefine SDL_ARM_SIMD_BLITTERS @SDL_ARM_SIMD_BLITTERS@
#cmakedefine SDL_ARM_NEON_BLITTERS @SDL_ARM_NEON_BLITTERS@
/* Enable dynamic libsamplerate support */
#cmakedefine SDL_LIBSAMPLERATE_DYNAMIC @SDL_LIBSAMPLERATE_DYNAMIC@
/* Platform specific definitions */
#cmakedefine SDL_IPHONE_KEYBOARD @SDL_IPHONE_KEYBOARD@
#cmakedefine SDL_IPHONE_LAUNCHSCREEN @SDL_IPHONE_LAUNCHSCREEN@
#if !defined(__WIN32__)
#  if !defined(_STDINT_H_) && !defined(_STDINT_H) && !defined(HAVE_STDINT_H) && !defined(_HAVE_STDINT_H)
typedef unsigned int size_t;
source/include/SDL_config.h.in
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -99,7 +99,10 @@
#undef HAVE_WCSLEN
#undef HAVE_WCSLCPY
#undef HAVE_WCSLCAT
#undef HAVE_WCSDUP
#undef HAVE_WCSSTR
#undef HAVE_WCSCMP
#undef HAVE_WCSNCMP
#undef HAVE_STRLEN
#undef HAVE_STRLCPY
#undef HAVE_STRLCAT
@@ -111,6 +114,8 @@
#undef HAVE_STRCHR
#undef HAVE_STRRCHR
#undef HAVE_STRSTR
#undef HAVE_STRTOK_R
#undef HAVE_STRTOK_S
#undef HAVE_ITOA
#undef HAVE__LTOA
#undef HAVE__UITOA
@@ -189,6 +194,7 @@
#undef HAVE_SEM_TIMEDWAIT
#undef HAVE_GETAUXVAL
#undef HAVE_POLL
#undef HAVE__EXIT
#else
#define HAVE_STDARG_H   1
@@ -209,7 +215,6 @@
#undef HAVE_DSOUND_H
#undef HAVE_DXGI_H
#undef HAVE_XINPUT_H
#undef HAVE_ENDPOINTVOLUME_H
#undef HAVE_MMDEVICEAPI_H
#undef HAVE_AUDIOCLIENT_H
#undef HAVE_XINPUT_GAMEPAD_EX
@@ -327,9 +332,6 @@
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_EGL
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_CURSOR
#undef SDL_VIDEO_DRIVER_WAYLAND_DYNAMIC_XKBCOMMON
#undef SDL_VIDEO_DRIVER_MIR
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC
#undef SDL_VIDEO_DRIVER_MIR_DYNAMIC_XKBCOMMON
#undef SDL_VIDEO_DRIVER_X11
#undef SDL_VIDEO_DRIVER_RPI
#undef SDL_VIDEO_DRIVER_KMSDRM
@@ -385,6 +387,9 @@
/* Enable Vulkan support */
#undef SDL_VIDEO_VULKAN
/* Enable Metal support */
#undef SDL_VIDEO_METAL
/* Enable system power support */
#undef SDL_POWER_LINUX
#undef SDL_POWER_WINDOWS
@@ -407,6 +412,8 @@
/* Enable assembly routines */
#undef SDL_ASSEMBLY_ROUTINES
#undef SDL_ALTIVEC_BLITTERS
#undef SDL_ARM_SIMD_BLITTERS
#undef SDL_ARM_NEON_BLITTERS
/* Enable ime support */
#undef SDL_USE_IME
@@ -414,6 +421,9 @@
/* Enable dynamic udev support */
#undef SDL_UDEV_DYNAMIC
/* Enable dynamic libusb support */
#undef SDL_LIBUSB_DYNAMIC
/* Enable dynamic libsamplerate support */
#undef SDL_LIBSAMPLERATE_DYNAMIC
source/include/SDL_config_android.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -71,6 +71,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR    1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL    1
#define HAVE_STRTOLL    1
@@ -130,6 +131,7 @@
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_ANDROID    1
#define SDL_AUDIO_DRIVER_OPENSLES   1
#define SDL_AUDIO_DRIVER_DUMMY  1
/* Enable various input drivers */
source/include/SDL_config_iphoneos.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -71,6 +71,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR    1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL    1
#define HAVE_STRTOLL    1
@@ -137,7 +138,7 @@
/* Enable MFi joystick support */
#define SDL_JOYSTICK_MFI 1
/*#define SDL_JOYSTICK_HIDAPI 1*/
#define SDL_JOYSTICK_HIDAPI 1
#ifdef __TVOS__
#define SDL_SENSOR_DUMMY    1
@@ -181,6 +182,10 @@
#define SDL_VIDEO_VULKAN 1
#endif
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_METAL 1
#endif
/* Enable system power support */
#define SDL_POWER_UIKIT 1
source/include/SDL_config_macosx.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -74,6 +74,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR    1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL    1
#define HAVE_STRTOLL    1
@@ -130,6 +131,8 @@
#define HAVE_SYSCONF    1
#define HAVE_SYSCTLBYNAME 1
#define HAVE_GCC_ATOMICS 1
/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_COREAUDIO  1
#define SDL_AUDIO_DRIVER_DISK   1
@@ -157,13 +160,13 @@
#define SDL_VIDEO_DRIVER_COCOA  1
#define SDL_VIDEO_DRIVER_DUMMY  1
#undef SDL_VIDEO_DRIVER_X11
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/opt/X11/lib/libX11.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/opt/X11/lib/libXext.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/opt/X11/lib/libXinerama.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/opt/X11/lib/libXi.6.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/opt/X11/lib/libXrandr.2.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/opt/X11/lib/libXss.1.dylib"
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/opt/X11/lib/libXxf86vm.1.dylib"
#define SDL_VIDEO_DRIVER_X11_XDBE 1
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
@@ -191,9 +194,15 @@
#define SDL_VIDEO_RENDER_OGL_ES2 1
#endif
#ifndef SDL_VIDEO_RENDER_METAL
/* Metal only supported on 64-bit architectures with 10.11+ */
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
#define SDL_PLATFORM_SUPPORTS_METAL    1
#else
#define SDL_PLATFORM_SUPPORTS_METAL    0
#endif
#ifndef SDL_VIDEO_RENDER_METAL
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_RENDER_METAL    1
#else
#define SDL_VIDEO_RENDER_METAL    0
@@ -217,13 +226,22 @@
#define SDL_VIDEO_OPENGL_GLX    1
#endif
/* Enable Vulkan support */
/* Metal/MoltenVK/Vulkan only supported on 64-bit architectures with 10.11+ */
#if TARGET_CPU_X86_64 && (MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
/* Enable Vulkan and Metal support */
#ifndef SDL_VIDEO_VULKAN
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_VULKAN 1
#else
#define SDL_VIDEO_VULKAN 0
#endif
#endif
#ifndef SDL_VIDEO_METAL
#if SDL_PLATFORM_SUPPORTS_METAL
#define SDL_VIDEO_METAL 1
#else
#define SDL_VIDEO_METAL 0
#endif
#endif
/* Enable system power support */
#define SDL_POWER_MACOSX 1
source/include/SDL_config_minimal.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_config_os2.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -110,6 +110,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
/* #undef HAVE_STRTOK_R */
#define HAVE_ITOA 1
#define HAVE__LTOA 1
#define HAVE__ULTOA 1
@@ -122,12 +123,21 @@
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_WCSLEN 1
#define HAVE_WCSLCPY 1
#define HAVE_WCSLCAT 1
/* #define HAVE_WCSDUP 1 */
/* #define wcsdup _wcsdup */
#define HAVE_WCSSTR 1
#define HAVE_WCSCMP 1
#define HAVE_WCSNCMP 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRICMP 1
#define HAVE_STRCASECMP 1
#define HAVE_STRNCASECMP 1
#define HAVE_SSCANF 1
#define HAVE_VSSCANF 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_SETJMP 1
source/include/SDL_config_pandora.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_config_psp.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_config_windows.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -84,7 +84,6 @@
#define HAVE_XINPUT_H 1
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_ENDPOINTVOLUME_H 1
/* This is disabled by default to avoid C runtime dependencies and manifest requirements */
#ifdef HAVE_LIBC
@@ -118,6 +117,10 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
/* #undef HAVE_STRTOK_R */
#if defined(_MSC_VER)
#define HAVE_STRTOK_S 1
#endif
/* These functions have security warnings, so we won't use them */
/* #undef HAVE__LTOA */
/* #undef HAVE__ULTOA */
source/include/SDL_config_winrt.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -100,7 +100,6 @@
#define HAVE_MMDEVICEAPI_H 1
#define HAVE_AUDIOCLIENT_H 1
#define HAVE_ENDPOINTVOLUME_H 1
#define HAVE_LIBC 1
#define STDC_HEADERS 1
@@ -131,6 +130,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_S 1
//#define HAVE_ITOA 1   // TODO, WinRT: consider using _itoa_s instead
//#define HAVE__LTOA 1  // TODO, WinRT: consider using _ltoa_s instead
//#define HAVE__ULTOA 1 // TODO, WinRT: consider using _ultoa_s instead
source/include/SDL_config_wiz.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -67,6 +67,7 @@
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOK_R 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1
source/include/SDL_copying.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_cpuinfo.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -41,24 +41,43 @@
#else
#include <intrin.h>
#ifndef _WIN64
#ifndef __MMX__
#define __MMX__
#endif
#ifndef __3dNOW__
#define __3dNOW__
#endif
#endif
#ifndef __SSE__
#define __SSE__
#endif
#ifndef __SSE2__
#define __SSE2__
#endif
#endif /* __clang__ */
#elif defined(__MINGW64_VERSION_MAJOR)
#include <intrin.h>
#else
#ifdef __ALTIVEC__
#if defined(HAVE_ALTIVEC_H) && !defined(__APPLE_ALTIVEC__) && !defined(SDL_DISABLE_ALTIVEC_H)
/* altivec.h redefining bool causes a number of problems, see bugs 3993 and 4392, so you need to explicitly define SDL_ENABLE_ALTIVEC_H to have it included. */
#if defined(HAVE_ALTIVEC_H) && defined(__ALTIVEC__) && !defined(__APPLE_ALTIVEC__) && defined(SDL_ENABLE_ALTIVEC_H)
#include <altivec.h>
#undef pixel
#undef bool
#endif
#endif
#if defined(__ARM_NEON__) && !defined(SDL_DISABLE_ARM_NEON_H)
#include <arm_neon.h>
#if !defined(SDL_DISABLE_ARM_NEON_H)
#  if defined(__ARM_NEON)
#    include <arm_neon.h>
#  elif defined(__WINDOWS__) || defined(__WINRT__)
/* Visual Studio doesn't define __ARM_ARCH, but _M_ARM (if set, always 7), and _M_ARM64 (if set, always 1). */
#    if defined(_M_ARM)
#      include <armintr.h>
#      include <arm_neon.h>
#      define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
#    endif
#    if defined (_M_ARM64)
#      include <arm64intr.h>
#      include <arm64_neon.h>
#      define __ARM_NEON 1 /* Set __ARM_NEON so that it can be used elsewhere, at compile time */
#    endif
#  endif
#endif
#if defined(__3dNOW__) && !defined(SDL_DISABLE_MM3DNOW_H)
#include <mm3dnow.h>
@@ -168,6 +187,11 @@
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX512F(void);
/**
 *  This function returns true if the CPU has ARM SIMD (ARMv6) features.
 */
extern DECLSPEC SDL_bool SDLCALL SDL_HasARMSIMD(void);
/**
 *  This function returns true if the CPU has NEON (ARM SIMD) features.
 */
extern DECLSPEC SDL_bool SDLCALL SDL_HasNEON(void);
@@ -177,6 +201,69 @@
 */
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
/**
 * \brief Report the alignment this system needs for SIMD allocations.
 *
 * This will return the minimum number of bytes to which a pointer must be
 *  aligned to be compatible with SIMD instructions on the current machine.
 *  For example, if the machine supports SSE only, it will return 16, but if
 *  it supports AVX-512F, it'll return 64 (etc). This only reports values for
 *  instruction sets SDL knows about, so if your SDL build doesn't have
 *  SDL_HasAVX512F(), then it might return 16 for the SSE support it sees and
 *  not 64 for the AVX-512 instructions that exist but SDL doesn't know about.
 *  Plan accordingly.
 */
extern DECLSPEC size_t SDLCALL SDL_SIMDGetAlignment(void);
/**
 * \brief Allocate memory in a SIMD-friendly way.
 *
 * This will allocate a block of memory that is suitable for use with SIMD
 *  instructions. Specifically, it will be properly aligned and padded for
 *  the system's supported vector instructions.
 *
 * The memory returned will be padded such that it is safe to read or write
 *  an incomplete vector at the end of the memory block. This can be useful
 *  so you don't have to drop back to a scalar fallback at the end of your
 *  SIMD processing loop to deal with the final elements without overflowing
 *  the allocated buffer.
 *
 * You must free this memory with SDL_FreeSIMD(), not free() or SDL_free()
 *  or delete[], etc.
 *
 * Note that SDL will only deal with SIMD instruction sets it is aware of;
 *  for example, SDL 2.0.8 knows that SSE wants 16-byte vectors
 *  (SDL_HasSSE()), and AVX2 wants 32 bytes (SDL_HasAVX2()), but doesn't
 *  know that AVX-512 wants 64. To be clear: if you can't decide to use an
 *  instruction set with an SDL_Has*() function, don't use that instruction
 *  set with memory allocated through here.
 *
 * SDL_AllocSIMD(0) will return a non-NULL pointer, assuming the system isn't
 *  out of memory.
 *
 *  \param len The length, in bytes, of the block to allocated. The actual
 *             allocated block might be larger due to padding, etc.
 * \return Pointer to newly-allocated block, NULL if out of memory.
 *
 * \sa SDL_SIMDAlignment
 * \sa SDL_SIMDFree
 */
extern DECLSPEC void * SDLCALL SDL_SIMDAlloc(const size_t len);
/**
 * \brief Deallocate memory obtained from SDL_SIMDAlloc
 *
 * It is not valid to use this function on a pointer from anything but
 *  SDL_SIMDAlloc(). It can't be used on pointers from malloc, realloc,
 *  SDL_malloc, memalign, new[], etc.
 *
 * However, SDL_SIMDFree(NULL) is a legal no-op.
 *
 * \sa SDL_SIMDAlloc
 */
extern DECLSPEC void SDLCALL SDL_SIMDFree(void *ptr);
/* vi: set ts=4 sw=4 expandtab: */
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
source/include/SDL_egl.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -390,6 +390,9 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#ifndef NOMINMAX   /* don't define min() and max(). */
#define NOMINMAX
#endif
#include <windows.h>
#if __WINRT__
source/include/SDL_endian.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -42,10 +42,13 @@
#ifdef __linux__
#include <endian.h>
#define SDL_BYTEORDER  __BYTE_ORDER
#else /* __linux__ */
#elif defined(__OpenBSD__)
#include <endian.h>
#define SDL_BYTEORDER  BYTE_ORDER
#else
#if defined(__hppa__) || \
    defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || \
    (defined(__MIPS__) && defined(__MISPEB__)) || \
    (defined(__MIPS__) && defined(__MIPSEB__)) || \
    defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || \
    defined(__sparc__)
#define SDL_BYTEORDER   SDL_BIG_ENDIAN
source/include/SDL_error.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_events.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -442,6 +442,7 @@
    float dx;           /**< Normalized in the range -1...1 */
    float dy;           /**< Normalized in the range -1...1 */
    float pressure;     /**< Normalized in the range 0...1 */
    Uint32 windowID;    /**< The window underneath the finger, if any */
} SDL_TouchFingerEvent;
@@ -558,7 +559,7 @@
{
    Uint32 type;                    /**< Event type, shared with all events */
    SDL_CommonEvent common;         /**< Common event data */
    SDL_DisplayEvent display;       /**< Window event data */
    SDL_DisplayEvent display;       /**< Display event data */
    SDL_WindowEvent window;         /**< Window event data */
    SDL_KeyboardEvent key;          /**< Keyboard event data */
    SDL_TextEditingEvent edit;      /**< Text editing event data */
@@ -594,6 +595,9 @@
    Uint8 padding[56];
} SDL_Event;
/* Make sure we haven't broken binary compatibility */
SDL_COMPILE_TIME_ASSERT(SDL_Event, sizeof(SDL_Event) == 56);
/* Function prototypes */
source/include/SDL_filesystem.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_gamecontroller.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -57,6 +57,15 @@
struct _SDL_GameController;
typedef struct _SDL_GameController SDL_GameController;
typedef enum
{
    SDL_CONTROLLER_TYPE_UNKNOWN = 0,
    SDL_CONTROLLER_TYPE_XBOX360,
    SDL_CONTROLLER_TYPE_XBOXONE,
    SDL_CONTROLLER_TYPE_PS3,
    SDL_CONTROLLER_TYPE_PS4,
    SDL_CONTROLLER_TYPE_NINTENDO_SWITCH_PRO
} SDL_GameControllerType;
typedef enum
{
@@ -176,6 +185,12 @@
extern DECLSPEC const char *SDLCALL SDL_GameControllerNameForIndex(int joystick_index);
/**
 *  Get the type of a game controller.
 *  This can be called before any controllers are opened.
 */
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerTypeForIndex(int joystick_index);
/**
 *  Get the mapping of a game controller.
 *  This can be called before any controllers are opened.
 *
@@ -200,9 +215,19 @@
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromInstanceID(SDL_JoystickID joyid);
/**
 * Return the SDL_GameController associated with a player index.
 */
extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerFromPlayerIndex(int player_index);
/**
 *  Return the name for this currently opened controller
 */
extern DECLSPEC const char *SDLCALL SDL_GameControllerName(SDL_GameController *gamecontroller);
/**
 *  Return the type of this currently opened controller
 */
extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_GameController *gamecontroller);
/**
 *  Get the player index of an opened game controller, or -1 if it's not available
@@ -212,6 +237,11 @@
extern DECLSPEC int SDLCALL SDL_GameControllerGetPlayerIndex(SDL_GameController *gamecontroller);
/**
 *  Set the player index of an opened game controller
 */
extern DECLSPEC void SDLCALL SDL_GameControllerSetPlayerIndex(SDL_GameController *gamecontroller, int player_index);
/**
 *  Get the USB vendor ID of an opened controller, if available.
 *  If the vendor ID isn't available this function returns 0.
 */
source/include/SDL_gesture.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_haptic.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_hints.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -165,6 +165,21 @@
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER    "SDL_VIDEO_ALLOW_SCREENSAVER"
/**
 * \brief A variable controlling whether the graphics context is externally managed.
 *
 * This variable can be set to the following values:
 *  "0"         - SDL will manage graphics contexts that are attached to windows.
 *  "1"         - Disable graphics context management on windows.
 *
 * By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
 * context will be automatically saved and restored when pausing the application. Additionally, some
 * platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
 * behavior, which is desireable when the application manages the graphics context, such as
 * an externally managed OpenGL context or attaching a Vulkan surface to the window.
 */
#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT    "SDL_VIDEO_EXTERNAL_CONTEXT"
/**
 *  \brief  A variable controlling whether the X11 VidMode extension should be used.
 *
 *  This variable can be set to the following values:
@@ -198,6 +213,12 @@
#define SDL_HINT_VIDEO_X11_XRANDR           "SDL_VIDEO_X11_XRANDR"
/**
 *  \brief  A variable forcing the visual ID chosen for new X11 windows
 *
 */
#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID      "SDL_VIDEO_X11_WINDOW_VISUALID"
/**
 *  \brief  A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
 *
 *  This variable can be set to the following values:
@@ -222,6 +243,17 @@
 * 
 */
#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
/**
 * \brief A variable controlling whether X11 should use GLX or EGL by default
 *
 * This variable can be set to the following values:
 * "0" - Use GLX
 * "1" - Use EGL
 *
 * By default SDL will use GLX when both are present.
 */
#define SDL_HINT_VIDEO_X11_FORCE_EGL "SDL_VIDEO_X11_FORCE_EGL"
/**
 *  \brief  A variable controlling whether the window frame and title bar are interactive when the cursor is hidden 
@@ -314,6 +346,16 @@
 *  By default SDL will generate mouse events for touch events
 */
#define SDL_HINT_TOUCH_MOUSE_EVENTS    "SDL_TOUCH_MOUSE_EVENTS"
/**
 *  \brief  A variable controlling whether mouse events should generate synthetic touch events
 *
 *  This variable can be set to the following values:
 *    "0"       - Mouse events will not generate touch events (default for desktop platforms)
 *    "1"       - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
 */
#define SDL_HINT_MOUSE_TOUCH_EVENTS    "SDL_MOUSE_TOUCH_EVENTS"
/**
 *  \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
@@ -427,6 +469,24 @@
#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
/**
 *  \brief  A variable that overrides the automatic controller type detection
 *
 *  The variable should be comma separated entries, in the form: VID/PID=type
 *
 *  The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
 *
 *  The type should be one of:
 *      Xbox360
 *      XboxOne
 *      PS3
 *      PS4
 *      SwitchPro
 *
 *  This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
 */
#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
/**
 *  \brief  A variable that lets you manually hint extra gamecontroller db entries.
 *
 *  The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
@@ -435,6 +495,16 @@
 *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
 */
#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
/**
 *  \brief  A variable that lets you provide a file with extra gamecontroller db entries.
 *
 *  The file should contain lines of gamecontroller config data, see SDL_gamecontroller.h
 *
 *  This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
 *  You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
 */
#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
/**
 *  \brief  A variable containing a list of devices to skip when scanning for game controllers.
@@ -461,6 +531,29 @@
 *  file will be loaded and interpreted as the value of the variable.
 */
#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
/**
 *  \brief  If set, game controller face buttons report their values according to their labels instead of their positional layout.
 *
 *  For example, on Nintendo Switch controllers, normally you'd get:
 *
 *      (Y)
 *  (X)     (B)
 *      (A)
 *
 *  but if this hint is set, you'll get:
 *
 *      (X)
 *  (Y)     (A)
 *      (B)
 *
 *  The variable can be set to the following values:
 *    "0"       - Report the face buttons by position, as though they were on an Xbox controller.
 *    "1"       - Report the face buttons by label instead of position
 *
 *  The default value is "1".  This hint may be set at any time.
 */
#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
/**
 *  \brief  A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
@@ -544,6 +637,17 @@
 *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI
 */
#define SDL_HINT_JOYSTICK_HIDAPI_XBOX   "SDL_JOYSTICK_HIDAPI_XBOX"
/**
 *  \brief  A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
 *
 *  This variable can be set to the following values:
 *    "0"       - HIDAPI driver is not used
 *    "1"       - HIDAPI driver is used
 *
 *  The default is the value of SDL_HINT_JOYSTICK_HIDAPI
 */
#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
/**
 *  \brief  A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
@@ -837,18 +941,6 @@
#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
 /**
 * \brief A variable to control whether mouse and touch events are to be treated together or separately
 *
 * The variable can be set to the following values:
 *   "0"       - Mouse events will be handled as touch events, and touch will raise fake mouse
 *               events. This is the behaviour of SDL <= 2.0.3. (default)
 *   "1"       - Mouse events will be handled separately from pure touch events.
 *
 * The value of this hint is used at runtime, so it can be changed at any time.
 */
#define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
 /**
 * \brief A variable to control whether we trap the Android back button to handle it manually.
 *        This is necessary for the right mouse button to work on some Android devices, or
 *        to be able to trap the back button for use in your code reliably.  If set to true,
@@ -864,6 +956,17 @@
 * The value of this hint is used at runtime, so it can be changed at any time.
 */
#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
 /**
 * \brief A variable to control whether the event loop will block itself when the app is paused.
 *
 * The variable can be set to the following values:
 *   "0"       - Non blocking.
 *   "1"       - Blocking. (default)
 *
 * The value should be set before SDL is initialized.
 */
#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
 /**
 * \brief A variable to control whether the return key on the soft keyboard
@@ -1044,6 +1147,132 @@
#define SDL_HINT_AUDIO_CATEGORY   "SDL_AUDIO_CATEGORY"
/**
 *  \brief  A variable controlling whether the 2D render API is compatible or efficient.
 *
 *  This variable can be set to the following values:
 *
 *    "0"     - Don't use batching to make rendering more efficient.
 *    "1"     - Use batching, but might cause problems if app makes its own direct OpenGL calls.
 *
 *  Up to SDL 2.0.9, the render API would draw immediately when requested. Now
 *  it batches up draw requests and sends them all to the GPU only when forced
 *  to (during SDL_RenderPresent, when changing render targets, by updating a
 *  texture that the batch needs, etc). This is significantly more efficient,
 *  but it can cause problems for apps that expect to render on top of the
 *  render API's output. As such, SDL will disable batching if a specific
 *  render backend is requested (since this might indicate that the app is
 *  planning to use the underlying graphics API directly). This hint can
 *  be used to explicitly request batching in this instance. It is a contract
 *  that you will either never use the underlying graphics API directly, or
 *  if you do, you will call SDL_RenderFlush() before you do so any current
 *  batch goes to the GPU before your work begins. Not following this contract
 *  will result in undefined behavior.
 */
#define SDL_HINT_RENDER_BATCHING  "SDL_RENDER_BATCHING"
/**
 *  \brief  A variable controlling whether SDL logs all events pushed onto its internal queue.
 *
 *  This variable can be set to the following values:
 *
 *    "0"     - Don't log any events (default)
 *    "1"     - Log all events except mouse and finger motion, which are pretty spammy.
 *    "2"     - Log all events.
 *
 *  This is generally meant to be used to debug SDL itself, but can be useful
 *  for application developers that need better visibility into what is going
 *  on in the event queue. Logged events are sent through SDL_Log(), which
 *  means by default they appear on stdout on most platforms or maybe
 *  OutputDebugString() on Windows, and can be funneled by the app with
 *  SDL_LogSetOutputFunction(), etc.
 *
 *  This hint can be toggled on and off at runtime, if you only need to log
 *  events for a small subset of program execution.
 */
#define SDL_HINT_EVENT_LOGGING   "SDL_EVENT_LOGGING"
/**
 *  \brief  Controls how the size of the RIFF chunk affects the loading of a WAVE file.
 *
 *  The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
 *  file) is not always reliable. In case the size is wrong, it's possible to
 *  just ignore it and step through the chunks until a fixed limit is reached.
 *
 *  Note that files that have trailing data unrelated to the WAVE file or
 *  corrupt files may slow down the loading process without a reliable boundary.
 *  By default, SDL stops after 10000 chunks to prevent wasting time. Use the
 *  environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
 *
 *  This variable can be set to the following values:
 *
 *    "force"        - Always use the RIFF chunk size as a boundary for the chunk search
 *    "ignorezero"   - Like "force", but a zero size searches up to 4 GiB (default)
 *    "ignore"       - Ignore the RIFF chunk size and always search up to 4 GiB
 *    "maximum"      - Search for chunks until the end of file (not recommended)
 */
#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE   "SDL_WAVE_RIFF_CHUNK_SIZE"
/**
 *  \brief  Controls how a truncated WAVE file is handled.
 *
 *  A WAVE file is considered truncated if any of the chunks are incomplete or
 *  the data chunk size is not a multiple of the block size. By default, SDL
 *  decodes until the first incomplete block, as most applications seem to do.
 *
 *  This variable can be set to the following values:
 *
 *    "verystrict" - Raise an error if the file is truncated
 *    "strict"     - Like "verystrict", but the size of the RIFF chunk is ignored
 *    "dropframe"  - Decode until the first incomplete sample frame
 *    "dropblock"  - Decode until the first incomplete block (default)
 */
#define SDL_HINT_WAVE_TRUNCATION   "SDL_WAVE_TRUNCATION"
/**
 *  \brief  Controls how the fact chunk affects the loading of a WAVE file.
 *
 *  The fact chunk stores information about the number of samples of a WAVE
 *  file. The Standards Update from Microsoft notes that this value can be used
 *  to 'determine the length of the data in seconds'. This is especially useful
 *  for compressed formats (for which this is a mandatory chunk) if they produce
 *  multiple sample frames per block and truncating the block is not allowed.
 *  The fact chunk can exactly specify how many sample frames there should be
 *  in this case.
 *
 *  Unfortunately, most application seem to ignore the fact chunk and so SDL
 *  ignores it by default as well.
 *
 *  This variable can be set to the following values:
 *
 *    "truncate"    - Use the number of samples to truncate the wave data if
 *                    the fact chunk is present and valid
 *    "strict"      - Like "truncate", but raise an error if the fact chunk
 *                    is invalid, not present for non-PCM formats, or if the
 *                    data chunk doesn't have that many samples
 *    "ignorezero"  - Like "truncate", but ignore fact chunk if the number of
 *                    samples is zero
 *    "ignore"      - Ignore fact chunk entirely (default)
 */
#define SDL_HINT_WAVE_FACT_CHUNK   "SDL_WAVE_FACT_CHUNK"
/*
 *  \brief Override for SDL_GetDisplayUsableBounds()
 *
 *  If set, this hint will override the expected results for
 *  SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
 *  to do this, but this allows an embedded system to request that some of the
 *  screen be reserved for other uses when paired with a well-behaved
 *  application.
 *
 *  The contents of this hint must be 4 comma-separated integers, the first
 *  is the bounds x, then y, width and height, in that order.
 */
#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
/**
 *  \brief  An enumeration of hint priorities
 */
typedef enum
source/include/SDL_joystick.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -192,7 +192,12 @@
/**
 * Return the SDL_Joystick associated with an instance id.
 */
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID joyid);
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromInstanceID(SDL_JoystickID instance_id);
/**
 * Return the SDL_Joystick associated with a player index.
 */
extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickFromPlayerIndex(int player_index);
/**
 *  Return the name for this currently opened joystick.
@@ -208,6 +213,11 @@
extern DECLSPEC int SDLCALL SDL_JoystickGetPlayerIndex(SDL_Joystick * joystick);
/**
 *  Set the player index of an opened joystick
 */
extern DECLSPEC void SDLCALL SDL_JoystickSetPlayerIndex(SDL_Joystick * joystick, int player_index);
/**
 *  Return the GUID for this opened joystick
 */
extern DECLSPEC SDL_JoystickGUID SDLCALL SDL_JoystickGetGUID(SDL_Joystick * joystick);
source/include/SDL_keyboard.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_keycode.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -47,7 +47,7 @@
#define SDLK_SCANCODE_MASK (1<<30)
#define SDL_SCANCODE_TO_KEYCODE(X)  (X | SDLK_SCANCODE_MASK)
enum
typedef enum
{
    SDLK_UNKNOWN = 0,
@@ -317,7 +317,7 @@
    SDLK_AUDIOREWIND = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOREWIND),
    SDLK_AUDIOFASTFORWARD = SDL_SCANCODE_TO_KEYCODE(SDL_SCANCODE_AUDIOFASTFORWARD)
};
} SDL_KeyCode;
/**
 * \brief Enumeration of valid key mods (possibly OR'd together).
source/include/SDL_loadso.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_log.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -61,7 +61,7 @@
 *  at the VERBOSE level and all other categories are enabled at the
 *  CRITICAL level.
 */
enum
typedef enum
{
    SDL_LOG_CATEGORY_APPLICATION,
    SDL_LOG_CATEGORY_ERROR,
@@ -94,7 +94,7 @@
       };
     */
    SDL_LOG_CATEGORY_CUSTOM
};
} SDL_LogCategory;
/**
 *  \brief The predefined log priorities
source/include/SDL_main.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -55,6 +55,10 @@
/* On iOS SDL provides a main function that creates an application delegate
   and starts the iOS application run loop.
   If you link with SDL dynamically on iOS, the main function can't be in a
   shared library, so you need to link with libSDLmain.a, which includes a
   stub main function that calls into the shared library to start execution.
   See src/video/uikit/SDL_uikitappdelegate.m for more details.
 */
#define SDL_MAIN_NEEDED
@@ -82,12 +86,6 @@
#endif
#endif /* SDL_MAIN_HANDLED */
#ifdef __cplusplus
#define C_LINKAGE   "C"
#else
#define C_LINKAGE
#endif /* __cplusplus */
#ifndef SDLMAIN_DECLSPEC
#define SDLMAIN_DECLSPEC
#endif
@@ -111,16 +109,17 @@
#define main    SDL_main
#endif
/**
 *  The prototype for the application's main() function
 */
extern C_LINKAGE SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
#include "begin_code.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
 *  The prototype for the application's main() function
 */
typedef int (*SDL_main_func)(int argc, char *argv[]);
extern SDLMAIN_DECLSPEC int SDL_main(int argc, char *argv[]);
/**
 *  This is called by the real SDL main function to let the rest of the
@@ -136,8 +135,7 @@
/**
 *  This can be called to set the application class at startup
 */
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style,
                                            void *hInst);
extern DECLSPEC int SDLCALL SDL_RegisterApp(char *name, Uint32 style, void *hInst);
extern DECLSPEC void SDLCALL SDL_UnregisterApp(void);
#endif /* __WIN32__ */
@@ -153,10 +151,24 @@
 *  \return 0 on success, -1 on failure.  On failure, use SDL_GetError to retrieve more
 *      information on the failure.
 */
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(int (*mainFunction)(int, char **), void * reserved);
extern DECLSPEC int SDLCALL SDL_WinRTRunApp(SDL_main_func mainFunction, void * reserved);
#endif /* __WINRT__ */
#if defined(__IPHONEOS__)
/**
 *  \brief Initializes and launches an SDL application.
 *
 *  \param argc The argc parameter from the application's main() function
 *  \param argv The argv parameter from the application's main() function
 *  \param mainFunction The SDL app's C-style main().
 *  \return the return value from mainFunction
 */
extern DECLSPEC int SDLCALL SDL_UIKitRunApp(int argc, char *argv[], SDL_main_func mainFunction);
#endif /* __IPHONEOS__ */
#ifdef __cplusplus
}
source/include/SDL_messagebox.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -38,7 +38,9 @@
{
    SDL_MESSAGEBOX_ERROR        = 0x00000010,   /**< error dialog */
    SDL_MESSAGEBOX_WARNING      = 0x00000020,   /**< warning dialog */
    SDL_MESSAGEBOX_INFORMATION  = 0x00000040    /**< informational dialog */
    SDL_MESSAGEBOX_INFORMATION           = 0x00000040,   /**< informational dialog */
    SDL_MESSAGEBOX_BUTTONS_LEFT_TO_RIGHT = 0x00000080,   /**< buttons placed left to right */
    SDL_MESSAGEBOX_BUTTONS_RIGHT_TO_LEFT = 0x00000100    /**< buttons placed right to left */
} SDL_MessageBoxFlags;
/**
source/include/SDL_metal.h
New file
@@ -0,0 +1,91 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
  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.
*/
/**
 *  \file SDL_metal.h
 *
 *  Header file for functions to creating Metal layers and views on SDL windows.
 */
#ifndef SDL_metal_h_
#define SDL_metal_h_
#include "SDL_video.h"
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
#ifdef __cplusplus
extern "C" {
#endif
/**
 *  \brief A handle to a CAMetalLayer-backed NSView (macOS) or UIView (iOS/tvOS).
 *
 *  \note This can be cast directly to an NSView or UIView.
 */
typedef void *SDL_MetalView;
/**
 *  \name Metal support functions
 */
/* @{ */
/**
 *  \brief Create a CAMetalLayer-backed NSView/UIView and attach it to the
 *        specified window.
 *
 *  On macOS, this does *not* associate a MTLDevice with the CAMetalLayer on its
 *  own. It is up to user code to do that.
 *
 *  The returned handle can be casted directly to a NSView or UIView, and the
 *  CAMetalLayer can be accessed from the view's 'layer' property.
 *
 *  \code
 *  SDL_MetalView metalview = SDL_Metal_CreateView(window);
 *  UIView *uiview = (__bridge UIView *)metalview;
 *  CAMetalLayer *metallayer = (CAMetalLayer *)uiview.layer;
 *  // [...]
 *  SDL_Metal_DestroyView(metalview);
 *  \endcode
 *
 *  \sa SDL_Metal_DestroyView
 */
extern DECLSPEC SDL_MetalView SDLCALL SDL_Metal_CreateView(SDL_Window * window);
/**
 *  \brief Destroy an existing SDL_MetalView object.
 *
 *  This should be called before SDL_DestroyWindow, if SDL_Metal_CreateView was
 *  called after SDL_CreateWindow.
 *
 *  \sa SDL_Metal_CreateView
 */
extern DECLSPEC void SDLCALL SDL_Metal_DestroyView(SDL_MetalView view);
/* @} *//* Metal support functions */
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
#endif
#include "close_code.h"
#endif /* SDL_metal_h_ */
source/include/SDL_mouse.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_mutex.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_name.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_opengl.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_opengl_glext.h
@@ -40,6 +40,9 @@
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN 1
#endif
#ifndef NOMINMAX   /* don't define min() and max(). */
#define NOMINMAX
#endif
#include <windows.h>
#endif
source/include/SDL_opengles.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_opengles2.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_pixels.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -48,7 +48,7 @@
/* @} */
/** Pixel type. */
enum
typedef enum
{
    SDL_PIXELTYPE_UNKNOWN,
    SDL_PIXELTYPE_INDEX1,
@@ -62,18 +62,18 @@
    SDL_PIXELTYPE_ARRAYU32,
    SDL_PIXELTYPE_ARRAYF16,
    SDL_PIXELTYPE_ARRAYF32
};
} SDL_PixelType;
/** Bitmap pixel order, high bit -> low bit. */
enum
typedef enum
{
    SDL_BITMAPORDER_NONE,
    SDL_BITMAPORDER_4321,
    SDL_BITMAPORDER_1234
};
} SDL_BitmapOrder;
/** Packed component order, high bit -> low bit. */
enum
typedef enum
{
    SDL_PACKEDORDER_NONE,
    SDL_PACKEDORDER_XRGB,
@@ -84,12 +84,12 @@
    SDL_PACKEDORDER_BGRX,
    SDL_PACKEDORDER_ABGR,
    SDL_PACKEDORDER_BGRA
};
} SDL_PackedOrder;
/** Array component order, low byte -> high byte. */
/* !!! FIXME: in 2.1, make these not overlap differently with
   !!! FIXME:  SDL_PACKEDORDER_*, so we can simplify SDL_ISPIXELFORMAT_ALPHA */
enum
typedef enum
{
    SDL_ARRAYORDER_NONE,
    SDL_ARRAYORDER_RGB,
@@ -98,10 +98,10 @@
    SDL_ARRAYORDER_BGR,
    SDL_ARRAYORDER_BGRA,
    SDL_ARRAYORDER_ABGR
};
} SDL_ArrayOrder;
/** Packed component layout. */
enum
typedef enum
{
    SDL_PACKEDLAYOUT_NONE,
    SDL_PACKEDLAYOUT_332,
@@ -112,7 +112,7 @@
    SDL_PACKEDLAYOUT_8888,
    SDL_PACKEDLAYOUT_2101010,
    SDL_PACKEDLAYOUT_1010102
};
} SDL_PackedLayout;
#define SDL_DEFINE_PIXELFOURCC(A, B, C, D) SDL_FOURCC(A, B, C, D)
@@ -168,7 +168,7 @@
    ((format) && (SDL_PIXELFLAG(format) != 1))
/* Note: If you modify this list, update SDL_GetPixelFormatName() */
enum
typedef enum
{
    SDL_PIXELFORMAT_UNKNOWN,
    SDL_PIXELFORMAT_INDEX1LSB =
@@ -190,6 +190,9 @@
                               SDL_PACKEDLAYOUT_332, 8, 1),
    SDL_PIXELFORMAT_RGB444 =
        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
                               SDL_PACKEDLAYOUT_4444, 12, 2),
    SDL_PIXELFORMAT_BGR444 =
        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XBGR,
                               SDL_PACKEDLAYOUT_4444, 12, 2),
    SDL_PIXELFORMAT_RGB555 =
        SDL_DEFINE_PIXELFORMAT(SDL_PIXELTYPE_PACKED16, SDL_PACKEDORDER_XRGB,
@@ -290,7 +293,7 @@
        SDL_DEFINE_PIXELFOURCC('N', 'V', '2', '1'),
    SDL_PIXELFORMAT_EXTERNAL_OES =      /**< Android video texture format */
        SDL_DEFINE_PIXELFOURCC('O', 'E', 'S', ' ')
};
} SDL_PixelFormatEnum;
typedef struct SDL_Color
{
source/include/SDL_platform.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_power.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_quit.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_rect.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -40,7 +40,7 @@
#endif
/**
 *  \brief  The structure that defines a point
 *  \brief  The structure that defines a point (integer)
 *
 *  \sa SDL_EnclosePoints
 *  \sa SDL_PointInRect
@@ -52,7 +52,20 @@
} SDL_Point;
/**
 *  \brief A rectangle, with the origin at the upper left.
 *  \brief  The structure that defines a point (floating point)
 *
 *  \sa SDL_EnclosePoints
 *  \sa SDL_PointInRect
 */
typedef struct SDL_FPoint
{
    float x;
    float y;
} SDL_FPoint;
/**
 *  \brief A rectangle, with the origin at the upper left (integer).
 *
 *  \sa SDL_RectEmpty
 *  \sa SDL_RectEquals
@@ -67,6 +80,19 @@
    int w, h;
} SDL_Rect;
/**
 *  \brief A rectangle, with the origin at the upper left (floating point).
 */
typedef struct SDL_FRect
{
    float x;
    float y;
    float w;
    float h;
} SDL_FRect;
/**
 *  \brief Returns true if point resides inside a rectangle.
 */
source/include/SDL_render.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -84,6 +84,16 @@
    int max_texture_width;      /**< The maximum texture width */
    int max_texture_height;     /**< The maximum texture height */
} SDL_RendererInfo;
/**
 *  \brief The scaling mode for a texture.
 */
typedef enum
{
    SDL_ScaleModeNearest, /**< nearest pixel sampling */
    SDL_ScaleModeLinear,  /**< linear filtering */
    SDL_ScaleModeBest     /**< anisotropic filtering */
} SDL_ScaleMode;
/**
 *  \brief The access pattern allowed for a texture.
@@ -367,6 +377,35 @@
                                                    SDL_BlendMode *blendMode);
/**
 *  \brief Set the scale mode used for texture scale operations.
 *
 *  \param texture The texture to update.
 *  \param scaleMode ::SDL_ScaleMode to use for texture scaling.
 *
 *  \return 0 on success, or -1 if the texture is not valid.
 *
 *  \note If the scale mode is not supported, the closest supported mode is
 *        chosen.
 *
 *  \sa SDL_GetTextureScaleMode()
 */
extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
                                                    SDL_ScaleMode scaleMode);
/**
 *  \brief Get the scale mode used for texture scale operations.
 *
 *  \param texture   The texture to query.
 *  \param scaleMode A pointer filled in with the current scale mode.
 *
 *  \return 0 on success, or -1 if the texture is not valid.
 *
 *  \sa SDL_SetTextureScaleMode()
 */
extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
                                                    SDL_ScaleMode *scaleMode);
/**
 *  \brief Update the given texture rectangle with new pixel data.
 *
 *  \param texture   The texture to update
@@ -431,9 +470,30 @@
                                            void **pixels, int *pitch);
/**
 *  \brief Lock a portion of the texture for write-only pixel access.
 *         Expose it as a SDL surface.
 *
 *  \param texture   The texture to lock for access, which was created with
 *                   ::SDL_TEXTUREACCESS_STREAMING.
 *  \param rect      A pointer to the rectangle to lock for access. If the rect
 *                   is NULL, the entire texture will be locked.
 *  \param surface   This is filled in with a SDL surface representing the locked area
 *                   Surface is freed internally after calling SDL_UnlockTexture or SDL_DestroyTexture.
 *
 *  \return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.
 *
 *  \sa SDL_UnlockTexture()
 */
extern DECLSPEC int SDLCALL SDL_LockTextureToSurface(SDL_Texture *texture,
                                            const SDL_Rect *rect,
                                            SDL_Surface **surface);
/**
 *  \brief Unlock a texture, uploading the changes to video memory, if needed.
 *         If SDL_LockTextureToSurface() was called for locking, the SDL surface is freed.
 *
 *  \sa SDL_LockTexture()
 *  \sa SDL_LockTextureToSurface()
 */
extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
@@ -558,8 +618,8 @@
 *  \brief Set the clip rectangle for the current target.
 *
 *  \param renderer The renderer for which clip rectangle should be set.
 *  \param rect   A pointer to the rectangle to set as the clip rectangle, or
 *                NULL to disable clipping.
 *  \param rect   A pointer to the rectangle to set as the clip rectangle,
 *                relative to the viewport, or NULL to disable clipping.
 *
 *  \return 0 on success, or -1 on error
 *
@@ -835,6 +895,148 @@
                                           const SDL_Point *center,
                                           const SDL_RendererFlip flip);
/**
 *  \brief Draw a point on the current rendering target.
 *
 *  \param renderer The renderer which should draw a point.
 *  \param x The x coordinate of the point.
 *  \param y The y coordinate of the point.
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderDrawPointF(SDL_Renderer * renderer,
                                                 float x, float y);
/**
 *  \brief Draw multiple points on the current rendering target.
 *
 *  \param renderer The renderer which should draw multiple points.
 *  \param points The points to draw
 *  \param count The number of points to draw
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderDrawPointsF(SDL_Renderer * renderer,
                                                  const SDL_FPoint * points,
                                                  int count);
/**
 *  \brief Draw a line on the current rendering target.
 *
 *  \param renderer The renderer which should draw a line.
 *  \param x1 The x coordinate of the start point.
 *  \param y1 The y coordinate of the start point.
 *  \param x2 The x coordinate of the end point.
 *  \param y2 The y coordinate of the end point.
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderDrawLineF(SDL_Renderer * renderer,
                                                float x1, float y1, float x2, float y2);
/**
 *  \brief Draw a series of connected lines on the current rendering target.
 *
 *  \param renderer The renderer which should draw multiple lines.
 *  \param points The points along the lines
 *  \param count The number of points, drawing count-1 lines
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderDrawLinesF(SDL_Renderer * renderer,
                                                const SDL_FPoint * points,
                                                int count);
/**
 *  \brief Draw a rectangle on the current rendering target.
 *
 *  \param renderer The renderer which should draw a rectangle.
 *  \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderDrawRectF(SDL_Renderer * renderer,
                                               const SDL_FRect * rect);
/**
 *  \brief Draw some number of rectangles on the current rendering target.
 *
 *  \param renderer The renderer which should draw multiple rectangles.
 *  \param rects A pointer to an array of destination rectangles.
 *  \param count The number of rectangles.
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderDrawRectsF(SDL_Renderer * renderer,
                                                 const SDL_FRect * rects,
                                                 int count);
/**
 *  \brief Fill a rectangle on the current rendering target with the drawing color.
 *
 *  \param renderer The renderer which should fill a rectangle.
 *  \param rect A pointer to the destination rectangle, or NULL for the entire
 *              rendering target.
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderFillRectF(SDL_Renderer * renderer,
                                                const SDL_FRect * rect);
/**
 *  \brief Fill some number of rectangles on the current rendering target with the drawing color.
 *
 *  \param renderer The renderer which should fill multiple rectangles.
 *  \param rects A pointer to an array of destination rectangles.
 *  \param count The number of rectangles.
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderFillRectsF(SDL_Renderer * renderer,
                                                 const SDL_FRect * rects,
                                                 int count);
/**
 *  \brief Copy a portion of the texture to the current rendering target.
 *
 *  \param renderer The renderer which should copy parts of a texture.
 *  \param texture The source texture.
 *  \param srcrect   A pointer to the source rectangle, or NULL for the entire
 *                   texture.
 *  \param dstrect   A pointer to the destination rectangle, or NULL for the
 *                   entire rendering target.
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderCopyF(SDL_Renderer * renderer,
                                            SDL_Texture * texture,
                                            const SDL_Rect * srcrect,
                                            const SDL_FRect * dstrect);
/**
 *  \brief Copy a portion of the source texture to the current rendering target, rotating it by angle around the given center
 *
 *  \param renderer The renderer which should copy parts of a texture.
 *  \param texture The source texture.
 *  \param srcrect   A pointer to the source rectangle, or NULL for the entire
 *                   texture.
 *  \param dstrect   A pointer to the destination rectangle, or NULL for the
 *                   entire rendering target.
 *  \param angle    An angle in degrees that indicates the rotation that will be applied to dstrect, rotating it in a clockwise direction
 *  \param center   A pointer to a point indicating the point around which dstrect will be rotated (if NULL, rotation will be done around dstrect.w/2, dstrect.h/2).
 *  \param flip     An SDL_RendererFlip value stating which flipping actions should be performed on the texture
 *
 *  \return 0 on success, or -1 on error
 */
extern DECLSPEC int SDLCALL SDL_RenderCopyExF(SDL_Renderer * renderer,
                                            SDL_Texture * texture,
                                            const SDL_Rect * srcrect,
                                            const SDL_FRect * dstrect,
                                            const double angle,
                                            const SDL_FPoint *center,
                                            const SDL_RendererFlip flip);
/**
 *  \brief Read pixels from the current rendering target.
 *
@@ -876,6 +1078,31 @@
 */
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Renderer * renderer);
/**
 *  \brief Force the rendering context to flush any pending commands to the
 *         underlying rendering API.
 *
 *  You do not need to (and in fact, shouldn't) call this function unless
 *  you are planning to call into OpenGL/Direct3D/Metal/whatever directly
 *  in addition to using an SDL_Renderer.
 *
 *  This is for a very-specific case: if you are using SDL's render API,
 *  you asked for a specific renderer backend (OpenGL, Direct3D, etc),
 *  you set SDL_HINT_RENDER_BATCHING to "1", and you plan to make
 *  OpenGL/D3D/whatever calls in addition to SDL render API calls. If all of
 *  this applies, you should call SDL_RenderFlush() between calls to SDL's
 *  render API and the low-level API you're using in cooperation.
 *
 *  In all other cases, you can ignore this function. This is only here to
 *  get maximum performance out of a specific situation. In all other cases,
 *  SDL will do the right thing, perhaps at a performance loss.
 *
 *  This function is first available in SDL 2.0.10, and is not needed in
 *  2.0.9 and earlier, as earlier versions did not queue rendering commands
 *  at all, instead flushing them to the OS immediately.
 */
extern DECLSPEC int SDLCALL SDL_RenderFlush(SDL_Renderer * renderer);
/**
 *  \brief Bind the texture to the current OpenGL/ES/ES2 context for use with
source/include/SDL_rwops.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -176,19 +176,48 @@
#define RW_SEEK_END 2       /**< Seek relative to the end of data */
/**
 *  \name Read/write macros
 *
 *  Macros to easily read and write from an SDL_RWops structure.
 *  Return the size of the file in this rwops, or -1 if unknown
 */
/* @{ */
#define SDL_RWsize(ctx)         (ctx)->size(ctx)
#define SDL_RWseek(ctx, offset, whence) (ctx)->seek(ctx, offset, whence)
#define SDL_RWtell(ctx)         (ctx)->seek(ctx, 0, RW_SEEK_CUR)
#define SDL_RWread(ctx, ptr, size, n)   (ctx)->read(ctx, ptr, size, n)
#define SDL_RWwrite(ctx, ptr, size, n)  (ctx)->write(ctx, ptr, size, n)
#define SDL_RWclose(ctx)        (ctx)->close(ctx)
/* @} *//* Read/write macros */
extern DECLSPEC Sint64 SDLCALL SDL_RWsize(SDL_RWops *context);
/**
 *  Seek to \c offset relative to \c whence, one of stdio's whence values:
 *  RW_SEEK_SET, RW_SEEK_CUR, RW_SEEK_END
 *
 *  \return the final offset in the data stream, or -1 on error.
 */
extern DECLSPEC Sint64 SDLCALL SDL_RWseek(SDL_RWops *context,
                                          Sint64 offset, int whence);
/**
 *  Return the current offset in the data stream, or -1 on error.
 */
extern DECLSPEC Sint64 SDLCALL SDL_RWtell(SDL_RWops *context);
/**
 *  Read up to \c maxnum objects each of size \c size from the data
 *  stream to the area pointed at by \c ptr.
 *
 *  \return the number of objects read, or 0 at error or end of file.
 */
extern DECLSPEC size_t SDLCALL SDL_RWread(SDL_RWops *context,
                                          void *ptr, size_t size, size_t maxnum);
/**
 *  Write exactly \c num objects each of size \c size from the area
 *  pointed at by \c ptr to data stream.
 *
 *  \return the number of objects written, or 0 at error or end of file.
 */
extern DECLSPEC size_t SDLCALL SDL_RWwrite(SDL_RWops *context,
                                           const void *ptr, size_t size, size_t num);
/**
 *  Close and free an allocated SDL_RWops structure.
 *
 *  \return 0 if successful or -1 on write error when flushing data.
 */
extern DECLSPEC int SDLCALL SDL_RWclose(SDL_RWops *context);
/**
 *  Load all the data from an SDL data stream.
@@ -209,9 +238,17 @@
/**
 *  Load an entire file.
 *
 *  Convenience macro.
 *  The data is allocated with a zero byte at the end (null terminated)
 *
 *  If \c datasize is not NULL, it is filled with the size of the data read.
 *
 *  If \c freesrc is non-zero, the stream will be closed after being read.
 *
 *  The data should be freed with SDL_free().
 *
 *  \return the data, or NULL if there was an error.
 */
#define SDL_LoadFile(file, datasize)   SDL_LoadFile_RW(SDL_RWFromFile(file, "rb"), datasize, 1)
extern DECLSPEC void *SDLCALL SDL_LoadFile(const char *file, size_t *datasize);
/**
 *  \name Read endian functions
source/include/SDL_scancode.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -38,7 +38,7 @@
 *  SDL_Event structure.
 *
 *  The values in this enumeration are based on the USB usage page standard:
 *  http://www.usb.org/developers/hidpage/Hut1_12v2.pdf
 *  https://www.usb.org/sites/default/files/documents/hut1_12v2.pdf
 */
typedef enum
{
source/include/SDL_sensor.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -26,8 +26,8 @@
 *
 */
#ifndef _SDL_sensor_h
#define _SDL_sensor_h
#ifndef SDL_sensor_h_
#define SDL_sensor_h_
#include "SDL_stdinc.h"
#include "SDL_error.h"
@@ -246,6 +246,6 @@
#endif
#include "close_code.h"
#endif /* _SDL_sensor_h */
#endif /* SDL_sensor_h_ */
/* vi: set ts=4 sw=4 expandtab: */
source/include/SDL_shape.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_stdinc.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -408,6 +408,8 @@
extern DECLSPEC int SDLCALL SDL_isdigit(int x);
extern DECLSPEC int SDLCALL SDL_isspace(int x);
extern DECLSPEC int SDLCALL SDL_isupper(int x);
extern DECLSPEC int SDLCALL SDL_islower(int x);
extern DECLSPEC int SDLCALL SDL_toupper(int x);
extern DECLSPEC int SDLCALL SDL_tolower(int x);
@@ -415,11 +417,14 @@
#define SDL_zero(x) SDL_memset(&(x), 0, sizeof((x)))
#define SDL_zerop(x) SDL_memset((x), 0, sizeof(*(x)))
#define SDL_zeroa(x) SDL_memset((x), 0, sizeof((x)))
/* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */
SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords)
{
#if defined(__GNUC__) && defined(i386)
#ifdef __APPLE__
    memset_pattern4(dst, &val, dwords * 4);
#elif defined(__GNUC__) && defined(i386)
    int u0, u1, u2;
    __asm__ __volatile__ (
        "cld \n\t"
@@ -450,11 +455,14 @@
extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
extern DECLSPEC size_t SDLCALL SDL_wcslen(const wchar_t *wstr);
extern DECLSPEC size_t SDLCALL SDL_wcslcpy(SDL_OUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
extern DECLSPEC size_t SDLCALL SDL_wcslcat(SDL_INOUT_Z_CAP(maxlen) wchar_t *dst, const wchar_t *src, size_t maxlen);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsdup(const wchar_t *wstr);
extern DECLSPEC wchar_t *SDLCALL SDL_wcsstr(const wchar_t *haystack, const wchar_t *needle);
extern DECLSPEC int SDLCALL SDL_wcscmp(const wchar_t *str1, const wchar_t *str2);
extern DECLSPEC int SDLCALL SDL_wcsncmp(const wchar_t *str1, const wchar_t *str2, size_t maxlen);
extern DECLSPEC size_t SDLCALL SDL_strlen(const char *str);
extern DECLSPEC size_t SDLCALL SDL_strlcpy(SDL_OUT_Z_CAP(maxlen) char *dst, const char *src, size_t maxlen);
@@ -467,6 +475,7 @@
extern DECLSPEC char *SDLCALL SDL_strchr(const char *str, int c);
extern DECLSPEC char *SDLCALL SDL_strrchr(const char *str, int c);
extern DECLSPEC char *SDLCALL SDL_strstr(const char *haystack, const char *needle);
extern DECLSPEC char *SDLCALL SDL_strtokr(char *s1, const char *s2, char **saveptr);
extern DECLSPEC size_t SDLCALL SDL_utf8strlen(const char *str);
extern DECLSPEC char *SDLCALL SDL_itoa(int value, char *str, int radix);
@@ -581,6 +590,7 @@
#define SDL_strchr strchr
#define SDL_strrchr strrchr
#define SDL_strstr strstr
#define SDL_strtokr strtok_r
#define SDL_strcmp strcmp
#define SDL_strncmp strncmp
#define SDL_strcasecmp strcasecmp
source/include/SDL_surface.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -53,6 +53,7 @@
#define SDL_PREALLOC        0x00000001  /**< Surface uses preallocated memory */
#define SDL_RLEACCEL        0x00000002  /**< Surface is RLE encoded */
#define SDL_DONTFREE        0x00000004  /**< Surface is referenced internally */
#define SDL_SIMD_ALIGNED    0x00000008  /**< Surface uses aligned memory */
/* @} *//* Surface flags */
/**
source/include/SDL_system.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -89,7 +89,7 @@
#endif /* __LINUX__ */
    
/* Platform specific functions for iOS */
#if defined(__IPHONEOS__) && __IPHONEOS__
#ifdef __IPHONEOS__
#define SDL_iOSSetAnimationCallback(window, interval, callback, callbackParam) SDL_iPhoneSetAnimationCallback(window, interval, callback, callbackParam)
extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(SDL_Window * window, int interval, void (*callback)(void*), void *callbackParam);
@@ -101,7 +101,7 @@
/* Platform specific functions for Android */
#if defined(__ANDROID__) && __ANDROID__
#ifdef __ANDROID__
/**
   \brief Get the JNI environment for the current thread
@@ -119,6 +119,32 @@
   (using env->Push/PopLocalFrame or manually with env->DeleteLocalRef)
 */
extern DECLSPEC void * SDLCALL SDL_AndroidGetActivity(void);
/**
   \brief Return API level of the current device
    API level 29: Android 10
    API level 28: Android 9
    API level 27: Android 8.1
    API level 26: Android 8.0
    API level 25: Android 7.1
    API level 24: Android 7.0
    API level 23: Android 6.0
    API level 22: Android 5.1
    API level 21: Android 5.0
    API level 20: Android 4.4W
    API level 19: Android 4.4
    API level 18: Android 4.3
    API level 17: Android 4.2
    API level 16: Android 4.1
    API level 15: Android 4.0.3
    API level 14: Android 4.0
    API level 13: Android 3.2
    API level 12: Android 3.1
    API level 11: Android 3.0
    API level 10: Android 2.3.3
 */
extern DECLSPEC int SDLCALL SDL_GetAndroidSDKVersion(void);
/**
   \brief Return true if the application is running on Android TV
@@ -175,7 +201,7 @@
#endif /* __ANDROID__ */
/* Platform specific functions for WinRT */
#if defined(__WINRT__) && __WINRT__
#ifdef __WINRT__
/**
 *  \brief WinRT / Windows Phone path types
@@ -268,6 +294,17 @@
 */
extern DECLSPEC SDL_bool SDLCALL SDL_IsTablet(void);
/* Functions used by iOS application delegates to notify SDL about state changes */
extern DECLSPEC void SDLCALL SDL_OnApplicationWillTerminate(void);
extern DECLSPEC void SDLCALL SDL_OnApplicationDidReceiveMemoryWarning(void);
extern DECLSPEC void SDLCALL SDL_OnApplicationWillResignActive(void);
extern DECLSPEC void SDLCALL SDL_OnApplicationDidEnterBackground(void);
extern DECLSPEC void SDLCALL SDL_OnApplicationWillEnterForeground(void);
extern DECLSPEC void SDLCALL SDL_OnApplicationDidBecomeActive(void);
#ifdef __IPHONEOS__
extern DECLSPEC void SDLCALL SDL_OnApplicationDidChangeStatusBarOrientation(void);
#endif
/* Ends C function definitions when using C++ */
#ifdef __cplusplus
}
source/include/SDL_syswm.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -34,20 +34,23 @@
#include "SDL_version.h"
/**
 *  \file SDL_syswm.h
 *  \brief SDL_syswm.h
 *
 *  Your application has access to a special type of event ::SDL_SYSWMEVENT,
 *  which contains window-manager specific information and arrives whenever
 *  an unhandled window event occurs.  This event is ignored by default, but
 *  you can enable it with SDL_EventState().
 */
#ifdef SDL_PROTOTYPES_ONLY
struct SDL_SysWMinfo;
#else
#if !defined(SDL_PROTOTYPES_ONLY)
#if defined(SDL_VIDEO_DRIVER_WINDOWS)
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
#ifndef NOMINMAX   /* don't define min() and max(). */
#define NOMINMAX
#endif
#include <windows.h>
#endif
@@ -103,6 +106,8 @@
#if defined(SDL_VIDEO_DRIVER_VIVANTE)
#include "SDL_egl.h"
#endif
#endif /* SDL_PROTOTYPES_ONLY */
#include "begin_code.h"
/* Set up for C function definitions, even when using C++ */
@@ -110,6 +115,7 @@
extern "C" {
#endif
#if !defined(SDL_PROTOTYPES_ONLY)
/**
 *  These are the various supported windowing subsystems
 */
@@ -122,11 +128,12 @@
    SDL_SYSWM_COCOA,
    SDL_SYSWM_UIKIT,
    SDL_SYSWM_WAYLAND,
    SDL_SYSWM_MIR,
    SDL_SYSWM_MIR,  /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
    SDL_SYSWM_WINRT,
    SDL_SYSWM_ANDROID,
    SDL_SYSWM_VIVANTE,
    SDL_SYSWM_OS2
    SDL_SYSWM_OS2,
    SDL_SYSWM_HAIKU
} SDL_SYSWM_TYPE;
/**
@@ -257,11 +264,11 @@
            struct wl_shell_surface *shell_surface; /**< Wayland shell_surface (window manager handle) */
        } wl;
#endif
#if defined(SDL_VIDEO_DRIVER_MIR)
#if defined(SDL_VIDEO_DRIVER_MIR)  /* no longer available, left for API/ABI compatibility. Remove in 2.1! */
        struct
        {
            struct MirConnection *connection;  /**< Mir display server connection */
            struct MirSurface *surface;  /**< Mir surface */
            void *connection;  /**< Mir display server connection */
            void *surface;  /**< Mir surface */
        } mir;
#endif
source/include/SDL_test.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_assert.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_common.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -140,11 +140,30 @@
 */
int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
/**
 * \brief Logs command line usage info.
 *
 * This logs the appropriate command line options for the subsystems in use
 *  plus other common options, and then any application-specific options.
 *  This uses the SDL_Log() function and splits up output to be friendly to
 *  80-character-wide terminals.
 *
 * \param state The common state describing the test window for the app.
 * \param argv0 argv[0], as passed to main/SDL_main.
 * \param options an array of strings for application specific options. The last element of the array should be NULL.
 */
void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);
/**
 * \brief Returns common usage information
 *
 * \param state The common state describing the test window to create.
 * You should (probably) be using SDLTest_CommonLogUsage() instead, but this
 *  function remains for binary compatibility. Strings returned from this
 *  function are valid until SDLTest_CommonQuit() is called, in which case
 *  those strings' memory is freed and can no longer be used.
 *
 * \param state The common state describing the test window to create.
 * \returns String with usage information
 */
const char *SDLTest_CommonUsage(SDLTest_CommonState * state);
@@ -159,6 +178,17 @@
SDL_bool SDLTest_CommonInit(SDLTest_CommonState * state);
/**
 * \brief Easy argument handling when test app doesn't need any custom args.
 *
 * \param state The common state describing the test window to create.
 * \param argc argc, as supplied to SDL_main
 * \param argv argv, as supplied to SDL_main
 *
 * \returns False if app should quit, true otherwise.
 */
SDL_bool SDLTest_CommonDefaultArgs(SDLTest_CommonState * state, const int argc, char **argv);
/**
 * \brief Common event handler for test windows.
 *
 * \param state The common state used to create test window.
source/include/SDL_test_compare.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_crc32.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_font.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_fuzzer.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_harness.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_images.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_log.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_md5.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_test_memory.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -42,14 +42,14 @@
 * 
 * \note This should be called before any other SDL functions for complete tracking coverage
 */
int SDLTest_TrackAllocations();
int SDLTest_TrackAllocations(void);
/**
 * \brief Print a log of any outstanding allocations
 *
 * \note This can be called after SDL_Quit()
 */
void SDLTest_LogAllocations();
void SDLTest_LogAllocations(void);
/* Ends C function definitions when using C++ */
source/include/SDL_test_random.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_thread.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -69,7 +69,7 @@
 */
typedef int (SDLCALL * SDL_ThreadFunction) (void *data);
#if defined(__WIN32__) && !defined(HAVE_LIBC)
#if defined(__WIN32__)
/**
 *  \file SDL_thread.h
 *
@@ -98,6 +98,13 @@
                    void * /*arg*/, unsigned, unsigned * /* threadID */);
typedef void (__cdecl * pfnSDL_CurrentEndThread) (unsigned code);
#ifndef SDL_beginthread
#define SDL_beginthread _beginthreadex
#endif
#ifndef SDL_endthread
#define SDL_endthread _endthreadex
#endif
/**
 *  Create a thread.
 */
@@ -118,12 +125,12 @@
 */
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
#undef SDL_CreateThread
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#undef SDL_CreateThreadWithStackSize
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#else
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)_endthreadex)
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthreadex, (pfnSDL_CurrentEndThread)SDL_endthread)
#endif
#elif defined(__OS2__)
@@ -132,13 +139,23 @@
 * into a dll with Watcom's runtime statically linked.
 */
#define SDL_PASSED_BEGINTHREAD_ENDTHREAD
#ifndef __EMX__
#include <process.h>
#else
#include <stdlib.h>
#endif
typedef int (*pfnSDL_CurrentBeginThread)(void (*func)(void *), void *, unsigned, void * /*arg*/);
typedef void (*pfnSDL_CurrentEndThread)(void);
#ifndef SDL_beginthread
#define SDL_beginthread _beginthread
#endif
#ifndef SDL_endthread
#define SDL_endthread _endthread
#endif
extern DECLSPEC SDL_Thread *SDLCALL
SDL_CreateThread(SDL_ThreadFunction fn, const char *name, void *data,
                 pfnSDL_CurrentBeginThread pfnBeginThread,
@@ -147,14 +164,15 @@
SDL_CreateThreadWithStackSize(SDL_ThreadFunction fn, const char *name, const size_t stacksize, void *data,
                 pfnSDL_CurrentBeginThread pfnBeginThread,
                 pfnSDL_CurrentEndThread pfnEndThread);
#if defined(SDL_CreateThread) && SDL_DYNAMIC_API
#undef SDL_CreateThread
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
#define SDL_CreateThread(fn, name, data) SDL_CreateThread_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#undef SDL_CreateThreadWithStackSize
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize_REAL(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#else
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)_beginthread, (pfnSDL_CurrentEndThread)_endthread)
#define SDL_CreateThread(fn, name, data) SDL_CreateThread(fn, name, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#define SDL_CreateThreadWithStackSize(fn, name, stacksize, data) SDL_CreateThreadWithStackSize(fn, name, stacksize, data, (pfnSDL_CurrentBeginThread)SDL_beginthread, (pfnSDL_CurrentEndThread)SDL_endthread)
#endif
#else
source/include/SDL_timer.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_touch.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -41,6 +41,14 @@
typedef Sint64 SDL_TouchID;
typedef Sint64 SDL_FingerID;
typedef enum
{
    SDL_TOUCH_DEVICE_INVALID = -1,
    SDL_TOUCH_DEVICE_DIRECT,            /* touch screen with window-relative coordinates */
    SDL_TOUCH_DEVICE_INDIRECT_ABSOLUTE, /* trackpad with absolute device coordinates */
    SDL_TOUCH_DEVICE_INDIRECT_RELATIVE  /* trackpad with screen cursor-relative coordinates */
} SDL_TouchDeviceType;
typedef struct SDL_Finger
{
    SDL_FingerID id;
@@ -51,6 +59,9 @@
/* Used as the device ID for mouse events simulated with touch input */
#define SDL_TOUCH_MOUSEID ((Uint32)-1)
/* Used as the SDL_TouchID for touch events simulated with mouse input */
#define SDL_MOUSE_TOUCHID ((Sint64)-1)
/* Function prototypes */
@@ -66,6 +77,11 @@
extern DECLSPEC SDL_TouchID SDLCALL SDL_GetTouchDevice(int index);
/**
 * \brief Get the type of the given touch device.
 */
extern DECLSPEC SDL_TouchDeviceType SDLCALL SDL_GetTouchDeviceType(SDL_TouchID touchID);
/**
 *  \brief Get the number of active fingers for a given touch device.
 */
extern DECLSPEC int SDLCALL SDL_GetNumTouchFingers(SDL_TouchID touchID);
source/include/SDL_types.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/include/SDL_version.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -59,7 +59,7 @@
*/
#define SDL_MAJOR_VERSION   2
#define SDL_MINOR_VERSION   0
#define SDL_PATCHLEVEL      9
#define SDL_PATCHLEVEL      12
/**
 *  \brief Macro to determine SDL version program was compiled against.
source/include/SDL_video.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -96,7 +96,6 @@
 */
typedef enum
{
    /* !!! FIXME: change this to name = (1<<x). */
    SDL_WINDOW_FULLSCREEN = 0x00000001,         /**< fullscreen window */
    SDL_WINDOW_OPENGL = 0x00000002,             /**< window usable with OpenGL context */
    SDL_WINDOW_SHOWN = 0x00000004,              /**< window is visible */
source/include/SDL_vulkan.h
@@ -98,8 +98,8 @@
 *        applications to link with libvulkan (and historically MoltenVK was
 *        provided as a static library). If it is not found then, on macOS, SDL
 *        will attempt to load \c vulkan.framework/vulkan, \c libvulkan.1.dylib,
 *        \c MoltenVK.framework/MoltenVK and \c libMoltenVK.dylib in that order.
 *        On iOS SDL will attempt to load \c libMoltenVK.dylib. Applications
 *        followed by \c libvulkan.dylib, in that order.
 *        On iOS SDL will attempt to load \c libvulkan.dylib only. Applications
 *        using a dynamic framework or .dylib must ensure it is included in its
 *        application bundle.
 *
source/include/begin_code.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -105,6 +105,9 @@
#ifdef _MSC_VER
#pragma warning(disable: 4103)
#endif
#ifdef __clang__
#pragma clang diagnostic ignored "-Wpragma-pack"
#endif
#ifdef __BORLANDC__
#pragma nopackwarning
#endif
source/include/close_code.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -26,6 +26,9 @@
 *  after you finish any function and structure declarations in your headers
 */
#ifndef _begin_code_h
#error close_code.h included without matching begin_code.h
#endif
#undef _begin_code_h
/* Reset structure packing at previous byte alignment */
source/sdl2-config-version.cmake.in
New file
@@ -0,0 +1,11 @@
set(PACKAGE_VERSION "@SDL_VERSION@")
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
  set(PACKAGE_VERSION_COMPATIBLE FALSE)
else()
  set(PACKAGE_VERSION_COMPATIBLE TRUE)
  if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION)
    set(PACKAGE_VERSION_EXACT TRUE)
  endif()
endif()
source/sdl2-config.cmake.in
@@ -9,3 +9,31 @@
set(SDL2_INCLUDE_DIRS "@includedir@/SDL2")
set(SDL2_LIBRARIES "-L${SDL2_LIBDIR} @SDL_RLD_FLAGS@ @SDL_LIBS@")
string(STRIP "${SDL2_LIBRARIES}" SDL2_LIBRARIES)
if(NOT TARGET SDL2::SDL2)
  # Remove -lSDL2 as that is handled by CMake, note the space at the end so it does not replace e.g. -lSDL2main
  # This may require "libdir" beeing set (from above)
  string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS "@SDL_RLD_FLAGS@ @SDL_LIBS@ ")
  string(STRIP "${SDL2_EXTRA_LINK_FLAGS}" SDL2_EXTRA_LINK_FLAGS)
  string(REPLACE "-lSDL2 " "" SDL2_EXTRA_LINK_FLAGS_STATIC "@SDL_RLD_FLAGS@ @SDL_STATIC_LIBS@ ")
  string(STRIP "${SDL2_EXTRA_LINK_FLAGS_STATIC}" SDL2_EXTRA_LINK_FLAGS_STATIC)
  add_library(SDL2::SDL2 SHARED IMPORTED)
  set_target_properties(SDL2::SDL2 PROPERTIES
    INTERFACE_INCLUDE_DIRECTORIES "@includedir@/SDL2"
    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
    IMPORTED_LOCATION "@libdir@/libSDL2.so"
    INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS}")
  add_library(SDL2::SDL2-static STATIC IMPORTED)
  set_target_properties(SDL2::SDL2-static PROPERTIES
    INTERFACE_INCLUDE_DIRECTORIES "@includedir@/SDL2"
    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
    IMPORTED_LOCATION "@libdir@/libSDL2.a"
    INTERFACE_LINK_LIBRARIES "${SDL2_EXTRA_LINK_FLAGS_STATIC}")
  add_library(SDL2::SDL2main STATIC IMPORTED)
  set_target_properties(SDL2::SDL2main PROPERTIES
    IMPORTED_LINK_INTERFACE_LANGUAGES "C"
    IMPORTED_LOCATION "@libdir@/libSDL2main.a")
endif()
source/sdl2.m4
@@ -74,7 +74,7 @@
        done
      fi
      if test -d $sdl_framework; then
      if test x"$sdl_framework" != x && test -d "$sdl_framework"; then
        AC_MSG_RESULT($sdl_framework)
        sdl_framework_dir=`dirname $sdl_framework`
        SDL_CFLAGS="-F$sdl_framework_dir -Wl,-framework,SDL2 -I$sdl_framework/include"
source/src/SDL.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -22,6 +22,14 @@
#if defined(__WIN32__)
#include "core/windows/SDL_windows.h"
#elif defined(__OS2__)
#include <stdlib.h> /* For _exit() */
#elif !defined(__WINRT__)
#include <unistd.h> /* For _exit(), etc. */
#endif
#if defined(__EMSCRIPTEN__)
#include <emscripten.h>
#endif
/* Initialization code for SDL */
@@ -43,6 +51,34 @@
extern int SDL_HelperWindowCreate(void);
extern int SDL_HelperWindowDestroy(void);
#endif
/* This is not declared in any header, although it is shared between some
    parts of SDL, because we don't want anything calling it without an
    extremely good reason. */
extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
SDL_NORETURN void SDL_ExitProcess(int exitcode)
{
#ifdef __WIN32__
    /* "if you do not know the state of all threads in your process, it is
       better to call TerminateProcess than ExitProcess"
       https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */
    TerminateProcess(GetCurrentProcess(), exitcode);
    /* MingW doesn't have TerminateProcess marked as noreturn, so add an
       ExitProcess here that will never be reached but make MingW happy. */
    ExitProcess(exitcode);
#elif defined(__EMSCRIPTEN__)
    emscripten_cancel_main_loop();  /* this should "kill" the app. */
    emscripten_force_exit(exitcode);  /* this should "kill" the app. */
    exit(exitcode);
#elif defined(__HAIKU__)  /* Haiku has _Exit, but it's not marked noreturn. */
    _exit(exitcode);
#elif defined(HAVE__EXIT) /* Upper case _Exit() */
    _Exit(exitcode);
#else
    _exit(exitcode);
#endif
}
/* The initialized subsystems */
@@ -139,10 +175,9 @@
    if ((flags & SDL_INIT_EVENTS)) {
#if !SDL_EVENTS_DISABLED
        if (SDL_PrivateShouldInitSubsystem(SDL_INIT_EVENTS)) {
            if (SDL_StartEventLoop() < 0) {
            if (SDL_EventsInit() < 0) {
                return (-1);
            }
            SDL_QuitInit();
        }
        SDL_PrivateSubsystemRefCountIncr(SDL_INIT_EVENTS);
#else
@@ -333,8 +368,7 @@
#if !SDL_EVENTS_DISABLED
    if ((flags & SDL_INIT_EVENTS)) {
        if (SDL_PrivateShouldQuitSubsystem(SDL_INIT_EVENTS)) {
            SDL_QuitQuit();
            SDL_StopEventLoop();
            SDL_EventsQuit();
        }
        SDL_PrivateSubsystemRefCountDecr(SDL_INIT_EVENTS);
    }
@@ -348,6 +382,12 @@
    int num_subsystems = SDL_arraysize(SDL_SubsystemRefCount);
    Uint32 initialized = 0;
    /* Fast path for checking one flag */
    if (SDL_HasExactlyOneBitSet32(flags)) {
        int subsystem_index = SDL_MostSignificantBitIndex32(flags);
        return SDL_SubsystemRefCount[subsystem_index] ? flags : 0;
    }
    if (!flags) {
        flags = SDL_INIT_EVERYTHING;
    }
source/src/SDL_assert.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -36,12 +36,9 @@
#ifndef WS_OVERLAPPEDWINDOW
#define WS_OVERLAPPEDWINDOW 0
#endif
#else  /* fprintf, _exit(), etc. */
#else  /* fprintf, etc. */
#include <stdio.h>
#include <stdlib.h>
#if ! defined(__WINRT__)
#include <unistd.h>
#endif
#endif
#if defined(__EMSCRIPTEN__)
@@ -120,31 +117,21 @@
}
/* This is not declared in any header, although it is shared between some
    parts of SDL, because we don't want anything calling it without an
    extremely good reason. */
#if defined(__WATCOMC__)
extern void SDL_ExitProcess(int exitcode);
#pragma aux SDL_ExitProcess aborts;
#endif
static void SDL_ExitProcess(int exitcode)
{
#ifdef __WIN32__
    /* "if you do not know the state of all threads in your process, it is
       better to call TerminateProcess than ExitProcess"
       https://msdn.microsoft.com/en-us/library/windows/desktop/ms682658(v=vs.85).aspx */
    TerminateProcess(GetCurrentProcess(), exitcode);
#elif defined(__EMSCRIPTEN__)
    emscripten_cancel_main_loop();  /* this should "kill" the app. */
    emscripten_force_exit(exitcode);  /* this should "kill" the app. */
    exit(exitcode);
#else
    _exit(exitcode);
#endif
}
extern SDL_NORETURN void SDL_ExitProcess(int exitcode);
#if defined(__WATCOMC__)
static void SDL_AbortAssertion (void);
#pragma aux SDL_AbortAssertion aborts;
#endif
static void SDL_AbortAssertion(void)
static SDL_NORETURN void SDL_AbortAssertion(void)
{
    SDL_Quit();
    SDL_ExitProcess(42);
@@ -178,6 +165,7 @@
    (void) userdata;  /* unused in default handler. */
    /* !!! FIXME: why is this using SDL_stack_alloc and not just "char message[SDL_MAX_LOG_MESSAGE];" ? */
    message = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
    if (!message) {
        /* Uh oh, we're in real trouble now... */
@@ -249,7 +237,7 @@
            SDL_bool okay = SDL_TRUE;
            char *buf = (char *) EM_ASM_INT({
                var str =
                    Pointer_stringify($0) + '\n\n' +
                    UTF8ToString($0) + '\n\n' +
                    'Abort/Retry/Ignore/AlwaysIgnore? [ariA] :';
                var reply = window.prompt(str, "i");
                if (reply === null) {
@@ -369,10 +357,6 @@
    switch (state)
    {
        case SDL_ASSERTION_ABORT:
            SDL_AbortAssertion();
            return SDL_ASSERTION_IGNORE;  /* shouldn't return, but oh well. */
        case SDL_ASSERTION_ALWAYS_IGNORE:
            state = SDL_ASSERTION_IGNORE;
            data->always_ignore = 1;
@@ -382,6 +366,10 @@
        case SDL_ASSERTION_RETRY:
        case SDL_ASSERTION_BREAK:
            break;  /* macro handles these. */
        case SDL_ASSERTION_ABORT:
            SDL_AbortAssertion();
            /*break;  ...shouldn't return, but oh well. */
    }
    assertion_running--;
source/src/SDL_assert_c.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/src/SDL_dataqueue.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/src/SDL_dataqueue.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/src/SDL_error.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -25,16 +25,6 @@
#include "SDL_log.h"
#include "SDL_error.h"
#include "SDL_error_c.h"
/* Routine to get the thread-specific error variable */
#if SDL_THREADS_DISABLED
/* The default (non-thread-safe) global error variable */
static SDL_error SDL_global_error;
#define SDL_GetErrBuf() (&SDL_global_error)
#else
extern SDL_error *SDL_GetErrBuf(void);
#endif /* SDL_THREADS_DISABLED */
#define SDL_ERRBUFIZE   1024
@@ -81,7 +71,7 @@
                case 0:        /* Malformed format string.. */
                    --fmt;
                    break;
                case 'i': case 'd': case 'u':
                case 'i': case 'd': case 'u': case 'x': case 'X':
                    error->args[error->argc++].value_l = va_arg(ap, long);
                    break;
                }
@@ -234,7 +224,7 @@
                    *spot++ = *fmt++;
                    *spot++ = '\0';
                    switch (spot[-2]) {
                    case 'i': case 'd': case 'u':
                    case 'i': case 'd': case 'u': case 'x': case 'X':
                      len = SDL_snprintf(msg, maxlen, tmp,
                                         error->args[argi++].value_l);
                      if (len > 0) {
source/src/SDL_error_c.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/src/SDL_hints.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -22,6 +22,7 @@
#include "SDL_hints.h"
#include "SDL_error.h"
#include "SDL_hints_c.h"
/* Assuming there aren't many hints set and they aren't being queried in
@@ -119,18 +120,24 @@
}
SDL_bool
SDL_GetHintBoolean(const char *name, SDL_bool default_value)
SDL_GetStringBoolean(const char *value, SDL_bool default_value)
{
    const char *hint = SDL_GetHint(name);
    if (!hint || !*hint) {
    if (!value || !*value) {
        return default_value;
    }
    if (*hint == '0' || SDL_strcasecmp(hint, "false") == 0) {
    if (*value == '0' || SDL_strcasecmp(value, "false") == 0) {
        return SDL_FALSE;
    }
    return SDL_TRUE;
}
SDL_bool
SDL_GetHintBoolean(const char *name, SDL_bool default_value)
{
    const char *hint = SDL_GetHint(name);
    return SDL_GetStringBoolean(hint, default_value);
}
void
SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
{
source/src/SDL_hints_c.h
copy from source/src/video/mir/SDL_mirmouse.h copy to source/src/SDL_hints_c.h
File was copied from source/src/video/mir/SDL_mirmouse.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -18,20 +18,15 @@
     misrepresented as being the original software.
  3. This notice may not be removed or altered from any source distribution.
*/
#include "./SDL_internal.h"
/*
  Contributed by Brandon Schaefer, <brandon.schaefer@canonical.com>
*/
/* This file defines useful function for working with SDL hints */
#ifndef SDL_mirmouse_h_
#define SDL_mirmouse_h_
#ifndef SDL_hints_c_h_
#define SDL_hints_c_h_
extern void
MIR_InitMouse();
extern SDL_bool SDL_GetStringBoolean(const char *value, SDL_bool default_value);
extern void
MIR_FiniMouse();
#endif /* SDL_mirmouse_h_ */
#endif /* SDL_hints_c_h_ */
/* vi: set ts=4 sw=4 expandtab: */
source/src/SDL_internal.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -35,6 +35,10 @@
#define SDL_VARIABLE_LENGTH_ARRAY
#endif
#define SDL_MAX_SMALL_ALLOC_STACKSIZE 128
#define SDL_small_alloc(type, count, pisstack) ( (*(pisstack) = ((sizeof(type)*(count)) < SDL_MAX_SMALL_ALLOC_STACKSIZE)), (*(pisstack) ? SDL_stack_alloc(type, count) : (type*)SDL_malloc(sizeof(type)*(count))) )
#define SDL_small_free(ptr, isstack) if ((isstack)) { SDL_stack_free(ptr); } else { SDL_free(ptr); }
#include "dynapi/SDL_dynapi.h"
#if SDL_DYNAMIC_API
@@ -47,6 +51,71 @@
#include "SDL_config.h"
/* A few #defines to reduce SDL2 footprint.
   Only effective when library is statically linked.
   You have to manually edit this file. */
#ifndef SDL_LEAN_AND_MEAN
#define SDL_LEAN_AND_MEAN               0
#endif
/* Optimized functions from 'SDL_blit_0.c'
   - blit with source BitsPerPixel < 8, palette */
#ifndef SDL_HAVE_BLIT_0
#define SDL_HAVE_BLIT_0                 !SDL_LEAN_AND_MEAN
#endif
/* Optimized functions from 'SDL_blit_1.c'
   - blit with source BytesPerPixel == 1, palette */
#ifndef SDL_HAVE_BLIT_1
#define SDL_HAVE_BLIT_1                 !SDL_LEAN_AND_MEAN
#endif
/* Optimized functions from 'SDL_blit_A.c'
   - blit with 'SDL_BLENDMODE_BLEND' blending mode */
#ifndef SDL_HAVE_BLIT_A
#define SDL_HAVE_BLIT_A                 !SDL_LEAN_AND_MEAN
#endif
/* Optimized functions from 'SDL_blit_N.c'
   - blit with COLORKEY mode, or nothing */
#ifndef SDL_HAVE_BLIT_N
#define SDL_HAVE_BLIT_N                 !SDL_LEAN_AND_MEAN
#endif
/* Optimized functions from 'SDL_blit_N.c'
   - RGB565 conversion with Lookup tables */
#ifndef SDL_HAVE_BLIT_N_RGB565
#define SDL_HAVE_BLIT_N_RGB565          !SDL_LEAN_AND_MEAN
#endif
/* Optimized functions from 'SDL_blit_AUTO.c'
   - blit with modulate color, modulate alpha, any blending mode
   - scaling or not */
#ifndef SDL_HAVE_BLIT_AUTO
#define SDL_HAVE_BLIT_AUTO              !SDL_LEAN_AND_MEAN
#endif
/* Run-Length-Encoding
   - SDL_SetColorKey() called with SDL_RLEACCEL flag */
#ifndef SDL_HAVE_RLE
#define SDL_HAVE_RLE                    !SDL_LEAN_AND_MEAN
#endif
/* Software SDL_Renderer
   - creation of software renderer
   - *not* general blitting functions
   - {blend,draw}{fillrect,line,point} internal functions */
#ifndef SDL_VIDEO_RENDER_SW
#define SDL_VIDEO_RENDER_SW             !SDL_LEAN_AND_MEAN
#endif
/* YUV formats
   - handling of YUV surfaces
   - blitting and conversion functions */
#ifndef SDL_HAVE_YUV
#define SDL_HAVE_YUV                    !SDL_LEAN_AND_MEAN
#endif
#endif /* SDL_internal_h_ */
/* vi: set ts=4 sw=4 expandtab: */
source/src/SDL_log.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -282,6 +282,7 @@
        return;
    }
    /* !!! FIXME: why not just "char message[SDL_MAX_LOG_MESSAGE];" ? */
    message = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
    if (!message) {
        return;
@@ -321,6 +322,7 @@
        char *output;
        size_t length;
        LPTSTR tstr;
        SDL_bool isstack;
#if !defined(HAVE_STDIO_H) && !defined(__WINRT__)
        BOOL attachResult;
@@ -364,7 +366,7 @@
#endif /* !defined(HAVE_STDIO_H) && !defined(__WINRT__) */
        length = SDL_strlen(SDL_priority_prefixes[priority]) + 2 + SDL_strlen(message) + 1 + 1 + 1;
        output = SDL_stack_alloc(char, length);
        output = SDL_small_alloc(char, length, &isstack);
        SDL_snprintf(output, length, "%s: %s\r\n", SDL_priority_prefixes[priority], message);
        tstr = WIN_UTF8ToString(output);
        
@@ -389,7 +391,7 @@
#endif /* !defined(HAVE_STDIO_H) && !defined(__WINRT__) */
        SDL_free(tstr);
        SDL_stack_free(output);
        SDL_small_free(output, isstack);
    }
#elif defined(__ANDROID__)
    {
@@ -398,13 +400,13 @@
        SDL_snprintf(tag, SDL_arraysize(tag), "SDL/%s", GetCategoryPrefix(category));
        __android_log_write(SDL_android_priority[priority], tag, message);
    }
#elif defined(__APPLE__) && defined(SDL_VIDEO_DRIVER_COCOA)
    /* Technically we don't need SDL_VIDEO_DRIVER_COCOA, but that's where this function is defined for now.
#elif defined(__APPLE__) && (defined(SDL_VIDEO_DRIVER_COCOA) || defined(SDL_VIDEO_DRIVER_UIKIT))
    /* Technically we don't need Cocoa/UIKit, but that's where this function is defined for now.
    */
    extern void SDL_NSLog(const char *text);
    {
        char *text;
        /* !!! FIXME: why not just "char text[SDL_MAX_LOG_MESSAGE];" ? */
        text = SDL_stack_alloc(char, SDL_MAX_LOG_MESSAGE);
        if (text) {
            SDL_snprintf(text, SDL_MAX_LOG_MESSAGE, "%s: %s", SDL_priority_prefixes[priority], message);
source/src/atomic/SDL_atomic.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -289,6 +289,10 @@
#endif
}
#ifdef SDL_MEMORY_BARRIER_USES_FUNCTION
#error This file should be built in arm mode so the mcr instruction is available for memory barriers
#endif
void
SDL_MemoryBarrierReleaseFunction(void)
{
source/src/atomic/SDL_spinlock.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -30,6 +30,10 @@
#if !defined(HAVE_GCC_ATOMICS) && defined(__SOLARIS__)
#include <atomic.h>
#endif
#if !defined(HAVE_GCC_ATOMICS) && defined(__RISCOS__)
#include <unixlib/local.h>
#endif
#if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_X64))
@@ -79,10 +83,21 @@
    return (__sync_lock_test_and_set(lock, 1) == 0);
#elif defined(__GNUC__) && defined(__arm__) && \
        (defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \
        (defined(__ARM_ARCH_3__) || defined(__ARM_ARCH_3M__) || \
         defined(__ARM_ARCH_4__) || defined(__ARM_ARCH_4T__) || \
         defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5TE__) || \
         defined(__ARM_ARCH_5TEJ__))
    int result;
#if defined(__RISCOS__)
    if (__cpucap_have_rex()) {
        __asm__ __volatile__ (
            "ldrex %0, [%2]\nteq   %0, #0\nstrexeq %0, %1, [%2]"
            : "=&r" (result) : "r" (1), "r" (lock) : "cc", "memory");
        return (result == 0);
    }
#endif
    __asm__ __volatile__ (
        "swp %0, %1, [%2]\n"
        : "=&r,&r" (result) : "r,0" (1), "r,r" (lock) : "memory");
source/src/audio/SDL_audio.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -88,6 +88,9 @@
#endif
#if SDL_AUDIO_DRIVER_FUSIONSOUND
    &FUSIONSOUND_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_OPENSLES
    &openslES_bootstrap,
#endif
#if SDL_AUDIO_DRIVER_ANDROID
    &ANDROIDAUDIO_bootstrap,
@@ -245,12 +248,6 @@
{                               /* no-op. */
}
static int
SDL_AudioGetPendingBytes_Default(_THIS)
{
    return 0;
}
static Uint8 *
SDL_AudioGetDeviceBuf_Default(_THIS)
{
@@ -358,7 +355,6 @@
    FILL_STUB(BeginLoopIteration);
    FILL_STUB(WaitDevice);
    FILL_STUB(PlayDevice);
    FILL_STUB(GetPendingBytes);
    FILL_STUB(GetDeviceBuf);
    FILL_STUB(CaptureFromDevice);
    FILL_STUB(FlushCapture);
@@ -651,11 +647,9 @@
    }
    /* Nothing to do unless we're set up for queueing. */
    if (device->callbackspec.callback == SDL_BufferQueueDrainCallback) {
        current_audio.impl.LockDevice(device);
        retval = ((Uint32) SDL_CountDataQueue(device->buffer_queue)) + current_audio.impl.GetPendingBytes(device);
        current_audio.impl.UnlockDevice(device);
    } else if (device->callbackspec.callback == SDL_BufferQueueFillCallback) {
    if (device->callbackspec.callback == SDL_BufferQueueDrainCallback ||
        device->callbackspec.callback == SDL_BufferQueueFillCallback)
    {
        current_audio.impl.LockDevice(device);
        retval = (Uint32) SDL_CountDataQueue(device->buffer_queue);
        current_audio.impl.UnlockDevice(device);
@@ -695,8 +689,16 @@
    SDL_assert(!device->iscapture);
#if SDL_AUDIO_DRIVER_ANDROID
    {
        /* Set thread priority to THREAD_PRIORITY_AUDIO */
        extern void Android_JNI_AudioSetThreadPriority(int, int);
        Android_JNI_AudioSetThreadPriority(device->iscapture, device->id);
    }
#else
    /* The audio mixing is always a high priority thread */
    SDL_SetThreadPriority(SDL_THREAD_PRIORITY_TIME_CRITICAL);
#endif
    /* Perform any thread setup */
    device->threadid = SDL_ThreadID();
@@ -792,8 +794,16 @@
    SDL_assert(device->iscapture);
#if SDL_AUDIO_DRIVER_ANDROID
    {
        /* Set thread priority to THREAD_PRIORITY_AUDIO */
        extern void Android_JNI_AudioSetThreadPriority(int, int);
        Android_JNI_AudioSetThreadPriority(device->iscapture, device->id);
    }
#else
    /* The audio mixing is always a high priority thread */
    SDL_SetThreadPriority(SDL_THREAD_PRIORITY_HIGH);
#endif
    /* Perform any thread setup */
    device->threadid = SDL_ThreadID();
@@ -877,8 +887,6 @@
        }
    }
    current_audio.impl.PrepareToClose(device);
    current_audio.impl.FlushCapture(device);
    current_audio.impl.ThreadDeinit(device);
@@ -940,7 +948,7 @@
    }
    SDL_zero(current_audio);
    SDL_zero(open_devices);
    SDL_zeroa(open_devices);
    /* Select the proper audio driver */
    if (driver_name == NULL) {
@@ -1068,7 +1076,7 @@
        return NULL;
    }
    if ((iscapture) && (!current_audio.impl.HasCaptureSupport)) {
    if (iscapture && !current_audio.impl.HasCaptureSupport) {
        SDL_SetError("No capture support");
        return NULL;
    }
@@ -1222,7 +1230,7 @@
        return 0;
    }
    if ((iscapture) && (!current_audio.impl.HasCaptureSupport)) {
    if (iscapture && !current_audio.impl.HasCaptureSupport) {
        SDL_SetError("No capture support");
        return 0;
    }
@@ -1600,7 +1608,7 @@
    SDL_DestroyMutex(current_audio.detectionLock);
    SDL_zero(current_audio);
    SDL_zero(open_devices);
    SDL_zeroa(open_devices);
#ifdef HAVE_LIBSAMPLERATE_H
    UnloadLibSampleRate();
@@ -1656,17 +1664,28 @@
    return format_list[format_idx][format_idx_sub++];
}
Uint8
SDL_SilenceValueForFormat(const SDL_AudioFormat format)
{
    switch (format) {
        /* !!! FIXME: 0x80 isn't perfect for U16, but we can't fit 0x8000 in a
           !!! FIXME:  byte for memset() use. This is actually 0.1953 percent
           !!! FIXME:  off from silence. Maybe just don't use U16. */
        case AUDIO_U16LSB:
        case AUDIO_U16MSB:
        case AUDIO_U8:
            return 0x80;
        default: break;
    }
    return 0x00;
}
void
SDL_CalculateAudioSpec(SDL_AudioSpec * spec)
{
    switch (spec->format) {
    case AUDIO_U8:
        spec->silence = 0x80;
        break;
    default:
        spec->silence = 0x00;
        break;
    }
    spec->silence = SDL_SilenceValueForFormat(spec->format);
    spec->size = SDL_AUDIO_BITSIZE(spec->format) / 8;
    spec->size *= spec->channels;
    spec->size *= spec->samples;
source/src/audio/SDL_audio_c.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -52,6 +52,7 @@
extern SDL_AudioFormat SDL_NextAudioFormat(void);
/* Function to calculate the size and silence for a SDL_AudioSpec */
extern Uint8 SDL_SilenceValueForFormat(const SDL_AudioFormat format);
extern void SDL_CalculateAudioSpec(SDL_AudioSpec * spec);
/* Choose the audio filter functions below */
source/src/audio/SDL_audiocvt.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -677,7 +677,7 @@
        }
        if (!filter) {
            return SDL_SetError("No conversion from float to destination format available");
            return SDL_SetError("No conversion from float to format 0x%.4x available", dst_fmt);
        }
        if (SDL_AddAudioCVTFilter(cvt, filter) < 0) {
@@ -718,9 +718,15 @@
    /* !!! FIXME: remove this if we can get the resampler to work in-place again. */
    float *dst = (float *) (cvt->buf + srclen);
    const int dstlen = (cvt->len * cvt->len_mult) - srclen;
    const int paddingsamples = (ResamplerPadding(inrate, outrate) * chans);
    const int requestedpadding = ResamplerPadding(inrate, outrate);
    int paddingsamples;
    float *padding;
    if (requestedpadding < SDL_MAX_SINT32 / chans) {
        paddingsamples = requestedpadding * chans;
    } else {
        paddingsamples = 0;
    }
    SDL_assert(format == AUDIO_F32SYS);
    /* we keep no streaming state here, so pad with silence on both ends. */
@@ -889,10 +895,14 @@
        return SDL_SetError("Invalid source channels");
    } else if (!SDL_SupportedChannelCount(dst_channels)) {
        return SDL_SetError("Invalid destination channels");
    } else if (src_rate == 0) {
        return SDL_SetError("Source rate is zero");
    } else if (dst_rate == 0) {
        return SDL_SetError("Destination rate is zero");
    } else if (src_rate <= 0) {
        return SDL_SetError("Source rate is equal to or less than zero");
    } else if (dst_rate <= 0) {
        return SDL_SetError("Destination rate is equal to or less than zero");
    } else if (src_rate >= SDL_MAX_SINT32 / RESAMPLER_SAMPLES_PER_ZERO_CROSSING) {
        return SDL_SetError("Source rate is too high");
    } else if (dst_rate >= SDL_MAX_SINT32 / RESAMPLER_SAMPLES_PER_ZERO_CROSSING) {
        return SDL_SetError("Destination rate is too high");
    }
#if DEBUG_CONVERT
@@ -905,7 +915,7 @@
    cvt->dst_format = dst_fmt;
    cvt->needed = 0;
    cvt->filter_index = 0;
    SDL_zero(cvt->filters);
    SDL_zeroa(cvt->filters);
    cvt->len_mult = 1;
    cvt->len_ratio = 1.0;
    cvt->rate_incr = ((double) dst_rate) / ((double) src_rate);
source/src/audio/SDL_audiodev.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/src/audio/SDL_audiodev_c.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/src/audio/SDL_audiotypecvt.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -25,8 +25,7 @@
#include "SDL_cpuinfo.h"
#include "SDL_assert.h"
/* !!! FIXME: disabled until we fix https://bugzilla.libsdl.org/show_bug.cgi?id=4186 */
#if 0 /*def __ARM_NEON__*/
#ifdef __ARM_NEON
#define HAVE_NEON_INTRINSICS 1
#endif
@@ -483,7 +482,7 @@
    if ((((size_t) src) & 15) == 0) {
        /* Aligned! Do SSE blocks as long as we have 16 bytes available. */
        const __m128 divby32768 = _mm_set1_ps(DIVBY32768);
        const __m128 minus1 = _mm_set1_ps(1.0f);
        const __m128 minus1 = _mm_set1_ps(-1.0f);
        while (i >= 8) {   /* 8 * 16-bit */
            const __m128i ints = _mm_load_si128((__m128i const *) src);  /* get 8 sint16 into an XMM register. */
            /* treat as int32, shift left to clear every other sint16, then back right with zero-extend. Now sint32. */
@@ -526,9 +525,9 @@
    }
    SDL_assert(!i || ((((size_t) dst) & 15) == 0));
    SDL_assert(!i || ((((size_t) src) & 15) == 0));
    {
    /* Make sure src is aligned too. */
    if ((((size_t) src) & 15) == 0) {
        /* Aligned! Do SSE blocks as long as we have 16 bytes available. */
        const __m128 divby8388607 = _mm_set1_ps(DIVBY8388607);
        const __m128i *mmsrc = (const __m128i *) src;
@@ -615,7 +614,7 @@
SDL_Convert_F32_to_U8_SSE2(SDL_AudioCVT *cvt, SDL_AudioFormat format)
{
    const float *src = (const float *) cvt->buf;
    Uint8 *dst = (Uint8 *) cvt->buf;
    Uint8 *dst = cvt->buf;
    int i;
    LOG_DEBUG_CONVERT("AUDIO_F32", "AUDIO_U8 (using SSE2)");
@@ -880,10 +879,10 @@
            const int16x8_t int16hi = vmovl_s8(vget_high_s8(bytes));  /* convert top 8 bytes to 8 int16 */
            const int16x8_t int16lo = vmovl_s8(vget_low_s8(bytes));   /* convert bottom 8 bytes to 8 int16 */
            /* split int16 to two int32, then convert to float, then multiply to normalize, store. */
            vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16hi))), divby128));
            vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16hi))), divby128));
            vst1q_f32(dst+8, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16lo))), divby128));
            vst1q_f32(dst+12, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16lo))), divby128));
            vst1q_f32(dst, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16lo))), divby128));
            vst1q_f32(dst+4, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16lo))), divby128));
            vst1q_f32(dst+8, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_low_s16(int16hi))), divby128));
            vst1q_f32(dst+12, vmulq_f32(vcvtq_f32_s32(vmovl_s16(vget_high_s16(int16hi))), divby128));
            i -= 16; mmsrc -= 16; dst -= 16;
        }
@@ -926,16 +925,16 @@
        /* Aligned! Do NEON blocks as long as we have 16 bytes available. */
        const uint8_t *mmsrc = (const uint8_t *) src;
        const float32x4_t divby128 = vdupq_n_f32(DIVBY128);
        const float32x4_t one = vdupq_n_f32(1.0f);
        const float32x4_t negone = vdupq_n_f32(-1.0f);
        while (i >= 16) {   /* 16 * 8-bit */
            const uint8x16_t bytes = vld1q_u8(mmsrc);  /* get 16 uint8 into a NEON register. */
            const uint16x8_t uint16hi = vmovl_u8(vget_high_u8(bytes));  /* convert top 8 bytes to 8 uint16 */
            const uint16x8_t uint16lo = vmovl_u8(vget_low_u8(bytes));   /* convert bottom 8 bytes to 8 uint16 */
            /* split uint16 to two uint32, then convert to float, then multiply to normalize, subtract to adjust for sign, store. */
            vst1q_f32(dst, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16hi))), divby128, one));
            vst1q_f32(dst+4, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16hi))), divby128, one));
            vst1q_f32(dst+8, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16lo))), divby128, one));
            vst1q_f32(dst+12, vmlsq_f32(vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16lo))), divby128, one));
            vst1q_f32(dst, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16lo))), divby128));
            vst1q_f32(dst+4, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16lo))), divby128));
            vst1q_f32(dst+8, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uint16hi))), divby128));
            vst1q_f32(dst+12, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uint16hi))), divby128));
            i -= 16; mmsrc -= 16; dst -= 16;
        }
@@ -1021,12 +1020,12 @@
    if ((((size_t) src) & 15) == 0) {
        /* Aligned! Do NEON blocks as long as we have 16 bytes available. */
        const float32x4_t divby32768 = vdupq_n_f32(DIVBY32768);
        const float32x4_t one = vdupq_n_f32(1.0f);
        const float32x4_t negone = vdupq_n_f32(-1.0f);
        while (i >= 8) {   /* 8 * 16-bit */
            const uint16x8_t uints = vld1q_u16((uint16_t const *) src);  /* get 8 uint16 into a NEON register. */
            /* split uint16 to two int32, then convert to float, then multiply to normalize, subtract for sign, store. */
            vst1q_f32(dst, vmlsq_f32(one, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uints))), divby32768));
            vst1q_f32(dst+4, vmlsq_f32(one, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uints))), divby32768));
            vst1q_f32(dst, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_low_u16(uints))), divby32768));
            vst1q_f32(dst+4, vmlaq_f32(negone, vcvtq_f32_u32(vmovl_u16(vget_high_u16(uints))), divby32768));
            i -= 8; src -= 8; dst -= 8;
        }
    }
@@ -1060,9 +1059,9 @@
    }
    SDL_assert(!i || ((((size_t) dst) & 15) == 0));
    SDL_assert(!i || ((((size_t) src) & 15) == 0));
    {
    /* Make sure src is aligned too. */
    if ((((size_t) src) & 15) == 0) {
        /* Aligned! Do NEON blocks as long as we have 16 bytes available. */
        const float32x4_t divby8388607 = vdupq_n_f32(DIVBY8388607);
        const int32_t *mmsrc = (const int32_t *) src;
@@ -1341,7 +1340,7 @@
        if (sample >= 1.0f) {
            *dst = 2147483647;
        } else if (sample <= -1.0f) {
            *dst = -2147483648;
            *dst = (-2147483647) - 1;
        } else {
            *dst = ((Sint32)(sample * 8388607.0f)) << 8;
        }
@@ -1369,7 +1368,7 @@
        if (sample >= 1.0f) {
            *dst = 2147483647;
        } else if (sample <= -1.0f) {
            *dst = -2147483648;
            *dst = (-2147483647) - 1;
        } else {
            *dst = ((Sint32)(sample * 8388607.0f)) << 8;
        }
source/src/audio/SDL_mixer.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
source/src/audio/SDL_sysaudio.h
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -71,7 +71,6 @@
    void (*BeginLoopIteration)(_THIS);  /* Called by audio thread at top of loop */
    void (*WaitDevice) (_THIS);
    void (*PlayDevice) (_THIS);
    int (*GetPendingBytes) (_THIS);
    Uint8 *(*GetDeviceBuf) (_THIS);
    int (*CaptureFromDevice) (_THIS, void *buffer, int buflen);
    void (*FlushCapture) (_THIS);
@@ -204,6 +203,7 @@
extern AudioBootStrap DISKAUDIO_bootstrap;
extern AudioBootStrap DUMMYAUDIO_bootstrap;
extern AudioBootStrap FUSIONSOUND_bootstrap;
extern AudioBootStrap openslES_bootstrap;
extern AudioBootStrap ANDROIDAUDIO_bootstrap;
extern AudioBootStrap PSPAUDIO_bootstrap;
extern AudioBootStrap EMSCRIPTENAUDIO_bootstrap;
source/src/audio/SDL_wave.c
@@ -1,6 +1,6 @@
/*
  Simple DirectMedia Layer
  Copyright (C) 1997-2018 Sam Lantinga <slouken@libsdl.org>
  Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
  This software is provided 'as-is', without any express or implied
  warranty.  In no event will the authors be held liable for any damages
@@ -20,248 +20,856 @@
*/
#include "../SDL_internal.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
#else
#ifndef SIZE_MAX
#define SIZE_MAX ((size_t)-1)
#endif
#ifndef INT_MAX
/* Make a lucky guess. */
#define INT_MAX SDL_MAX_SINT32
#endif
#endif
/* Microsoft WAVE file loading routines */
#include "SDL_log.h"
#include "SDL_hints.h"
#include "SDL_audio.h"
#include "SDL_wave.h"
#include "SDL_audio_c.h"
static int ReadChunk(SDL_RWops * src, Chunk * chunk);
struct MS_ADPCM_decodestate
{
    Uint8 hPredictor;
    Uint16 iDelta;
    Sint16 iSamp1;
    Sint16 iSamp2;
};
static struct MS_ADPCM_decoder
{
    WaveFMT wavefmt;
    Uint16 wSamplesPerBlock;
    Uint16 wNumCoef;
    Sint16 aCoeff[7][2];
    /* * * */
    struct MS_ADPCM_decodestate state[2];
} MS_ADPCM_state;
/* Reads the value stored at the location of the f1 pointer, multiplies it
 * with the second argument and then stores the result to f1.
 * Returns 0 on success, or -1 if the multiplication overflows, in which case f1
 * does not get modified.
 */
static int
InitMS_ADPCM(WaveFMT * format)
SafeMult(size_t *f1, size_t f2)
{
    Uint8 *rogue_feel;
    int i;
    /* Set the rogue pointer to the MS_ADPCM specific data */
    MS_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
    MS_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
    MS_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
    MS_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
    MS_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
    MS_ADPCM_state.wavefmt.bitspersample =
        SDL_SwapLE16(format->bitspersample);
    rogue_feel = (Uint8 *) format + sizeof(*format);
    if (sizeof(*format) == 16) {
        /* const Uint16 extra_info = ((rogue_feel[1] << 8) | rogue_feel[0]); */
        rogue_feel += sizeof(Uint16);
    if (*f1 > 0 && SIZE_MAX / *f1 <= f2) {
        return -1;
    }
    MS_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1] << 8) | rogue_feel[0]);
    rogue_feel += sizeof(Uint16);
    MS_ADPCM_state.wNumCoef = ((rogue_feel[1] << 8) | rogue_feel[0]);
    rogue_feel += sizeof(Uint16);
    if (MS_ADPCM_state.wNumCoef != 7) {
        SDL_SetError("Unknown set of MS_ADPCM coefficients");
        return (-1);
    }
    for (i = 0; i < MS_ADPCM_state.wNumCoef; ++i) {
        MS_ADPCM_state.aCoeff[i][0] = ((rogue_feel[1] << 8) | rogue_feel[0]);
        rogue_feel += sizeof(Uint16);
        MS_ADPCM_state.aCoeff[i][1] = ((rogue_feel[1] << 8) | rogue_feel[0]);
        rogue_feel += sizeof(Uint16);
    }
    return (0);
    *f1 *= f2;
    return 0;
}
static Sint32
MS_ADPCM_nibble(struct MS_ADPCM_decodestate *state,
                Uint8 nybble, Sint16 * coeff)
typedef struct ADPCM_DecoderState
{
    const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
    const Sint32 min_audioval = -(1 << (16 - 1));
    const Sint32 adaptive[] = {
    Uint32 channels;        /* Number of channels. */
    size_t blocksize;       /* Size of an ADPCM block in bytes. */
    size_t blockheadersize; /* Size of an ADPCM block header in bytes. */
    size_t samplesperblock; /* Number of samples per channel in an ADPCM block. */
    size_t framesize;       /* Size of a sample frame (16-bit PCM) in bytes. */
    Sint64 framestotal;     /* Total number of sample frames. */
    Sint64 framesleft;      /* Number of sample frames still to be decoded. */
    void *ddata;            /* Decoder data from initialization. */
    void *cstate;           /* Decoding state for each channel. */
    /* ADPCM data. */
    struct {
        Uint8 *data;
        size_t size;
        size_t pos;
    } input;
    /* Current ADPCM block in the ADPCM data above. */
    struct {
        Uint8 *data;
        size_t size;
        size_t pos;
    } block;
    /* Decoded 16-bit PCM data. */
    struct {
        Sint16 *data;
        size_t size;
        size_t pos;
    } output;
} ADPCM_DecoderState;
typedef struct MS_ADPCM_CoeffData
{
    Uint16 coeffcount;
    Sint16 *coeff;
    Sint16 aligndummy; /* Has to be last member. */
} MS_ADPCM_CoeffData;
typedef struct MS_ADPCM_ChannelState
{
    Uint16 delta;
    Sint16 coeff1;
    Sint16 coeff2;
} MS_ADPCM_ChannelState;
#ifdef SDL_WAVE_DEBUG_LOG_FORMAT
static void
WaveDebugLogFormat(WaveFile *file)
{
    WaveFormat *format = &file->format;
    const char *fmtstr = "WAVE file: %s, %u Hz, %s, %u bits, %u %s/s";
    const char *waveformat, *wavechannel, *wavebpsunit = "B";
    Uint32 wavebps = format->byterate;
    char channelstr[64];
    SDL_zeroa(channelstr);
    switch (format->encoding) {
    case PCM_CODE:
        waveformat = "PCM";
        break;
    case IEEE_FLOAT_CODE:
        waveformat = "IEEE Float";
        break;
    case ALAW_CODE:
        waveformat = "A-law";
        break;
    case MULAW_CODE:
        waveformat = "\xc2\xb5-law";
        break;
    case MS_ADPCM_CODE:
        waveformat = "MS ADPCM";
        break;
    case IMA_ADPCM_CODE:
        waveformat = "IMA ADPCM";
        break;
    default:
        waveformat = "Unknown";
        break;
    }
#define SDL_WAVE_DEBUG_CHANNELCFG(STR, CODE) case CODE: wavechannel = STR; break;
#define SDL_WAVE_DEBUG_CHANNELSTR(STR, CODE) if (format->channelmask & CODE) { \
    SDL_strlcat(channelstr, channelstr[0] ? "-" STR : STR, sizeof(channelstr));}
    if (format->formattag == EXTENSIBLE_CODE && format->channelmask > 0) {
        switch (format->channelmask) {
            SDL_WAVE_DEBUG_CHANNELCFG("1.0 Mono",         0x4)
            SDL_WAVE_DEBUG_CHANNELCFG("1.1 Mono",         0xc)
            SDL_WAVE_DEBUG_CHANNELCFG("2.0 Stereo",       0x3)
            SDL_WAVE_DEBUG_CHANNELCFG("2.1 Stereo",       0xb)
            SDL_WAVE_DEBUG_CHANNELCFG("3.0 Stereo",       0x7)
            SDL_WAVE_DEBUG_CHANNELCFG("3.1 Stereo",       0xf)
            SDL_WAVE_DEBUG_CHANNELCFG("3.0 Surround",     0x103)
            SDL_WAVE_DEBUG_CHANNELCFG("3.1 Surround",     0x10b)
            SDL_WAVE_DEBUG_CHANNELCFG("4.0 Quad",         0x33)
            SDL_WAVE_DEBUG_CHANNELCFG("4.1 Quad",         0x3b)
            SDL_WAVE_DEBUG_CHANNELCFG("4.0 Surround",     0x107)
            SDL_WAVE_DEBUG_CHANNELCFG("4.1 Surround",     0x10f)
            SDL_WAVE_DEBUG_CHANNELCFG("5.0",              0x37)
            SDL_WAVE_DEBUG_CHANNELCFG("5.1",              0x3f)
            SDL_WAVE_DEBUG_CHANNELCFG("5.0 Side",         0x607)
            SDL_WAVE_DEBUG_CHANNELCFG("5.1 Side",         0x60f)
            SDL_WAVE_DEBUG_CHANNELCFG("6.0",              0x137)
            SDL_WAVE_DEBUG_CHANNELCFG("6.1",              0x13f)
            SDL_WAVE_DEBUG_CHANNELCFG("6.0 Side",         0x707)
            SDL_WAVE_DEBUG_CHANNELCFG("6.1 Side",         0x70f)
            SDL_WAVE_DEBUG_CHANNELCFG("7.0",              0xf7)
            SDL_WAVE_DEBUG_CHANNELCFG("7.1",              0xff)
            SDL_WAVE_DEBUG_CHANNELCFG("7.0 Side",         0x6c7)
            SDL_WAVE_DEBUG_CHANNELCFG("7.1 Side",         0x6cf)
            SDL_WAVE_DEBUG_CHANNELCFG("7.0 Surround",     0x637)
            SDL_WAVE_DEBUG_CHANNELCFG("7.1 Surround",     0x63f)
            SDL_WAVE_DEBUG_CHANNELCFG("9.0 Surround",     0x5637)
            SDL_WAVE_DEBUG_CHANNELCFG("9.1 Surround",     0x563f)
            SDL_WAVE_DEBUG_CHANNELCFG("11.0 Surround",    0x56f7)
            SDL_WAVE_DEBUG_CHANNELCFG("11.1 Surround",    0x56ff)
        default:
            SDL_WAVE_DEBUG_CHANNELSTR("FL",  0x1)
            SDL_WAVE_DEBUG_CHANNELSTR("FR",  0x2)
            SDL_WAVE_DEBUG_CHANNELSTR("FC",  0x4)
            SDL_WAVE_DEBUG_CHANNELSTR("LF",  0x8)
            SDL_WAVE_DEBUG_CHANNELSTR("BL",  0x10)
            SDL_WAVE_DEBUG_CHANNELSTR("BR",  0x20)
            SDL_WAVE_DEBUG_CHANNELSTR("FLC", 0x40)
            SDL_WAVE_DEBUG_CHANNELSTR("FRC", 0x80)
            SDL_WAVE_DEBUG_CHANNELSTR("BC",  0x100)
            SDL_WAVE_DEBUG_CHANNELSTR("SL",  0x200)
            SDL_WAVE_DEBUG_CHANNELSTR("SR",  0x400)
            SDL_WAVE_DEBUG_CHANNELSTR("TC",  0x800)
            SDL_WAVE_DEBUG_CHANNELSTR("TFL", 0x1000)
            SDL_WAVE_DEBUG_CHANNELSTR("TFC", 0x2000)
            SDL_WAVE_DEBUG_CHANNELSTR("TFR", 0x4000)
            SDL_WAVE_DEBUG_CHANNELSTR("TBL", 0x8000)
            SDL_WAVE_DEBUG_CHANNELSTR("TBC", 0x10000)
            SDL_WAVE_DEBUG_CHANNELSTR("TBR", 0x20000)
            break;
        }
    } else {
        switch (format->channels) {
        default:
            if (SDL_snprintf(channelstr, sizeof(channelstr), "%u channels", format->channels) >= 0) {
                wavechannel = channelstr;
                break;
            }
        case 0:
            wavechannel = "Unknown";
            break;
        case 1:
            wavechannel = "Mono";
            break;
        case 2:
            wavechannel = "Setero";
            break;
        }
    }
#undef SDL_WAVE_DEBUG_CHANNELCFG
#undef SDL_WAVE_DEBUG_CHANNELSTR
    if (wavebps >= 1024) {
        wavebpsunit = "KiB";
        wavebps = wavebps / 1024 + (wavebps & 0x3ff ? 1 : 0);
    }
    SDL_LogDebug(SDL_LOG_CATEGORY_AUDIO, fmtstr, waveformat, format->frequency, wavechannel, format->bitspersample, wavebps, wavebpsunit);
}
#endif
#ifdef SDL_WAVE_DEBUG_DUMP_FORMAT
static void
WaveDebugDumpFormat(WaveFile *file, Uint32 rifflen, Uint32 fmtlen, Uint32 datalen)
{
    WaveFormat *format = &file->format;
    const char *fmtstr1 = "WAVE chunk dump:\n"
        "-------------------------------------------\n"
        "RIFF                            %11u\n"
        "-------------------------------------------\n"
        "    fmt                         %11u\n"
        "        wFormatTag                   0x%04x\n"
        "        nChannels               %11u\n"
        "        nSamplesPerSec          %11u\n"
        "        nAvgBytesPerSec         %11u\n"
        "        nBlockAlign             %11u\n";
    const char *fmtstr2 = "        wBitsPerSample          %11u\n";
    const char *fmtstr3 = "        cbSize                  %11u\n";
    const char *fmtstr4a = "        wValidBitsPerSample     %11u\n";
    const char *fmtstr4b = "        wSamplesPerBlock        %11u\n";
    const char *fmtstr5 = "        dwChannelMask            0x%08x\n"
        "        SubFormat\n"
        "        %08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x\n";
    const char *fmtstr6 = "-------------------------------------------\n"
        " fact\n"
        "  dwSampleLength                %11u\n";
    const char *fmtstr7 = "-------------------------------------------\n"
        " data                           %11u\n"
        "-------------------------------------------\n";
    char *dumpstr;
    size_t dumppos = 0;
    const size_t bufsize = 1024;
    int res;
    dumpstr = SDL_malloc(bufsize);
    if (dumpstr == NULL) {
        return;
    }
    dumpstr[0] = 0;
    res = SDL_snprintf(dumpstr, bufsize, fmtstr1, rifflen, fmtlen, format->formattag, format->channels, format->frequency, format->byterate, format->blockalign);
    dumppos += res > 0 ? res : 0;
    if (fmtlen >= 16) {
        res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr2, format->bitspersample);
        dumppos += res > 0 ? res : 0;
    }
    if (fmtlen >= 18) {
        res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr3, format->extsize);
        dumppos += res > 0 ? res : 0;
    }
    if (format->formattag == EXTENSIBLE_CODE && fmtlen >= 40 && format->extsize >= 22) {
        const Uint8 *g = format->subformat;
        const Uint32 g1 = g[0] | ((Uint32)g[1] << 8) | ((Uint32)g[2] << 16) | ((Uint32)g[3] << 24);
        const Uint32 g2 = g[4] | ((Uint32)g[5] << 8);
        const Uint32 g3 = g[6] | ((Uint32)g[7] << 8);
        switch (format->encoding) {
        default:
            res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr4a, format->validsamplebits);
            dumppos += res > 0 ? res : 0;
            break;
        case MS_ADPCM_CODE:
        case IMA_ADPCM_CODE:
            res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr4b, format->samplesperblock);
            dumppos += res > 0 ? res : 0;
            break;
        }
        res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr5, format->channelmask, g1, g2, g3, g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15]);
        dumppos += res > 0 ? res : 0;
    } else {
        switch (format->encoding) {
        case MS_ADPCM_CODE:
        case IMA_ADPCM_CODE:
            if (fmtlen >= 20 && format->extsize >= 2) {
                res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr4b, format->samplesperblock);
                dumppos += res > 0 ? res : 0;
            }
            break;
        }
    }
    if (file->fact.status >= 1) {
        res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr6, file->fact.samplelength);
        dumppos += res > 0 ? res : 0;
    }
    res = SDL_snprintf(dumpstr + dumppos, bufsize - dumppos, fmtstr7, datalen);
    dumppos += res > 0 ? res : 0;
    SDL_LogDebug(SDL_LOG_CATEGORY_AUDIO, "%s", dumpstr);
    free(dumpstr);
}
#endif
static Sint64
WaveAdjustToFactValue(WaveFile *file, Sint64 sampleframes)
{
    if (file->fact.status == 2) {
        if (file->facthint == FactStrict && sampleframes < file->fact.samplelength) {
            return SDL_SetError("Invalid number of sample frames in WAVE fact chunk (too many)");
        } else if (sampleframes > file->fact.samplelength) {
            return file->fact.samplelength;
        }
    }
    return sampleframes;
}
static int
MS_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength)
{
    WaveFormat *format = &file->format;
    const size_t blockheadersize = (size_t)file->format.channels * 7;
    const size_t availableblocks = datalength / file->format.blockalign;
    const size_t blockframebitsize = (size_t)file->format.bitspersample * file->format.channels;
    const size_t trailingdata = datalength % file->format.blockalign;
    if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
        /* The size of the data chunk must be a multiple of the block size. */
        if (datalength < blockheadersize || trailingdata > 0) {
            return SDL_SetError("Truncated MS ADPCM block");
        }
    }
    /* Calculate number of sample frames that will be decoded. */
    file->sampleframes = (Sint64)availableblocks * format->samplesperblock;
    if (trailingdata > 0) {
        /* The last block is truncated. Check if we can get any samples out of it. */
        if (file->trunchint == TruncDropFrame) {
            /* Drop incomplete sample frame. */
            if (trailingdata >= blockheadersize) {
                size_t trailingsamples = 2 + (trailingdata - blockheadersize) * 8 / blockframebitsize;
                if (trailingsamples > format->samplesperblock) {
                    trailingsamples = format->samplesperblock;
                }
                file->sampleframes += trailingsamples;
            }
        }
    }
    file->sampleframes = WaveAdjustToFactValue(file, file->sampleframes);
    if (file->sampleframes < 0) {
        return -1;
    }
    return 0;
}
static int
MS_ADPCM_Init(WaveFile *file, size_t datalength)
{
    WaveFormat *format = &file->format;
    WaveChunk *chunk = &file->chunk;
    const size_t blockheadersize = (size_t)format->channels * 7;
    const size_t blockdatasize = (size_t)format->blockalign - blockheadersize;
    const size_t blockframebitsize = (size_t)format->bitspersample * format->channels;
    const size_t blockdatasamples = (blockdatasize * 8) / blockframebitsize;
    const Sint16 presetcoeffs[14] = {256, 0, 512, -256, 0, 0, 192, 64, 240, 0, 460, -208, 392, -232};
    size_t i, coeffcount;
    MS_ADPCM_CoeffData *coeffdata;
    /* Sanity checks. */
    /* While it's clear how IMA ADPCM handles more than two channels, the nibble
     * order of MS ADPCM makes it awkward. The Standards Update does not talk
     * about supporting more than stereo anyway.
     */
    if (format->channels > 2) {
        return SDL_SetError("Invalid number of channels");
    }
    if (format->bitspersample != 4) {
        return SDL_SetError("Invalid MS ADPCM bits per sample of %u", (unsigned int)format->bitspersample);
    }
    /* The block size must be big enough to contain the block header. */
    if (format->blockalign < blockheadersize) {
        return SDL_SetError("Invalid MS ADPCM block size (nBlockAlign)");
    }
    if (format->formattag == EXTENSIBLE_CODE) {
        /* Does have a GUID (like all format tags), but there's no specification
         * for how the data is packed into the extensible header. Making
         * assumptions here could lead to new formats nobody wants to support.
         */
        return SDL_SetError("MS ADPCM with the extensible header is not supported");
    }
    /* There are wSamplesPerBlock, wNumCoef, and at least 7 coefficient pairs in
     * the extended part of the header.
     */
    if (chunk->size < 22) {
        return SDL_SetError("Could not read MS ADPCM format header");
    }
    format->samplesperblock = chunk->data[18] | ((Uint16)chunk->data[19] << 8);
    /* Number of coefficient pairs. A pair has two 16-bit integers. */
    coeffcount = chunk->data[20] | ((size_t)chunk->data[21] << 8);
    /* bPredictor, the integer offset into the coefficients array, is only
     * 8 bits. It can only address the first 256 coefficients. Let's limit
     * the count number here.
     */
    if (coeffcount > 256) {
        coeffcount = 256;
    }
    if (chunk->size < 22 + coeffcount * 4) {
        return SDL_SetError("Could not read custom coefficients in MS ADPCM format header");
    } else if (format->extsize < 4 + coeffcount * 4) {
        return SDL_SetError("Invalid MS ADPCM format header (too small)");
    } else if (coeffcount < 7) {
        return SDL_SetError("Missing required coefficients in MS ADPCM format header");
    }
    coeffdata = (MS_ADPCM_CoeffData *)SDL_malloc(sizeof(MS_ADPCM_CoeffData) + coeffcount * 4);
    file->decoderdata = coeffdata; /* Freed in cleanup. */
    if (coeffdata == NULL) {
        return SDL_OutOfMemory();
    }
    coeffdata->coeff = &coeffdata->aligndummy;
    coeffdata->coeffcount = (Uint16)coeffcount;
    /* Copy the 16-bit pairs. */
    for (i = 0; i < coeffcount * 2; i++) {
        Sint32 c = chunk->data[22 + i * 2] | ((Sint32)chunk->data[23 + i * 2] << 8);
        if (c >= 0x8000) {
            c -= 0x10000;
        }
        if (i < 14 && c != presetcoeffs[i]) {
            return SDL_SetError("Wrong preset coefficients in MS ADPCM format header");
        }
        coeffdata->coeff[i] = (Sint16)c;
    }
    /* Technically, wSamplesPerBlock is required, but we have all the
     * information in the other fields to calculate it, if it's zero.
     */
    if (format->samplesperblock == 0) {
        /* Let's be nice to the encoders that didn't know how to fill this.
         * The Standards Update calculates it this way:
         *
         *   x = Block size (in bits) minus header size (in bits)
         *   y = Bit depth multiplied by channel count
         *   z = Number of samples per channel in block header
         *   wSamplesPerBlock = x / y + z
         */
        format->samplesperblock = (Uint32)blockdatasamples + 2;
    }
    /* nBlockAlign can be in conflict with wSamplesPerBlock. For example, if
     * the number of samples doesn't fit into the block. The Standards Update
     * also describes wSamplesPerBlock with a formula that makes it necessary to
     * always fill the block with the maximum amount of samples, but this is not
     * enforced here as there are no compatibility issues.
     * A truncated block header with just one sample is not supported.
     */
    if (format->samplesperblock == 1 || blockdatasamples < format->samplesperblock - 2) {
        return SDL_SetError("Invalid number of samples per MS ADPCM block (wSamplesPerBlock)");
    }
    if (MS_ADPCM_CalculateSampleFrames(file, datalength) < 0) {
        return -1;
    }
    return 0;
}
static Sint16
MS_ADPCM_ProcessNibble(MS_ADPCM_ChannelState *cstate, Sint32 sample1, Sint32 sample2, Uint8 nybble)
{
    const Sint32 max_audioval = 32767;
    const Sint32 min_audioval = -32768;
    const Uint16 max_deltaval = 65535;
    const Uint16 adaptive[] = {
        230, 230, 230, 230, 307, 409, 512, 614,
        768, 614, 512, 409, 307, 230, 230, 230
    };
    Sint32 new_sample, delta;
    Sint32 new_sample;
    Sint32 errordelta;
    Uint32 delta = cstate->delta;
    new_sample = ((state->iSamp1 * coeff[0]) +
                  (state->iSamp2 * coeff[1])) / 256;
    if (nybble & 0x08) {
        new_sample += state->iDelta * (nybble - 0x10);
    } else {
        new_sample += state->iDelta * nybble;
    }
    new_sample = (sample1 * cstate->coeff1 + sample2 * cstate->coeff2) / 256;
    /* The nibble is a signed 4-bit error delta. */
    errordelta = (Sint32)nybble - (nybble >= 0x08 ? 0x10 : 0);
    new_sample += (Sint32)delta * errordelta;
    if (new_sample < min_audioval) {
        new_sample = min_audioval;
    } else if (new_sample > max_audioval) {
        new_sample = max_audioval;
    }
    delta = ((Sint32) state->iDelta * adaptive[nybble]) / 256;
    delta = (delta * adaptive[nybble]) / 256;
    if (delta < 16) {
        delta = 16;
    } else if (delta > max_deltaval) {
        /* This issue is not described in the Standards Update and therefore
         * undefined. It seems sensible to prevent overflows with a limit.
         */
        delta = max_deltaval;
    }
    state->iDelta = (Uint16) delta;
    state->iSamp2 = state->iSamp1;
    state->iSamp1 = (Sint16) new_sample;
    return (new_sample);
    cstate->delta = (Uint16)delta;
    return (Sint16)new_sample;
}
static int
MS_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
MS_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state)
{
    struct MS_ADPCM_decodestate *state[2];
    Uint8 *freeable, *encoded, *decoded;
    Sint32 encoded_len, samplesleft;
    Sint8 nybble;
    Uint8 stereo;
    Sint16 *coeff[2];
    Sint32 new_sample;
    Uint8 coeffindex;
    const Uint32 channels = state->channels;
    Sint32 sample;
    Uint32 c;
    MS_ADPCM_ChannelState *cstate = (MS_ADPCM_ChannelState *)state->cstate;
    MS_ADPCM_CoeffData *ddata = (MS_ADPCM_CoeffData *)state->ddata;
    /* Allocate the proper sized output buffer */
    encoded_len = *audio_len;
    encoded = *audio_buf;
    freeable = *audio_buf;
    *audio_len = (encoded_len / MS_ADPCM_state.wavefmt.blockalign) *
        MS_ADPCM_state.wSamplesPerBlock *
        MS_ADPCM_state.wavefmt.channels * sizeof(Sint16);
    *audio_buf = (Uint8 *) SDL_malloc(*audio_len);
    if (*audio_buf == NULL) {
    for (c = 0; c < channels; c++) {
        size_t o = c;
        /* Load the coefficient pair into the channel state. */
        coeffindex = state->block.data[o];
        if (coeffindex > ddata->coeffcount) {
            return SDL_SetError("Invalid MS ADPCM coefficient index in block header");
        }
        cstate[c].coeff1 = ddata->coeff[coeffindex * 2];
        cstate[c].coeff2 = ddata->coeff[coeffindex * 2 + 1];
        /* Initial delta value. */
        o = channels + c * 2;
        cstate[c].delta = state->block.data[o] | ((Uint16)state->block.data[o + 1] << 8);
        /* Load the samples from the header. Interestingly, the sample later in
         * the output stream comes first.
         */
        o = channels * 3 + c * 2;
        sample = state->block.data[o] | ((Sint32)state->block.data[o + 1] << 8);
        if (sample >= 0x8000) {
            sample -= 0x10000;
        }
        state->output.data[state->output.pos + channels] = (Sint16)sample;
        o = channels * 5 + c * 2;
        sample = state->block.data[o] | ((Sint32)state->block.data[o + 1] << 8);
        if (sample >= 0x8000) {
            sample -= 0x10000;
        }
        state->output.data[state->output.pos] = (Sint16)sample;
        state->output.pos++;
    }
    state->block.pos += state->blockheadersize;
    /* Skip second sample frame that came from the header. */
    state->output.pos += state->channels;
    /* Header provided two sample frames. */
    state->framesleft -= 2;
    return 0;
}
/* Decodes the data of the MS ADPCM block. Decoding will stop if a block is too
 * short, returning with none or partially decoded data. The partial data
 * will always contain full sample frames (same sample count for each channel).
 * Incomplete sample frames are discarded.
 */
static int
MS_ADPCM_DecodeBlockData(ADPCM_DecoderState *state)
{
    Uint16 nybble = 0;
    Sint16 sample1, sample2;
    const Uint32 channels = state->channels;
    Uint32 c;
    MS_ADPCM_ChannelState *cstate = (MS_ADPCM_ChannelState *)state->cstate;
    size_t blockpos = state->block.pos;
    size_t blocksize = state->block.size;
    size_t outpos = state->output.pos;
    Sint64 blockframesleft = state->samplesperblock - 2;
    if (blockframesleft > state->framesleft) {
        blockframesleft = state->framesleft;
    }
    while (blockframesleft > 0) {
        for (c = 0; c < channels; c++) {
            if (nybble & 0x4000) {
                nybble <<= 4;
            } else if (blockpos < blocksize) {
                nybble = state->block.data[blockpos++] | 0x4000;
            } else {
                /* Out of input data. Drop the incomplete frame and return. */
                state->output.pos = outpos - c;
                return -1;
            }
            /* Load previous samples which may come from the block header. */
            sample1 = state->output.data[outpos - channels];
            sample2 = state->output.data[outpos - channels * 2];
            sample1 = MS_ADPCM_ProcessNibble(cstate + c, sample1, sample2, (nybble >> 4) & 0x0f);
            state->output.data[outpos++] = sample1;
        }
        state->framesleft--;
        blockframesleft--;
    }
    state->output.pos = outpos;
    return 0;
}
static int
MS_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
{
    int result;
    size_t bytesleft, outputsize;
    WaveChunk *chunk = &file->chunk;
    ADPCM_DecoderState state;
    MS_ADPCM_ChannelState cstate[2];
    SDL_zero(state);
    SDL_zeroa(cstate);
    if (chunk->size != chunk->length) {
        /* Could not read everything. Recalculate number of sample frames. */
        if (MS_ADPCM_CalculateSampleFrames(file, chunk->size) < 0) {
            return -1;
        }
    }
    /* Nothing to decode, nothing to return. */
    if (file->sampleframes == 0) {
        *audio_buf = NULL;
        *audio_len = 0;
        return 0;
    }
    state.blocksize = file->format.blockalign;
    state.channels = file->format.channels;
    state.blockheadersize = (size_t)state.channels * 7;
    state.samplesperblock = file->format.samplesperblock;
    state.framesize = state.channels * sizeof(Sint16);
    state.ddata = file->decoderdata;
    state.framestotal = file->sampleframes;
    state.framesleft = state.framestotal;
    state.input.data = chunk->data;
    state.input.size = chunk->size;
    state.input.pos = 0;
    /* The output size in bytes. May get modified if data is truncated. */
    outputsize = (size_t)state.framestotal;
    if (SafeMult(&outputsize, state.framesize)) {
        return SDL_OutOfMemory();
    } else if (outputsize > SDL_MAX_UINT32 || state.framestotal > SIZE_MAX) {
        return SDL_SetError("WAVE file too big");
    }
    state.output.pos = 0;
    state.output.size = outputsize / sizeof(Sint16);
    state.output.data = (Sint16 *)SDL_malloc(outputsize);
    if (state.output.data == NULL) {
        return SDL_OutOfMemory();
    }
    decoded = *audio_buf;
    /* Get ready... Go! */
    stereo = (MS_ADPCM_state.wavefmt.channels == 2);
    state[0] = &MS_ADPCM_state.state[0];
    state[1] = &MS_ADPCM_state.state[stereo];
    while (encoded_len >= MS_ADPCM_state.wavefmt.blockalign) {
        /* Grab the initial information for this block */
        state[0]->hPredictor = *encoded++;
        if (stereo) {
            state[1]->hPredictor = *encoded++;
        }
        state[0]->iDelta = ((encoded[1] << 8) | encoded[0]);
        encoded += sizeof(Sint16);
        if (stereo) {
            state[1]->iDelta = ((encoded[1] << 8) | encoded[0]);
            encoded += sizeof(Sint16);
        }
        state[0]->iSamp1 = ((encoded[1] << 8) | encoded[0]);
        encoded += sizeof(Sint16);
        if (stereo) {
            state[1]->iSamp1 = ((encoded[1] << 8) | encoded[0]);
            encoded += sizeof(Sint16);
        }
        state[0]->iSamp2 = ((encoded[1] << 8) | encoded[0]);
        encoded += sizeof(Sint16);
        if (stereo) {
            state[1]->iSamp2 = ((encoded[1] << 8) | encoded[0]);
            encoded += sizeof(Sint16);
        }
        coeff[0] = MS_ADPCM_state.aCoeff[state[0]->hPredictor];
        coeff[1] = MS_ADPCM_state.aCoeff[state[1]->hPredictor];
    state.cstate = cstate;
        /* Store the two initial samples we start with */
        decoded[0] = state[0]->iSamp2 & 0xFF;
        decoded[1] = state[0]->iSamp2 >> 8;
        decoded += 2;
        if (stereo) {
            decoded[0] = state[1]->iSamp2 & 0xFF;
            decoded[1] = state[1]->iSamp2 >> 8;
            decoded += 2;
        }
        decoded[0] = state[0]->iSamp1 & 0xFF;
        decoded[1] = state[0]->iSamp1 >> 8;
        decoded += 2;
        if (stereo) {
            decoded[0] = state[1]->iSamp1 & 0xFF;
            decoded[1] = state[1]->iSamp1 >> 8;
            decoded += 2;
    /* Decode block by block. A truncated block will stop the decoding. */
    bytesleft = state.input.size - state.input.pos;
    while (state.framesleft > 0 && bytesleft >= state.blockheadersize) {
        state.block.data = state.input.data + state.input.pos;
        state.block.size = bytesleft < state.blocksize ? bytesleft : state.blocksize;
        state.block.pos = 0;
        if (state.output.size - state.output.pos < (Uint64)state.framesleft * state.channels) {
            /* Somehow didn't allocate enough space for the output. */
            SDL_free(state.output.data);
            return SDL_SetError("Unexpected overflow in MS ADPCM decoder");
        }
        /* Decode and store the other samples in this block */
        samplesleft = (MS_ADPCM_state.wSamplesPerBlock - 2) *
            MS_ADPCM_state.wavefmt.channels;
        while (samplesleft > 0) {
            nybble = (*encoded) >> 4;
            new_sample = MS_ADPCM_nibble(state[0], nybble, coeff[0]);
            decoded[0] = new_sample & 0xFF;
            new_sample >>= 8;
            decoded[1] = new_sample & 0xFF;
            decoded += 2;
            nybble = (*encoded) & 0x0F;
            new_sample = MS_ADPCM_nibble(state[1], nybble, coeff[1]);
            decoded[0] = new_sample & 0xFF;
            new_sample >>= 8;
            decoded[1] = new_sample & 0xFF;
            decoded += 2;
            ++encoded;
            samplesleft -= 2;
        /* Initialize decoder with the values from the block header. */
        result = MS_ADPCM_DecodeBlockHeader(&state);
        if (result == -1) {
            SDL_free(state.output.data);
            return -1;
        }
        encoded_len -= MS_ADPCM_state.wavefmt.blockalign;
        /* Decode the block data. It stores the samples directly in the output. */
        result = MS_ADPCM_DecodeBlockData(&state);
        if (result == -1) {
            /* Unexpected end. Stop decoding and return partial data if necessary. */
            if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
                SDL_free(state.output.data);
                return SDL_SetError("Truncated data chunk");
            } else if (file->trunchint != TruncDropFrame) {
                state.output.pos -= state.output.pos % (state.samplesperblock * state.channels);
            }
            outputsize = state.output.pos * sizeof(Sint16); /* Can't overflow, is always smaller. */
            break;
        }
        state.input.pos += state.block.size;
        bytesleft = state.input.size - state.input.pos;
    }
    SDL_free(freeable);
    return (0);
}
struct IMA_ADPCM_decodestate
{
    Sint32 sample;
    Sint8 index;
};
static struct IMA_ADPCM_decoder
{
    WaveFMT wavefmt;
    Uint16 wSamplesPerBlock;
    /* * * */
    struct IMA_ADPCM_decodestate state[2];
} IMA_ADPCM_state;
    *audio_buf = (Uint8 *)state.output.data;
    *audio_len = (Uint32)outputsize;
    return 0;
}
static int
InitIMA_ADPCM(WaveFMT * format)
IMA_ADPCM_CalculateSampleFrames(WaveFile *file, size_t datalength)
{
    Uint8 *rogue_feel;
    WaveFormat *format = &file->format;
    const size_t blockheadersize = (size_t)format->channels * 4;
    const size_t subblockframesize = (size_t)format->channels * 4;
    const size_t availableblocks = datalength / format->blockalign;
    const size_t trailingdata = datalength % format->blockalign;
    /* Set the rogue pointer to the IMA_ADPCM specific data */
    IMA_ADPCM_state.wavefmt.encoding = SDL_SwapLE16(format->encoding);
    IMA_ADPCM_state.wavefmt.channels = SDL_SwapLE16(format->channels);
    IMA_ADPCM_state.wavefmt.frequency = SDL_SwapLE32(format->frequency);
    IMA_ADPCM_state.wavefmt.byterate = SDL_SwapLE32(format->byterate);
    IMA_ADPCM_state.wavefmt.blockalign = SDL_SwapLE16(format->blockalign);
    IMA_ADPCM_state.wavefmt.bitspersample =
        SDL_SwapLE16(format->bitspersample);
    rogue_feel = (Uint8 *) format + sizeof(*format);
    if (sizeof(*format) == 16) {
        /* const Uint16 extra_info = ((rogue_feel[1] << 8) | rogue_feel[0]); */
        rogue_feel += sizeof(Uint16);
    if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
        /* The size of the data chunk must be a multiple of the block size. */
        if (datalength < blockheadersize || trailingdata > 0) {
            return SDL_SetError("Truncated IMA ADPCM block");
        }
    }
    IMA_ADPCM_state.wSamplesPerBlock = ((rogue_feel[1] << 8) | rogue_feel[0]);
    return (0);
    /* Calculate number of sample frames that will be decoded. */
    file->sampleframes = (Uint64)availableblocks * format->samplesperblock;
    if (trailingdata > 0) {
        /* The last block is truncated. Check if we can get any samples out of it. */
        if (file->trunchint == TruncDropFrame && trailingdata > blockheadersize - 2) {
            /* The sample frame in the header of the truncated block is present.
             * Drop incomplete sample frames.
             */
            size_t trailingsamples = 1;
            if (trailingdata > blockheadersize) {
                /* More data following after the header. */
                const size_t trailingblockdata = trailingdata - blockheadersize;
                const size_t trailingsubblockdata = trailingblockdata % subblockframesize;
                trailingsamples += (trailingblockdata / subblockframesize) * 8;
                /* Due to the interleaved sub-blocks, the last 4 bytes determine
                 * how many samples of the truncated sub-block are lost.
                 */
                if (trailingsubblockdata > subblockframesize - 4) {
                    trailingsamples += (trailingsubblockdata % 4) * 2;
                }
            }
            if (trailingsamples > format->samplesperblock) {
                trailingsamples = format->samplesperblock;
            }
            file->sampleframes += trailingsamples;
        }
    }
    file->sampleframes = WaveAdjustToFactValue(file, file->sampleframes);
    if (file->sampleframes < 0) {
        return -1;
    }
    return 0;
}
static Sint32
IMA_ADPCM_nibble(struct IMA_ADPCM_decodestate *state, Uint8 nybble)
static int
IMA_ADPCM_Init(WaveFile *file, size_t datalength)
{
    const Sint32 max_audioval = ((1 << (16 - 1)) - 1);
    const Sint32 min_audioval = -(1 << (16 - 1));
    const int index_table[16] = {
    WaveFormat *format = &file->format;
    WaveChunk *chunk = &file->chunk;
    const size_t blockheadersize = (size_t)format->channels * 4;
    const size_t blockdatasize = (size_t)format->blockalign - blockheadersize;
    const size_t blockframebitsize = (size_t)format->bitspersample * format->channels;
    const size_t blockdatasamples = (blockdatasize * 8) / blockframebitsize;
    /* Sanity checks. */
    /* IMA ADPCM can also have 3-bit samples, but it's not supported by SDL at this time. */
    if (format->bitspersample == 3) {
        return SDL_SetError("3-bit IMA ADPCM currently not supported");
    } else if (format->bitspersample != 4) {
        return SDL_SetError("Invalid IMA ADPCM bits per sample of %u", (unsigned int)format->bitspersample);
    }
    /* The block size is required to be a multiple of 4 and it must be able to
     * hold a block header.
     */
    if (format->blockalign < blockheadersize || format->blockalign % 4) {
        return SDL_SetError("Invalid IMA ADPCM block size (nBlockAlign)");
    }
    if (format->formattag == EXTENSIBLE_CODE) {
        /* There's no specification for this, but it's basically the same
         * format because the extensible header has wSampePerBlocks too.
         */
    } else  {
        /* The Standards Update says there 'should' be 2 bytes for wSamplesPerBlock. */
        if (chunk->size >= 20 && format->extsize >= 2) {
            format->samplesperblock = chunk->data[18] | ((Uint16)chunk->data[19] << 8);
        }
    }
    if (format->samplesperblock == 0) {
        /* Field zero? No problem. We just assume the encoder packed the block.
         * The specification calculates it this way:
         *
         *   x = Block size (in bits) minus header size (in bits)
         *   y = Bit depth multiplied by channel count
         *   z = Number of samples per channel in header
         *   wSamplesPerBlock = x / y + z
         */
        format->samplesperblock = (Uint32)blockdatasamples + 1;
    }
    /* nBlockAlign can be in conflict with wSamplesPerBlock. For example, if
     * the number of samples doesn't fit into the block. The Standards Update
     * also describes wSamplesPerBlock with a formula that makes it necessary
     * to always fill the block with the maximum amount of samples, but this is
     * not enforced here as there are no compatibility issues.
     */
    if (blockdatasamples < format->samplesperblock - 1) {
        return SDL_SetError("Invalid number of samples per IMA ADPCM block (wSamplesPerBlock)");
    }
    if (IMA_ADPCM_CalculateSampleFrames(file, datalength) < 0) {
        return -1;
    }
    return 0;
}
static Sint16
IMA_ADPCM_ProcessNibble(Sint8 *cindex, Sint16 lastsample, Uint8 nybble)
{
    const Sint32 max_audioval = 32767;
    const Sint32 min_audioval = -32768;
    const Sint8 index_table_4b[16] = {
        -1, -1, -1, -1,
        2, 4, 6, 8,
        -1, -1, -1, -1,
        2, 4, 6, 8
    };
    const Sint32 step_table[89] = {
    const Uint16 step_table[89] = {
        7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31,
        34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130,
        143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408,
@@ -271,424 +879,1278 @@
        9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350,
        22385, 24623, 27086, 29794, 32767
    };
    Sint32 delta, step;
    Uint32 step;
    Sint32 sample, delta;
    Sint8 index = *cindex;
    /* Compute difference and new sample value */
    if (state->index > 88) {
        state->index = 88;
    } else if (state->index < 0) {
        state->index = 0;
    /* Clamp index into valid range. */
    if (index > 88) {
        index = 88;
    } else if (index < 0) {
        index = 0;
    }
    /* explicit cast to avoid gcc warning about using 'char' as array index */
    step = step_table[(int)state->index];
    step = step_table[(size_t)index];
    /* Update index value */
    *cindex = index + index_table_4b[nybble];
    /* This calculation uses shifts and additions because multiplications were
     * much slower back then. Sadly, this can't just be replaced with an actual
     * multiplication now as the old algorithm drops some bits. The closest
     * approximation I could find is something like this:
     * (nybble & 0x8 ? -1 : 1) * ((nybble & 0x7) * step / 4 + step / 8)
     */
    delta = step >> 3;
    if (nybble & 0x04)
        delta += step;
    if (nybble & 0x02)
        delta += (step >> 1);
        delta += step >> 1;
    if (nybble & 0x01)
        delta += (step >> 2);
        delta += step >> 2;
    if (nybble & 0x08)
        delta = -delta;
    state->sample += delta;
    /* Update index value */
    state->index += index_table[nybble];
    sample = lastsample + delta;
    /* Clamp output sample */
    if (state->sample > max_audioval) {
        state->sample = max_audioval;
    } else if (state->sample < min_audioval) {
        state->sample = min_audioval;
    if (sample > max_audioval) {
        sample = max_audioval;
    } else if (sample < min_audioval) {
        sample = min_audioval;
    }
    return (state->sample);
}
/* Fill the decode buffer with a channel block of data (8 samples) */
static void
Fill_IMA_ADPCM_block(Uint8 * decoded, Uint8 * encoded,
                     int channel, int numchannels,
                     struct IMA_ADPCM_decodestate *state)
{
    int i;
    Sint8 nybble;
    Sint32 new_sample;
    decoded += (channel * 2);
    for (i = 0; i < 4; ++i) {
        nybble = (*encoded) & 0x0F;
        new_sample = IMA_ADPCM_nibble(state, nybble);
        decoded[0] = new_sample & 0xFF;
        new_sample >>= 8;
        decoded[1] = new_sample & 0xFF;
        decoded += 2 * numchannels;
        nybble = (*encoded) >> 4;
        new_sample = IMA_ADPCM_nibble(state, nybble);
        decoded[0] = new_sample & 0xFF;
        new_sample >>= 8;
        decoded[1] = new_sample & 0xFF;
        decoded += 2 * numchannels;
        ++encoded;
    }
    return (Sint16)sample;
}
static int
IMA_ADPCM_decode(Uint8 ** audio_buf, Uint32 * audio_len)
IMA_ADPCM_DecodeBlockHeader(ADPCM_DecoderState *state)
{
    struct IMA_ADPCM_decodestate *state;
    Uint8 *freeable, *encoded, *decoded;
    Sint32 encoded_len, samplesleft;
    unsigned int c, channels;
    Sint16 step;
    Uint32 c;
    Uint8 *cstate = state->cstate;
    /* Check to make sure we have enough variables in the state array */
    channels = IMA_ADPCM_state.wavefmt.channels;
    if (channels > SDL_arraysize(IMA_ADPCM_state.state)) {
        SDL_SetError("IMA ADPCM decoder can only handle %u channels",
                     (unsigned int)SDL_arraysize(IMA_ADPCM_state.state));
        return (-1);
    }
    state = IMA_ADPCM_state.state;
    for (c = 0; c < state->channels; c++) {
        size_t o = state->block.pos + c * 4;
    /* Allocate the proper sized output buffer */
    encoded_len = *audio_len;
    encoded = *audio_buf;
    freeable = *audio_buf;
    *audio_len = (encoded_len / IMA_ADPCM_state.wavefmt.blockalign) *
        IMA_ADPCM_state.wSamplesPerBlock *
        IMA_ADPCM_state.wavefmt.channels * sizeof(Sint16);
    *audio_buf = (Uint8 *) SDL_malloc(*audio_len);
    if (*audio_buf == NULL) {
        return SDL_OutOfMemory();
    }
    decoded = *audio_buf;
    /* Get ready... Go! */
    while (encoded_len >= IMA_ADPCM_state.wavefmt.blockalign) {
        /* Grab the initial information for this block */
        for (c = 0; c < channels; ++c) {
            /* Fill the state information for this block */
            state[c].sample = ((encoded[1] << 8) | encoded[0]);
            encoded += 2;
            if (state[c].sample & 0x8000) {
                state[c].sample -= 0x10000;
            }
            state[c].index = *encoded++;
            /* Reserved byte in buffer header, should be 0 */
            if (*encoded++ != 0) {
                /* Uh oh, corrupt data?  Buggy code? */ ;
            }
            /* Store the initial sample we start with */
            decoded[0] = (Uint8) (state[c].sample & 0xFF);
            decoded[1] = (Uint8) (state[c].sample >> 8);
            decoded += 2;
        /* Extract the sample from the header. */
        Sint32 sample = state->block.data[o] | ((Sint32)state->block.data[o + 1] << 8);
        if (sample >= 0x8000) {
            sample -= 0x10000;
        }
        state->output.data[state->output.pos++] = (Sint16)sample;
        /* Decode and store the other samples in this block */
        samplesleft = (IMA_ADPCM_state.wSamplesPerBlock - 1) * channels;
        while (samplesleft > 0) {
            for (c = 0; c < channels; ++c) {
                Fill_IMA_ADPCM_block(decoded, encoded,
                                     c, channels, &state[c]);
                encoded += 4;
                samplesleft -= 8;
            }
            decoded += (channels * 8 * 2);
        /* Channel step index. */
        step = (Sint16)state->block.data[o + 2];
        cstate[c] = (Sint8)(step > 0x80 ? step - 0x100 : step);
        /* Reserved byte in block header, should be 0. */
        if (state->block.data[o + 3] != 0) {
            /* Uh oh, corrupt data?  Buggy code? */ ;
        }
        encoded_len -= IMA_ADPCM_state.wavefmt.blockalign;
    }
    SDL_free(freeable);
    return (0);
    state->block.pos += state->blockheadersize;
    /* Header provided one sample frame. */
    state->framesleft--;
    return 0;
}
/* Decodes the data of the IMA ADPCM block. Decoding will stop if a block is too
 * short, returning with none or partially decoded data. The partial data always
 * contains full sample frames (same sample count for each channel).
 * Incomplete sample frames are discarded.
 */
static int
IMA_ADPCM_DecodeBlockData(ADPCM_DecoderState *state)
{
    size_t i;
    int retval = 0;
    const Uint32 channels = state->channels;
    const size_t subblockframesize = channels * 4;
    Uint64 bytesrequired;
    Uint32 c;
    size_t blockpos = state->block.pos;
    size_t blocksize = state->block.size;
    size_t blockleft = blocksize - blockpos;
    size_t outpos = state->output.pos;
    Sint64 blockframesleft = state->samplesperblock - 1;
    if (blockframesleft > state->framesleft) {
        blockframesleft = state->framesleft;
    }
    bytesrequired = (blockframesleft + 7) / 8 * subblockframesize;
    if (blockleft < bytesrequired) {
        /* Data truncated. Calculate how many samples we can get out if it. */
        const size_t guaranteedframes = blockleft / subblockframesize;
        const size_t remainingbytes = blockleft % subblockframesize;
        blockframesleft = guaranteedframes;
        if (remainingbytes > subblockframesize - 4) {
            blockframesleft += (remainingbytes % 4) * 2;
        }
        /* Signal the truncation. */
        retval = -1;
    }
    /* Each channel has their nibbles packed into 32-bit blocks. These blocks
     * are interleaved and make up the data part of the ADPCM block. This loop
     * decodes the samples as they come from the input data and puts them at
     * the appropriate places in the output data.
     */
    while (blockframesleft > 0) {
        const size_t subblocksamples = blockframesleft < 8 ? (size_t)blockframesleft : 8;
        for (c = 0; c < channels; c++) {
            Uint8 nybble = 0;
            /* Load previous sample which may come from the block header. */
            Sint16 sample = state->output.data[outpos + c - channels];
            for (i = 0; i < subblocksamples; i++) {
                if (i & 1) {
                    nybble >>= 4;
                } else {
                    nybble = state->block.data[blockpos++];
                }
                sample = IMA_ADPCM_ProcessNibble((Sint8 *)state->cstate + c, sample, nybble & 0x0f);
                state->output.data[outpos + c + i * channels] = sample;
            }
        }
        outpos += channels * subblocksamples;
        state->framesleft -= subblocksamples;
        blockframesleft -= subblocksamples;
    }
    state->block.pos = blockpos;
    state->output.pos = outpos;
    return retval;
}
static int
ConvertSint24ToSint32(Uint8 ** audio_buf, Uint32 * audio_len)
IMA_ADPCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
{
    const double DIVBY8388608 = 0.00000011920928955078125;
    const Uint32 original_len = *audio_len;
    const Uint32 samples = original_len / 3;
    const Uint32 expanded_len = samples * sizeof (Uint32);
    Uint8 *ptr = (Uint8 *) SDL_realloc(*audio_buf, expanded_len);
    const Uint8 *src;
    Uint32 *dst;
    Uint32 i;
    int result;
    size_t bytesleft, outputsize;
    WaveChunk *chunk = &file->chunk;
    ADPCM_DecoderState state;
    Sint8 *cstate;
    if (!ptr) {
    if (chunk->size != chunk->length) {
        /* Could not read everything. Recalculate number of sample frames. */
        if (IMA_ADPCM_CalculateSampleFrames(file, chunk->size) < 0) {
            return -1;
        }
    }
    /* Nothing to decode, nothing to return. */
    if (file->sampleframes == 0) {
        *audio_buf = NULL;
        *audio_len = 0;
        return 0;
    }
    SDL_zero(state);
    state.channels = file->format.channels;
    state.blocksize = file->format.blockalign;
    state.blockheadersize = (size_t)state.channels * 4;
    state.samplesperblock = file->format.samplesperblock;
    state.framesize = state.channels * sizeof(Sint16);
    state.framestotal = file->sampleframes;
    state.framesleft = state.framestotal;
    state.input.data = chunk->data;
    state.input.size = chunk->size;
    state.input.pos = 0;
    /* The output size in bytes. May get modified if data is truncated. */
    outputsize = (size_t)state.framestotal;
    if (SafeMult(&outputsize, state.framesize)) {
        return SDL_OutOfMemory();
    } else if (outputsize > SDL_MAX_UINT32 || state.framestotal > SIZE_MAX) {
        return SDL_SetError("WAVE file too big");
    }
    state.output.pos = 0;
    state.output.size = outputsize / sizeof(Sint16);
    state.output.data = (Sint16 *)SDL_malloc(outputsize);
    if (state.output.data == NULL) {
        return SDL_OutOfMemory();
    }
    *audio_buf = ptr;
    *audio_len = expanded_len;
    cstate = (Sint8 *)SDL_calloc(state.channels, sizeof(Sint8));
    if (cstate == NULL) {
        SDL_free(state.output.data);
        return SDL_OutOfMemory();
    }
    state.cstate = cstate;
    /* work from end to start, since we're expanding in-place. */
    src = (ptr + original_len) - 3;
    dst = ((Uint32 *) (ptr + expanded_len)) - 1;
    for (i = 0; i < samples; i++) {
        /* There's probably a faster way to do all this. */
        const Sint32 converted = ((Sint32) ( (((Uint32) src[2]) << 24) |
                                             (((Uint32) src[1]) << 16) |
                                             (((Uint32) src[0]) << 8) )) >> 8;
        const double scaled = (((double) converted) * DIVBY8388608);
        src -= 3;
        *(dst--) = (Sint32) (scaled * 2147483647.0);
    /* Decode block by block. A truncated block will stop the decoding. */
    bytesleft = state.input.size - state.input.pos;
    while (state.framesleft > 0 && bytesleft >= state.blockheadersize) {
        state.block.data = state.input.data + state.input.pos;
        state.block.size = bytesleft < state.blocksize ? bytesleft : state.blocksize;
        state.block.pos = 0;
        if (state.output.size - state.output.pos < (Uint64)state.framesleft * state.channels) {
            /* Somehow didn't allocate enough space for the output. */
            SDL_free(state.output.data);
            SDL_free(cstate);
            return SDL_SetError("Unexpected overflow in IMA ADPCM decoder");
        }
        /* Initialize decoder with the values from the block header. */
        result = IMA_ADPCM_DecodeBlockHeader(&state);
        if (result == 0) {
            /* Decode the block data. It stores the samples directly in the output. */
            result = IMA_ADPCM_DecodeBlockData(&state);
        }
        if (result == -1) {
            /* Unexpected end. Stop decoding and return partial data if necessary. */
            if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
                SDL_free(state.output.data);
                SDL_free(cstate);
                return SDL_SetError("Truncated data chunk");
            } else if (file->trunchint != TruncDropFrame) {
                state.output.pos -= state.output.pos % (state.samplesperblock * state.channels);
            }
            outputsize = state.output.pos * sizeof(Sint16); /* Can't overflow, is always smaller. */
            break;
        }
        state.input.pos += state.block.size;
        bytesleft = state.input.size - state.input.pos;
    }
    *audio_buf = (Uint8 *)state.output.data;
    *audio_len = (Uint32)outputsize;
    SDL_free(cstate);
    return 0;
}
static int
LAW_Init(WaveFile *file, size_t datalength)
{
    WaveFormat *format = &file->format;
    /* Standards Update requires this to be 8. */
    if (format->bitspersample != 8) {
        return SDL_SetError("Invalid companded bits per sample of %u", (unsigned int)format->bitspersample);
    }
    /* Not going to bother with weird padding. */
    if (format->blockalign != format->channels) {
        return SDL_SetError("Unsupported block alignment");
    }
    if ((file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict)) {
        if (format->blockalign > 1 && datalength % format->blockalign) {
            return SDL_SetError("Truncated data chunk in WAVE file");
        }
    }
    file->sampleframes = WaveAdjustToFactValue(file, datalength / format->blockalign);
    if (file->sampleframes < 0) {
        return -1;
    }
    return 0;
}
/* GUIDs that are used by WAVE_FORMAT_EXTENSIBLE */
static const Uint8 extensible_pcm_guid[16] = { 1, 0, 0, 0, 0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113 };
static const Uint8 extensible_ieee_guid[16] = { 3, 0, 0, 0, 0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113 };
SDL_AudioSpec *
SDL_LoadWAV_RW(SDL_RWops * src, int freesrc,
               SDL_AudioSpec * spec, Uint8 ** audio_buf, Uint32 * audio_len)
static int
LAW_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
{
    int was_error;
    Chunk chunk;
    int lenread;
    int IEEE_float_encoded, MS_ADPCM_encoded, IMA_ADPCM_encoded;
    int samplesize;
#ifdef SDL_WAVE_LAW_LUT
    const Sint16 alaw_lut[256] = {
        -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, -2752,
        -2624, -3008, -2880, -2240, -2112, -2496, -2368, -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, -22016,
        -20992, -24064, -23040, -17920, -16896, -19968, -18944, -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136, -11008,
        -10496, -12032, -11520, -8960, -8448, -9984, -9472, -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568, -344,
        -328, -376, -360, -280, -264, -312, -296, -472, -456, -504, -488, -408, -392, -440, -424, -88,
        -72, -120, -104, -24, -8, -56, -40, -216, -200, -248, -232, -152, -136, -184, -168, -1376,
        -1312, -1504, -1440, -1120, -1056, -1248, -1184, -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, -688,
        -656, -752, -720, -560, -528, -624, -592, -944, -912, -1008, -976, -816, -784, -880, -848, 5504,
        5248, 6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, 2752,
        2624, 3008, 2880, 2240, 2112, 2496, 2368, 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, 22016,
        20992, 24064, 23040, 17920, 16896, 19968, 18944, 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, 11008,
        10496, 12032, 11520, 8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, 344,
        328, 376, 360, 280, 264, 312, 296, 472, 456, 504, 488, 408, 392, 440, 424, 88,
        72, 120, 104, 24, 8, 56, 40, 216, 200, 248, 232, 152, 136, 184, 168, 1376,
        1312, 1504, 1440, 1120, 1056, 1248, 1184, 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688,
        656, 752, 720, 560, 528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848
    };
    const Sint16 mulaw_lut[256] = {
        -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764, -15996,
        -15484, -14972, -14460, -13948, -13436, -12924, -12412, -11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316, -7932,
        -7676, -7420, -7164, -6908, -6652, -6396, -6140, -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, -3900,
        -3772, -3644, -3516, -3388, -3260, -3132, -3004, -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, -1884,
        -1820, -1756, -1692, -1628, -1564, -1500, -1436, -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, -876,
        -844, -812, -780, -748, -716, -684, -652, -620, -588, -556, -524, -492, -460, -428, -396, -372,
        -356, -340, -324, -308, -292, -276, -260, -244, -228, -212, -196, -180, -164, -148, -132, -120,
        -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32124,
        31100, 30076, 29052, 28028, 27004, 25980, 24956, 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, 15996,
        15484, 14972, 14460, 13948, 13436, 12924, 12412, 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, 7932,
        7676, 7420, 7164, 6908, 6652, 6396, 6140, 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, 3900,
        3772, 3644, 3516, 3388, 3260, 3132, 3004, 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, 1884,
        1820, 1756, 1692, 1628, 1564, 1500, 1436, 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, 876,
        844, 812, 780, 748, 716, 684, 652, 620, 588, 556, 524, 492, 460, 428, 396, 372,
        356, 340, 324, 308, 292, 276, 260, 244, 228, 212, 196, 180, 164, 148, 132, 120,
        112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0
    };
#endif
    /* WAV magic header */
    Uint32 RIFFchunk;
    Uint32 wavelen = 0;
    Uint32 WAVEmagic;
    Uint32 headerDiff = 0;
    WaveFormat *format = &file->format;
    WaveChunk *chunk = &file->chunk;
    size_t i, sample_count, expanded_len;
    Uint8 *src;
    Sint16 *dst;
    /* FMT chunk */
    WaveFMT *format = NULL;
    WaveExtensibleFMT *ext = NULL;
    SDL_zero(chunk);
    /* Make sure we are passed a valid data source */
    was_error = 0;
    if (src == NULL) {
        was_error = 1;
        goto done;
    }
    /* Check the magic header */
    RIFFchunk = SDL_ReadLE32(src);
    wavelen = SDL_ReadLE32(src);
    if (wavelen == WAVE) {      /* The RIFFchunk has already been read */
        WAVEmagic = wavelen;
        wavelen = RIFFchunk;
        RIFFchunk = RIFF;
    } else {
        WAVEmagic = SDL_ReadLE32(src);
    }
    if ((RIFFchunk != RIFF) || (WAVEmagic != WAVE)) {
        SDL_SetError("Unrecognized file type (not WAVE)");
        was_error = 1;
        goto done;
    }
    headerDiff += sizeof(Uint32);       /* for WAVE */
    /* Read the audio data format chunk */
    chunk.data = NULL;
    do {
        SDL_free(chunk.data);
        chunk.data = NULL;
        lenread = ReadChunk(src, &chunk);
        if (lenread < 0) {
            was_error = 1;
            goto done;
    if (chunk->length != chunk->size) {
        file->sampleframes = WaveAdjustToFactValue(file, chunk->size / format->blockalign);
        if (file->sampleframes < 0) {
            return -1;
        }
        /* 2 Uint32's for chunk header+len, plus the lenread */
        headerDiff += lenread + 2 * sizeof(Uint32);
    } while ((chunk.magic == FACT) || (chunk.magic == LIST) || (chunk.magic == BEXT) || (chunk.magic == JUNK));
    /* Decode the audio data format */
    format = (WaveFMT *) chunk.data;
    if (chunk.magic != FMT) {
        SDL_SetError("Complex WAVE files not supported");
        was_error = 1;
        goto done;
    }
    IEEE_float_encoded = MS_ADPCM_encoded = IMA_ADPCM_encoded = 0;
    switch (SDL_SwapLE16(format->encoding)) {
    case PCM_CODE:
        /* We can understand this */
    /* Nothing to decode, nothing to return. */
    if (file->sampleframes == 0) {
        *audio_buf = NULL;
        *audio_len = 0;
        return 0;
    }
    sample_count = (size_t)file->sampleframes;
    if (SafeMult(&sample_count, format->channels)) {
        return SDL_OutOfMemory();
    }
    expanded_len = sample_count;
    if (SafeMult(&expanded_len, sizeof(Sint16))) {
        return SDL_OutOfMemory();
    } else if (expanded_len > SDL_MAX_UINT32 || file->sampleframes > SIZE_MAX) {
        return SDL_SetError("WAVE file too big");
    }
    /* 1 to avoid allocating zero bytes, to keep static analysis happy. */
    src = (Uint8 *)SDL_realloc(chunk->data, expanded_len ? expanded_len : 1);
    if (src == NULL) {
        return SDL_OutOfMemory();
    }
    chunk->data = NULL;
    chunk->size = 0;
    dst = (Sint16 *)src;
    /* Work backwards, since we're expanding in-place. SDL_AudioSpec.format will
     * inform the caller about the byte order.
     */
    i = sample_count;
    switch (file->format.encoding) {
#ifdef SDL_WAVE_LAW_LUT
    case ALAW_CODE:
        while (i--) {
            dst[i] = alaw_lut[src[i]];
        }
        break;
    case MULAW_CODE:
        while (i--) {
            dst[i] = mulaw_lut[src[i]];
        }
        break;
#else
    case ALAW_CODE:
        while (i--) {
            Uint8 nibble = src[i];
            Uint8 exponent = (nibble & 0x7f) ^ 0x55;
            Sint16 mantissa = exponent & 0xf;
            exponent >>= 4;
            if (exponent > 0) {
                mantissa |= 0x10;
            }
            mantissa = (mantissa << 4) | 0x8;
            if (exponent > 1) {
                mantissa <<= exponent - 1;
            }
            dst[i] = nibble & 0x80 ? mantissa : -mantissa;
        }
        break;
    case MULAW_CODE:
        while (i--) {
            Uint8 nibble = ~src[i];
            Sint16 mantissa = nibble & 0xf;
            Uint8 exponent = (nibble >> 4) & 0x7;
            Sint16 step = 4 << (exponent + 1);
            mantissa = (0x80 << exponent) + step * mantissa + step / 2 - 132;
            dst[i] = nibble & 0x80 ? -mantissa : mantissa;
        }
        break;
#endif
    default:
        SDL_free(src);
        return SDL_SetError("Unknown companded encoding");
    }
    *audio_buf = src;
    *audio_len = (Uint32)expanded_len;
    return 0;
}
static int
PCM_Init(WaveFile *file, size_t datalength)
{
    WaveFormat *format = &file->format;
    if (format->encoding == PCM_CODE) {
        switch (format->bitspersample) {
        case 8:
        case 16:
        case 24:
        case 32:
            /* These are supported. */
            break;
        default:
            return SDL_SetError("%u-bit PCM format not supported", (unsigned int)format->bitspersample);
        }
    } else if (format->encoding == IEEE_FLOAT_CODE) {
        if (format->bitspersample != 32) {
            return SDL_SetError("%u-bit IEEE floating-point format not supported", (unsigned int)format->bitspersample);
        }
    }
    /* It wouldn't be that hard to support more exotic block sizes, but
     * the most common formats should do for now.
     */
    if (format->blockalign * 8 != format->channels * format->bitspersample) {
        return SDL_SetError("Unsupported block alignment");
    }
    if ((file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict)) {
        if (format->blockalign > 1 && datalength % format->blockalign) {
            return SDL_SetError("Truncated data chunk in WAVE file");
        }
    }
    file->sampleframes = WaveAdjustToFactValue(file, datalength / format->blockalign);
    if (file->sampleframes < 0) {
        return -1;
    }
    return 0;
}
static int
PCM_ConvertSint24ToSint32(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
{
    WaveFormat *format = &file->format;
    WaveChunk *chunk = &file->chunk;
    size_t i, expanded_len, sample_count;
    Uint8 *ptr;
    sample_count = (size_t)file->sampleframes;
    if (SafeMult(&sample_count, format->channels)) {
        return SDL_OutOfMemory();
    }
    expanded_len = sample_count;
    if (SafeMult(&expanded_len, sizeof(Sint32))) {
        return SDL_OutOfMemory();
    } else if (expanded_len > SDL_MAX_UINT32 || file->sampleframes > SIZE_MAX) {
        return SDL_SetError("WAVE file too big");
    }
    /* 1 to avoid allocating zero bytes, to keep static analysis happy. */
    ptr = (Uint8 *)SDL_realloc(chunk->data, expanded_len ? expanded_len : 1);
    if (ptr == NULL) {
        return SDL_OutOfMemory();
    }
    /* This pointer is now invalid. */
    chunk->data = NULL;
    chunk->size = 0;
    *audio_buf = ptr;
    *audio_len = (Uint32)expanded_len;
    /* work from end to start, since we're expanding in-place. */
    for (i = sample_count; i > 0; i--) {
        const size_t o = i - 1;
        uint8_t b[4];
        b[0] = 0;
        b[1] = ptr[o * 3];
        b[2] = ptr[o * 3 + 1];
        b[3] = ptr[o * 3 + 2];
        ptr[o * 4 + 0] = b[0];
        ptr[o * 4 + 1] = b[1];
        ptr[o * 4 + 2] = b[2];
        ptr[o * 4 + 3] = b[3];
    }
    return 0;
}
static int
PCM_Decode(WaveFile *file, Uint8 **audio_buf, Uint32 *audio_len)
{
    WaveFormat *format = &file->format;
    WaveChunk *chunk = &file->chunk;
    size_t outputsize;
    if (chunk->length != chunk->size) {
        file->sampleframes = WaveAdjustToFactValue(file, chunk->size / format->blockalign);
        if (file->sampleframes < 0) {
            return -1;
        }
    }
    /* Nothing to decode, nothing to return. */
    if (file->sampleframes == 0) {
        *audio_buf = NULL;
        *audio_len = 0;
        return 0;
    }
    /* 24-bit samples get shifted to 32 bits. */
    if (format->encoding == PCM_CODE && format->bitspersample == 24) {
        return PCM_ConvertSint24ToSint32(file, audio_buf, audio_len);
    }
    outputsize = (size_t)file->sampleframes;
    if (SafeMult(&outputsize, format->blockalign)) {
        return SDL_OutOfMemory();
    } else if (outputsize > SDL_MAX_UINT32 || file->sampleframes > SIZE_MAX) {
        return SDL_SetError("WAVE file too big");
    }
    *audio_buf = chunk->data;
    *audio_len = (Uint32)outputsize;
    /* This pointer is going to be returned to the caller. Prevent free in cleanup. */
    chunk->data = NULL;
    chunk->size = 0;
    return 0;
}
static WaveRiffSizeHint
WaveGetRiffSizeHint()
{
    const char *hint = SDL_GetHint(SDL_HINT_WAVE_RIFF_CHUNK_SIZE);
    if (hint != NULL) {
        if (SDL_strcmp(hint, "force") == 0) {
            return RiffSizeForce;
        } else if (SDL_strcmp(hint, "ignore") == 0) {
            return RiffSizeIgnore;
        } else if (SDL_strcmp(hint, "ignorezero") == 0) {
            return RiffSizeIgnoreZero;
        } else if (SDL_strcmp(hint, "maximum") == 0) {
            return RiffSizeMaximum;
        }
    }
    return RiffSizeNoHint;
}
static WaveTruncationHint
WaveGetTruncationHint()
{
    const char *hint = SDL_GetHint(SDL_HINT_WAVE_TRUNCATION);
    if (hint != NULL) {
        if (SDL_strcmp(hint, "verystrict") == 0) {
            return TruncVeryStrict;
        } else if (SDL_strcmp(hint, "strict") == 0) {
            return TruncStrict;
        } else if (SDL_strcmp(hint, "dropframe") == 0) {
            return TruncDropFrame;
        } else if (SDL_strcmp(hint, "dropblock") == 0) {
            return TruncDropBlock;
        }
    }
    return TruncNoHint;
}
static WaveFactChunkHint
WaveGetFactChunkHint()
{
    const char *hint = SDL_GetHint(SDL_HINT_WAVE_FACT_CHUNK);
    if (hint != NULL) {
        if (SDL_strcmp(hint, "truncate") == 0) {
            return FactTruncate;
        } else if (SDL_strcmp(hint, "strict") == 0) {
            return FactStrict;
        } else if (SDL_strcmp(hint, "ignorezero") == 0) {
            return FactIgnoreZero;
        } else if (SDL_strcmp(hint, "ignore") == 0) {
            return FactIgnore;
        }
    }
    return FactNoHint;
}
static void
WaveFreeChunkData(WaveChunk *chunk)
{
    if (chunk->data != NULL) {
        SDL_free(chunk->data);
        chunk->data = NULL;
    }
    chunk->size = 0;
}
static int
WaveNextChunk(SDL_RWops *src, WaveChunk *chunk)
{
    Uint32 chunkheader[2];
    Sint64 nextposition = chunk->position + chunk->length;
    /* Data is no longer valid after this function returns. */
    WaveFreeChunkData(chunk);
    /* Error on overflows. */
    if (SDL_MAX_SINT64 - chunk->length < chunk->position || SDL_MAX_SINT64 - 8 < nextposition) {
        return -1;
    }
    /* RIFF chunks have a 2-byte alignment. Skip padding byte. */
    if (chunk->length & 1) {
        nextposition++;
    }
    if (SDL_RWseek(src, nextposition, RW_SEEK_SET) != nextposition) {
        /* Not sure how we ended up here. Just abort. */
        return -2;
    } else if (SDL_RWread(src, chunkheader, 4, 2) != 2) {
        return -1;
    }
    chunk->fourcc = SDL_SwapLE32(chunkheader[0]);
    chunk->length = SDL_SwapLE32(chunkheader[1]);
    chunk->position = nextposition + 8;
    return 0;
}
static int
WaveReadPartialChunkData(SDL_RWops *src, WaveChunk *chunk, size_t length)
{
    WaveFreeChunkData(chunk);
    if (length > chunk->length) {
        length = chunk->length;
    }
    if (length > 0) {
        chunk->data = SDL_malloc(length);
        if (chunk->data == NULL) {
            return SDL_OutOfMemory();
        }
        if (SDL_RWseek(src, chunk->position, RW_SEEK_SET) != chunk->position) {
            /* Not sure how we ended up here. Just abort. */
            return -2;
        }
        chunk->size = SDL_RWread(src, chunk->data, 1, length);
        if (chunk->size != length) {
            /* Expected to be handled by the caller. */
        }
    }
    return 0;
}
static int
WaveReadChunkData(SDL_RWops *src, WaveChunk *chunk)
{
    return WaveReadPartialChunkData(src, chunk, chunk->length);
}
typedef struct WaveExtensibleGUID {
    Uint16 encoding;
    Uint8 guid[16];
} WaveExtensibleGUID;
/* Some of the GUIDs that are used by WAVEFORMATEXTENSIBLE. */
#define WAVE_FORMATTAG_GUID(tag) {(tag) & 0xff, (tag) >> 8, 0, 0, 0, 0, 16, 0, 128, 0, 0, 170, 0, 56, 155, 113}
static WaveExtensibleGUID extensible_guids[] = {
    {PCM_CODE,        WAVE_FORMATTAG_GUID(PCM_CODE)},
    {MS_ADPCM_CODE,   WAVE_FORMATTAG_GUID(MS_ADPCM_CODE)},
    {IEEE_FLOAT_CODE, WAVE_FORMATTAG_GUID(IEEE_FLOAT_CODE)},
    {ALAW_CODE,       WAVE_FORMATTAG_GUID(ALAW_CODE)},
    {MULAW_CODE,      WAVE_FORMATTAG_GUID(MULAW_CODE)},
    {IMA_ADPCM_CODE,  WAVE_FORMATTAG_GUID(IMA_ADPCM_CODE)}
};
static Uint16
WaveGetFormatGUIDEncoding(WaveFormat *format)
{
    size_t i;
    for (i = 0; i < SDL_arraysize(extensible_guids); i++) {
        if (SDL_memcmp(format->subformat, extensible_guids[i].guid, 16) == 0) {
            return extensible_guids[i].encoding;
        }
    }
    return UNKNOWN_CODE;
}
static int
WaveReadFormat(WaveFile *file)
{
    WaveChunk *chunk = &file->chunk;
    WaveFormat *format = &file->format;
    SDL_RWops *fmtsrc;
    size_t fmtlen = chunk->size;
    if (fmtlen > SDL_MAX_SINT32) {
        /* Limit given by SDL_RWFromConstMem. */
        return SDL_SetError("Data of WAVE fmt chunk too big");
    }
    fmtsrc = SDL_RWFromConstMem(chunk->data, (int)chunk->size);
    if (fmtsrc == NULL) {
        return SDL_OutOfMemory();
    }
    format->formattag = SDL_ReadLE16(fmtsrc);
    format->encoding = format->formattag;
    format->channels = SDL_ReadLE16(fmtsrc);
    format->frequency = SDL_ReadLE32(fmtsrc);
    format->byterate = SDL_ReadLE32(fmtsrc);
    format->blockalign = SDL_ReadLE16(fmtsrc);
    /* This is PCM specific in the first version of the specification. */
    if (fmtlen >= 16) {
        format->bitspersample = SDL_ReadLE16(fmtsrc);
    } else if (format->encoding == PCM_CODE) {
        SDL_RWclose(fmtsrc);
        return SDL_SetError("Missing wBitsPerSample field in WAVE fmt chunk");
    }
    /* The earlier versions also don't have this field. */
    if (fmtlen >= 18) {
        format->extsize = SDL_ReadLE16(fmtsrc);
    }
    if (format->formattag == EXTENSIBLE_CODE) {
        /* note that this ignores channel masks, smaller valid bit counts
         * inside a larger container, and most subtypes. This is just enough
         * to get things that didn't really _need_ WAVE_FORMAT_EXTENSIBLE
         * to be useful working when they use this format flag.
         */
        /* Extensible header must be at least 22 bytes. */
        if (fmtlen < 40 || format->extsize < 22) {
            SDL_RWclose(fmtsrc);
            return SDL_SetError("Extensible WAVE header too small");
        }
        format->validsamplebits = SDL_ReadLE16(fmtsrc);
        format->samplesperblock = format->validsamplebits;
        format->channelmask = SDL_ReadLE32(fmtsrc);
        SDL_RWread(fmtsrc, format->subformat, 1, 16);
        format->encoding = WaveGetFormatGUIDEncoding(format);
    }
    SDL_RWclose(fmtsrc);
    return 0;
}
static int
WaveCheckFormat(WaveFile *file, size_t datalength)
{
    WaveFormat *format = &file->format;
    /* Check for some obvious issues. */
    if (format->channels == 0) {
        return SDL_SetError("Invalid number of channels");
    } else if (format->channels > 255) {
        /* Limit given by SDL_AudioSpec.channels. */
        return SDL_SetError("Number of channels exceeds limit of 255");
    }
    if (format->frequency == 0) {
        return SDL_SetError("Invalid sample rate");
    } else if (format->frequency > INT_MAX) {
        /* Limit given by SDL_AudioSpec.freq. */
        return SDL_SetError("Sample rate exceeds limit of %d", INT_MAX);
    }
    /* Reject invalid fact chunks in strict mode. */
    if (file->facthint == FactStrict && file->fact.status == -1) {
        return SDL_SetError("Invalid fact chunk in WAVE file");
    }
    /* Check for issues common to all encodings. Some unsupported formats set
     * the bits per sample to zero. These fall through to the 'unsupported
     * format' error.
     */
    switch (format->encoding) {
    case IEEE_FLOAT_CODE:
        IEEE_float_encoded = 1;
        /* We can understand this */
    case ALAW_CODE:
    case MULAW_CODE:
    case MS_ADPCM_CODE:
    case IMA_ADPCM_CODE:
        /* These formats require a fact chunk. */
        if (file->facthint == FactStrict && file->fact.status <= 0) {
            return SDL_SetError("Missing fact chunk in WAVE file");
        }
        /* fallthrough */
    case PCM_CODE:
        /* All supported formats require a non-zero bit depth. */
        if (file->chunk.size < 16) {
            return SDL_SetError("Missing wBitsPerSample field in WAVE fmt chunk");
        } else if (format->bitspersample == 0) {
            return SDL_SetError("Invalid bits per sample");
        }
        /* All supported formats must have a proper block size. */
        if (format->blockalign == 0) {
            return SDL_SetError("Invalid block alignment");
        }
        /* If the fact chunk is valid and the appropriate hint is set, the
         * decoders will use the number of sample frames from the fact chunk.
         */
        if (file->fact.status == 1) {
            WaveFactChunkHint hint = file->facthint;
            Uint32 samples = file->fact.samplelength;
            if (hint == FactTruncate || hint == FactStrict || (hint == FactIgnoreZero && samples > 0)) {
                file->fact.status = 2;
            }
        }
    }
    /* Check the format for encoding specific issues and initialize decoders. */
    switch (format->encoding) {
    case PCM_CODE:
    case IEEE_FLOAT_CODE:
        if (PCM_Init(file, datalength) < 0) {
            return -1;
        }
        break;
    case ALAW_CODE:
    case MULAW_CODE:
        if (LAW_Init(file, datalength) < 0) {
            return -1;
        }
        break;
    case MS_ADPCM_CODE:
        /* Try to understand this */
        if (InitMS_ADPCM(format) < 0) {
            was_error = 1;
            goto done;
        if (MS_ADPCM_Init(file, datalength) < 0) {
            return -1;
        }
        MS_ADPCM_encoded = 1;
        break;
    case IMA_ADPCM_CODE:
        /* Try to understand this */
        if (InitIMA_ADPCM(format) < 0) {
            was_error = 1;
            goto done;
        }
        IMA_ADPCM_encoded = 1;
        break;
    case EXTENSIBLE_CODE:
        /* note that this ignores channel masks, smaller valid bit counts
           inside a larger container, and most subtypes. This is just enough
           to get things that didn't really _need_ WAVE_FORMAT_EXTENSIBLE
           to be useful working when they use this format flag. */
        ext = (WaveExtensibleFMT *) format;
        if (SDL_SwapLE16(ext->size) < 22) {
            SDL_SetError("bogus extended .wav header");
            was_error = 1;
            goto done;
        }
        if (SDL_memcmp(ext->subformat, extensible_pcm_guid, 16) == 0) {
            break;  /* cool. */
        } else if (SDL_memcmp(ext->subformat, extensible_ieee_guid, 16) == 0) {
            IEEE_float_encoded = 1;
            break;
        if (IMA_ADPCM_Init(file, datalength) < 0) {
            return -1;
        }
        break;
    case MP3_CODE:
        SDL_SetError("MPEG Layer 3 data not supported");
        was_error = 1;
        goto done;
    case MPEG_CODE:
    case MPEGLAYER3_CODE:
        return SDL_SetError("MPEG formats not supported");
    default:
        SDL_SetError("Unknown WAVE data format: 0x%.4x",
                     SDL_SwapLE16(format->encoding));
        was_error = 1;
        goto done;
    }
    SDL_zerop(spec);
    spec->freq = SDL_SwapLE32(format->frequency);
    if (IEEE_float_encoded) {
        if ((SDL_SwapLE16(format->bitspersample)) != 32) {
            was_error = 1;
        } else {
            spec->format = AUDIO_F32;
        if (format->formattag == EXTENSIBLE_CODE) {
            const char *errstr = "Unknown WAVE format GUID: %08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x";
            const Uint8 *g = format->subformat;
            const Uint32 g1 = g[0] | ((Uint32)g[1] << 8) | ((Uint32)g[2] << 16) | ((Uint32)g[3] << 24);
            const Uint32 g2 = g[4] | ((Uint32)g[5] << 8);
            const Uint32 g3 = g[6] | ((Uint32)g[7] << 8);
            return SDL_SetError(errstr, g1, g2, g3, g[8], g[9], g[10], g[11], g[12], g[13], g[14], g[15]);
        }
        return SDL_SetError("Unknown WAVE format tag: 0x%04x", (unsigned int)format->encoding);
    }
    return 0;
}
static int
WaveLoad(SDL_RWops *src, WaveFile *file, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
{
    int result;
    Uint32 chunkcount = 0;
    Uint32 chunkcountlimit = 10000;
    char *envchunkcountlimit;
    Sint64 RIFFstart, RIFFend, lastchunkpos;
    SDL_bool RIFFlengthknown = SDL_FALSE;
    WaveFormat *format = &file->format;
    WaveChunk *chunk = &file->chunk;
    WaveChunk RIFFchunk;
    WaveChunk fmtchunk;
    WaveChunk datachunk;
    SDL_zero(RIFFchunk);
    SDL_zero(fmtchunk);
    SDL_zero(datachunk);
    envchunkcountlimit = SDL_getenv("SDL_WAVE_CHUNK_LIMIT");
    if (envchunkcountlimit != NULL) {
        unsigned int count;
        if (SDL_sscanf(envchunkcountlimit, "%u", &count) == 1) {
            chunkcountlimit = count <= SDL_MAX_UINT32 ? count : SDL_MAX_UINT32;
        }
    }
    RIFFstart = SDL_RWtell(src);
    if (RIFFstart < 0) {
        return SDL_SetError("Could not seek in file");
    }
    RIFFchunk.position = RIFFstart;
    if (WaveNextChunk(src, &RIFFchunk) < 0) {
        return SDL_SetError("Could not read RIFF header");
    }
    /* Check main WAVE file identifiers. */
    if (RIFFchunk.fourcc == RIFF) {
        Uint32 formtype;
        /* Read the form type. "WAVE" expected. */
        if (SDL_RWread(src, &formtype, sizeof(Uint32), 1) != 1) {
            return SDL_SetError("Could not read RIFF form type");
        } else if (SDL_SwapLE32(formtype) != WAVE) {
            return SDL_SetError("RIFF form type is not WAVE (not a Waveform file)");
        }
    } else if (RIFFchunk.fourcc == WAVE) {
        /* RIFF chunk missing or skipped. Length unknown. */
        RIFFchunk.position = 0;
        RIFFchunk.length = 0;
    } else {
        switch (SDL_SwapLE16(format->bitspersample)) {
        case 4:
            if (MS_ADPCM_encoded || IMA_ADPCM_encoded) {
                spec->format = AUDIO_S16;
            } else {
                was_error = 1;
            }
        return SDL_SetError("Could not find RIFF or WAVE identifiers (not a Waveform file)");
    }
    /* The 4-byte form type is immediately followed by the first chunk.*/
    chunk->position = RIFFchunk.position + 4;
    /* Use the RIFF chunk size to limit the search for the chunks. This is not
     * always reliable and the hint can be used to tune the behavior. By
     * default, it will never search past 4 GiB.
     */
    switch (file->riffhint) {
    case RiffSizeIgnore:
        RIFFend = RIFFchunk.position + SDL_MAX_UINT32;
        break;
    default:
    case RiffSizeIgnoreZero:
        if (RIFFchunk.length == 0) {
            RIFFend = RIFFchunk.position + SDL_MAX_UINT32;
            break;
        }
        /* fallthrough */
    case RiffSizeForce:
        RIFFend = RIFFchunk.position + RIFFchunk.length;
        RIFFlengthknown = SDL_TRUE;
        break;
    case RiffSizeMaximum:
        RIFFend = SDL_MAX_SINT64;
        break;
    }
    /* Step through all chunks and save information on the fmt, data, and fact
     * chunks. Ignore the chunks we don't know as per specification. This
     * currently also ignores cue, list, and slnt chunks.
     */
    while ((Uint64)RIFFend > (Uint64)chunk->position + chunk->length + (chunk->length & 1)) {
        /* Abort after too many chunks or else corrupt files may waste time. */
        if (chunkcount++ >= chunkcountlimit) {
            return SDL_SetError("Chunk count in WAVE file exceeds limit of %u", chunkcountlimit);
        }
        result = WaveNextChunk(src, chunk);
        if (result == -1) {
            /* Unexpected EOF. Corrupt file or I/O issues. */
            if (file->trunchint == TruncVeryStrict) {
                return SDL_SetError("Unexpected end of WAVE file");
            }
            /* Let the checks after this loop sort this issue out. */
            break;
        } else if (result == -2) {
            return SDL_SetError("Could not seek to WAVE chunk header");
        }
        if (chunk->fourcc == FMT) {
            if (fmtchunk.fourcc == FMT) {
                /* Multiple fmt chunks. Ignore or error? */
            } else {
                /* The fmt chunk must occur before the data chunk. */
                if (datachunk.fourcc == DATA) {
                    return SDL_SetError("fmt chunk after data chunk in WAVE file");
                }
                fmtchunk = *chunk;
            }
        } else if (chunk->fourcc == DATA) {
            /* Only use the first data chunk. Handling the wavl list madness
             * may require a different approach.
             */
            if (datachunk.fourcc != DATA) {
                datachunk = *chunk;
            }
        } else if (chunk->fourcc == FACT) {
            /* The fact chunk data must be at least 4 bytes for the
             * dwSampleLength field. Ignore all fact chunks after the first one.
             */
            if (file->fact.status == 0) {
                if (chunk->length < 4) {
                    file->fact.status = -1;
                } else {
                    /* Let's use src directly, it's just too convenient. */
                    Sint64 position = SDL_RWseek(src, chunk->position, RW_SEEK_SET);
                    Uint32 samplelength;
                    if (position == chunk->position && SDL_RWread(src, &samplelength, sizeof(Uint32), 1) == 1) {
                        file->fact.status = 1;
                        file->fact.samplelength = SDL_SwapLE32(samplelength);
                    } else {
                        file->fact.status = -1;
                    }
                }
            }
        }
        /* Go through all chunks in verystrict mode or stop the search early if
         * all required chunks were found.
         */
        if (file->trunchint == TruncVeryStrict) {
            if ((Uint64)RIFFend < (Uint64)chunk->position + chunk->length) {
                return SDL_SetError("RIFF size truncates chunk");
            }
        } else if (fmtchunk.fourcc == FMT && datachunk.fourcc == DATA) {
            if (file->fact.status == 1 || file->facthint == FactIgnore || file->facthint == FactNoHint) {
                break;
            }
        }
    }
    /* Save the position after the last chunk. This position will be used if the
     * RIFF length is unknown.
     */
    lastchunkpos = chunk->position + chunk->length;
    /* The fmt chunk is mandatory. */
    if (fmtchunk.fourcc != FMT) {
        return SDL_SetError("Missing fmt chunk in WAVE file");
    }
    /* A data chunk must be present. */
    if (datachunk.fourcc != DATA) {
        return SDL_SetError("Missing data chunk in WAVE file");
    }
    /* Check if the last chunk has all of its data in verystrict mode. */
    if (file->trunchint == TruncVeryStrict) {
        /* data chunk is handled later. */
        if (chunk->fourcc != DATA && chunk->length > 0) {
            Uint8 tmp;
            Uint64 position = (Uint64)chunk->position + chunk->length - 1;
            if (position > SDL_MAX_SINT64 || SDL_RWseek(src, (Sint64)position, RW_SEEK_SET) != (Sint64)position) {
                return SDL_SetError("Could not seek to WAVE chunk data");
            } else if (SDL_RWread(src, &tmp, 1, 1) != 1) {
                return SDL_SetError("RIFF size truncates chunk");
            }
        }
    }
    /* Process fmt chunk. */
    *chunk = fmtchunk;
    /* No need to read more than 1046 bytes of the fmt chunk data with the
     * formats that are currently supported. (1046 because of MS ADPCM coefficients)
     */
    if (WaveReadPartialChunkData(src, chunk, 1046) < 0) {
        return SDL_SetError("Could not read data of WAVE fmt chunk");
    }
    /* The fmt chunk data must be at least 14 bytes to include all common fields.
     * It usually is 16 and larger depending on the header and encoding.
     */
    if (chunk->length < 14) {
        return SDL_SetError("Invalid WAVE fmt chunk length (too small)");
    } else if (chunk->size < 14) {
        return SDL_SetError("Could not read data of WAVE fmt chunk");
    } else if (WaveReadFormat(file) < 0) {
        return -1;
    } else if (WaveCheckFormat(file, (size_t)datachunk.length) < 0) {
        return -1;
    }
#ifdef SDL_WAVE_DEBUG_LOG_FORMAT
    WaveDebugLogFormat(file);
#endif
#ifdef SDL_WAVE_DEBUG_DUMP_FORMAT
    WaveDebugDumpFormat(file, RIFFchunk.length, fmtchunk.length, datachunk.length);
#endif
    WaveFreeChunkData(chunk);
    /* Process data chunk. */
    *chunk = datachunk;
    if (chunk->length > 0) {
        result = WaveReadChunkData(src, chunk);
        if (result == -1) {
            return -1;
        } else if (result == -2) {
            return SDL_SetError("Could not seek data of WAVE data chunk");
        }
    }
    if (chunk->length != chunk->size) {
        /* I/O issues or corrupt file. */
        if (file->trunchint == TruncVeryStrict || file->trunchint == TruncStrict) {
            return SDL_SetError("Could not read data of WAVE data chunk");
        }
        /* The decoders handle this truncation. */
    }
    /* Decode or convert the data if necessary. */
    switch (format->encoding) {
    case PCM_CODE:
    case IEEE_FLOAT_CODE:
        if (PCM_Decode(file, audio_buf, audio_len) < 0) {
            return -1;
        }
        break;
    case ALAW_CODE:
    case MULAW_CODE:
        if (LAW_Decode(file, audio_buf, audio_len) < 0) {
            return -1;
        }
        break;
    case MS_ADPCM_CODE:
        if (MS_ADPCM_Decode(file, audio_buf, audio_len) < 0) {
            return -1;
        }
        break;
    case IMA_ADPCM_CODE:
        if (IMA_ADPCM_Decode(file, audio_buf, audio_len) < 0) {
            return -1;
        }
        break;
    }
    /* Setting up the SDL_AudioSpec. All unsupported formats were filtered out
     * by checks earlier in this function.
     */
    SDL_zerop(spec);
    spec->freq = format->frequency;
    spec->channels = (Uint8)format->channels;
    spec->samples = 4096;       /* Good default buffer size */
    switch (format->encoding) {
    case MS_ADPCM_CODE:
    case IMA_ADPCM_CODE:
    case ALAW_CODE:
    case MULAW_CODE:
        /* These can be easily stored in the byte order of the system. */
        spec->format = AUDIO_S16SYS;
        break;
    case IEEE_FLOAT_CODE:
        spec->format = AUDIO_F32LSB;
        break;
    case PCM_CODE:
        switch (format->bitspersample) {
        case 8:
            spec->format = AUDIO_U8;
            break;
        case 16:
            spec->format = AUDIO_S16;
            spec->format = AUDIO_S16LSB;
            break;
        case 24:  /* convert this. */
            spec->format = AUDIO_S32;
            break;
        case 24: /* Has been shifted to 32 bits. */
        case 32:
            spec->format = AUDIO_S32;
            spec->format = AUDIO_S32LSB;
            break;
        default:
            was_error = 1;
            break;
            /* Just in case something unexpected happened in the checks. */
            return SDL_SetError("Unexpected %u-bit PCM data format", (unsigned int)format->bitspersample);
        }
        break;
    }
    if (was_error) {
        SDL_SetError("Unknown %d-bit PCM data format",
                     SDL_SwapLE16(format->bitspersample));
        goto done;
    }
    spec->channels = (Uint8) SDL_SwapLE16(format->channels);
    spec->samples = 4096;       /* Good default buffer size */
    spec->silence = SDL_SilenceValueForFormat(spec->format);
    /* Read the audio data chunk */
    /* Report the end position back to the cleanup code. */
    if (RIFFlengthknown) {
        chunk->position = RIFFend;
    } else {
        chunk->position = lastchunkpos;
    }
    return 0;
}
SDL_AudioSpec *
SDL_LoadWAV_RW(SDL_RWops *src, int freesrc, SDL_AudioSpec *spec, Uint8 **audio_buf, Uint32 *audio_len)
{
    int result;
    WaveFile file;
    SDL_zero(file);
    /* Make sure we are passed a valid data source */
    if (src == NULL) {
        /* Error may come from RWops. */
        return NULL;
    } else if (spec == NULL) {
        SDL_InvalidParamError("spec");
        return NULL;
    } else if (audio_buf == NULL) {
        SDL_InvalidParamError("audio_buf");
        return NULL;
    } else if (audio_len == NULL) {
        SDL_InvalidParamError("audio_len");
        return NULL;
    }
    *audio_buf = NULL;
    do {
    *audio_len = 0;
    file.riffhint = WaveGetRiffSizeHint();
    file.trunchint = WaveGetTruncationHint();
    file.facthint = WaveGetFactChunkHint();
    result = WaveLoad(src, &file, spec, audio_buf, audio_len);
    if (result < 0) {
        SDL_free(*audio_buf);
        *audio_buf = NULL;
        lenread = ReadChunk(src, &chunk);
        if (lenread < 0) {
            was_error = 1;
            goto done;
        }
        *audio_len = lenread;
        *audio_buf = chunk.data;
        if (chunk.magic != DATA)
            headerDiff += lenread + 2 * sizeof(Uint32);
    } while (chunk.magic != DATA);
    headerDiff += 2 * sizeof(Uint32);   /* for the data chunk and len */
    if (MS_ADPCM_encoded) {
        if (MS_ADPCM_decode(audio_buf, audio_len) < 0) {
            was_error = 1;
            goto done;
        }
    }
    if (IMA_ADPCM_encoded) {
        if (IMA_ADPCM_decode(audio_buf, audio_len) < 0) {
            was_error = 1;
            goto done;
        }
    }
    if (SDL_SwapLE16(format->bitspersample) == 24) {
        if (ConvertSint24ToSint32(audio_buf, audio_len) < 0) {
            was_error = 1;
            goto done;
        }
    }
    /* Don't return a buffer that isn't a multiple of samplesize */
    samplesize = ((SDL_AUDIO_BITSIZE(spec->format)) / 8) * spec->channels;
    *audio_len &= ~(samplesize - 1);
  done:
    SDL_free(format);
    if (src) {
        if (freesrc) {
            SDL_RWclose(src);
        } else {
            /* seek to the end of the file (given by the RIFF chunk) */
            SDL_RWseek(src, wavelen - chunk.length - headerDiff, RW_SEEK_CUR);
        }
    }
    if (was_error) {
        spec = NULL;
        audio_buf = NULL;
        audio_len = 0;
    }
    return (spec);
    /* Cleanup */
    if (freesrc) {
        SDL_RWclose(src);
    } else {
        SDL_RWseek(src, file.chunk.position, RW_SEEK_SET);
    }
    WaveFreeChunkData(&file.chunk);
    SDL_free(file.decoderdata);
    return spec;
}
/* Since the WAV memory is allocated in the shared library, it must also
   be freed here.  (Necessary under Win32, VC++)
 */
void
SDL_FreeWAV(Uint8 * audio_buf)
SDL_FreeWAV(Uint8 *audio_buf)
{
    SDL_free(audio_buf);
}
static int
ReadChunk(SDL_RWops * src, Chunk * chunk)
{
    chunk->magic = SDL_ReadLE32(src);
    chunk->length = SDL_ReadLE32(src);
    chunk->data = (Uint8 *) SDL_malloc(chunk->length);
    if (chunk->data == NULL) {
        return SDL_OutOfMemory();
    }
    if (SDL_RWread(src, chunk->data, chunk->length, 1) != 1) {
        SDL_free(chunk->data);
        chunk->data = NULL;
        return SDL_Error(SDL_EFREAD);
    }
    return (chunk->length);
}
/* vi: set ts=4 sw=4 expandtab: */
Diff truncated after the above file
source/src/audio/SDL_wave.h source/src/audio/alsa/SDL_alsa_audio.c source/src/audio/alsa/SDL_alsa_audio.h source/src/audio/android/SDL_androidaudio.c source/src/audio/android/SDL_androidaudio.h source/src/audio/arts/SDL_artsaudio.c source/src/audio/arts/SDL_artsaudio.h source/src/audio/coreaudio/SDL_coreaudio.h source/src/audio/coreaudio/SDL_coreaudio.m source/src/audio/directsound/SDL_directsound.c source/src/audio/directsound/SDL_directsound.h source/src/audio/disk/SDL_diskaudio.c source/src/audio/disk/SDL_diskaudio.h source/src/audio/dsp/SDL_dspaudio.c source/src/audio/dsp/SDL_dspaudio.h source/src/audio/dummy/SDL_dummyaudio.c source/src/audio/dummy/SDL_dummyaudio.h source/src/audio/emscripten/SDL_emscriptenaudio.c source/src/audio/emscripten/SDL_emscriptenaudio.h source/src/audio/esd/SDL_esdaudio.c source/src/audio/esd/SDL_esdaudio.h source/src/audio/fusionsound/SDL_fsaudio.c source/src/audio/fusionsound/SDL_fsaudio.h source/src/audio/haiku/SDL_haikuaudio.cc source/src/audio/haiku/SDL_haikuaudio.h source/src/audio/jack/SDL_jackaudio.c source/src/audio/jack/SDL_jackaudio.h source/src/audio/nacl/SDL_naclaudio.c source/src/audio/nacl/SDL_naclaudio.h source/src/audio/nas/SDL_nasaudio.c source/src/audio/nas/SDL_nasaudio.h source/src/audio/netbsd/SDL_netbsdaudio.c source/src/audio/netbsd/SDL_netbsdaudio.h source/src/audio/openslES/SDL_openslES.c source/src/audio/openslES/SDL_openslES.h source/src/audio/paudio/SDL_paudio.c source/src/audio/paudio/SDL_paudio.h source/src/audio/psp/SDL_pspaudio.c source/src/audio/psp/SDL_pspaudio.h source/src/audio/pulseaudio/SDL_pulseaudio.c source/src/audio/pulseaudio/SDL_pulseaudio.h source/src/audio/qsa/SDL_qsa_audio.c source/src/audio/qsa/SDL_qsa_audio.h source/src/audio/sndio/SDL_sndioaudio.c source/src/audio/sndio/SDL_sndioaudio.h source/src/audio/sun/SDL_sunaudio.c source/src/audio/sun/SDL_sunaudio.h source/src/audio/wasapi/SDL_wasapi.c source/src/audio/wasapi/SDL_wasapi.h source/src/audio/wasapi/SDL_wasapi_win32.c source/src/audio/wasapi/SDL_wasapi_winrt.cpp source/src/audio/winmm/SDL_winmm.c source/src/audio/winmm/SDL_winmm.h source/src/core/android/SDL_android.c source/src/core/android/SDL_android.h source/src/core/android/keyinfotable.h source/src/core/linux/SDL_dbus.c source/src/core/linux/SDL_dbus.h source/src/core/linux/SDL_evdev.c source/src/core/linux/SDL_evdev.h source/src/core/linux/SDL_evdev_kbd.c source/src/core/linux/SDL_evdev_kbd.h source/src/core/linux/SDL_evdev_kbd_default_accents.h source/src/core/linux/SDL_evdev_kbd_default_keymap.h source/src/core/linux/SDL_fcitx.c source/src/core/linux/SDL_fcitx.h source/src/core/linux/SDL_ibus.c source/src/core/linux/SDL_ibus.h source/src/core/linux/SDL_ime.c source/src/core/linux/SDL_ime.h source/src/core/linux/SDL_threadprio.c source/src/core/linux/SDL_udev.c source/src/core/linux/SDL_udev.h source/src/core/unix/SDL_poll.c source/src/core/unix/SDL_poll.h source/src/core/windows/SDL_directx.h source/src/core/windows/SDL_windows.c source/src/core/windows/SDL_windows.h source/src/core/windows/SDL_xinput.c source/src/core/windows/SDL_xinput.h source/src/core/winrt/SDL_winrtapp_common.cpp source/src/core/winrt/SDL_winrtapp_common.h source/src/core/winrt/SDL_winrtapp_direct3d.cpp source/src/core/winrt/SDL_winrtapp_direct3d.h source/src/core/winrt/SDL_winrtapp_xaml.cpp source/src/core/winrt/SDL_winrtapp_xaml.h source/src/cpuinfo/SDL_cpuinfo.c source/src/cpuinfo/SDL_simd.h (deleted) source/src/dynapi/SDL_dynapi.c source/src/dynapi/SDL_dynapi.h source/src/dynapi/SDL_dynapi_overrides.h source/src/dynapi/SDL_dynapi_procs.h source/src/dynapi/gendynapi.pl source/src/events/SDL_clipboardevents.c source/src/events/SDL_clipboardevents_c.h source/src/events/SDL_displayevents.c source/src/events/SDL_displayevents_c.h source/src/events/SDL_dropevents.c source/src/events/SDL_dropevents_c.h source/src/events/SDL_events.c source/src/events/SDL_events_c.h source/src/events/SDL_gesture.c source/src/events/SDL_gesture_c.h source/src/events/SDL_keyboard.c source/src/events/SDL_keyboard_c.h source/src/events/SDL_mouse.c source/src/events/SDL_mouse_c.h source/src/events/SDL_quit.c source/src/events/SDL_sysevents.h source/src/events/SDL_touch.c source/src/events/SDL_touch_c.h source/src/events/SDL_windowevents.c source/src/events/SDL_windowevents_c.h source/src/events/blank_cursor.h source/src/events/default_cursor.h source/src/events/scancodes_darwin.h source/src/events/scancodes_linux.h source/src/events/scancodes_windows.h source/src/events/scancodes_xfree86.h source/src/file/SDL_rwops.c source/src/file/cocoa/SDL_rwopsbundlesupport.h source/src/file/cocoa/SDL_rwopsbundlesupport.m source/src/filesystem/android/SDL_sysfilesystem.c source/src/filesystem/cocoa/SDL_sysfilesystem.m source/src/filesystem/dummy/SDL_sysfilesystem.c source/src/filesystem/emscripten/SDL_sysfilesystem.c source/src/filesystem/haiku/SDL_sysfilesystem.cc source/src/filesystem/nacl/SDL_sysfilesystem.c source/src/filesystem/unix/SDL_sysfilesystem.c source/src/filesystem/windows/SDL_sysfilesystem.c source/src/filesystem/winrt/SDL_sysfilesystem.cpp source/src/haptic/SDL_haptic.c source/src/haptic/SDL_haptic_c.h source/src/haptic/SDL_syshaptic.h source/src/haptic/android/SDL_syshaptic.c source/src/haptic/darwin/SDL_syshaptic.c source/src/haptic/darwin/SDL_syshaptic_c.h source/src/haptic/dummy/SDL_syshaptic.c source/src/haptic/linux/SDL_syshaptic.c source/src/haptic/windows/SDL_dinputhaptic.c source/src/haptic/windows/SDL_dinputhaptic_c.h source/src/haptic/windows/SDL_windowshaptic.c source/src/haptic/windows/SDL_windowshaptic_c.h source/src/haptic/windows/SDL_xinputhaptic.c source/src/haptic/windows/SDL_xinputhaptic_c.h source/src/hidapi/AUTHORS.txt source/src/hidapi/README.txt source/src/hidapi/SDL_hidapi.c source/src/hidapi/android/hid.cpp source/src/hidapi/hidapi/hidapi.h source/src/hidapi/ios/hid.m source/src/hidapi/libusb/hid.c source/src/hidapi/linux/hid.c source/src/hidapi/mac/hid.c source/src/hidapi/windows/hid.c source/src/joystick/SDL_gamecontroller.c source/src/joystick/SDL_gamecontrollerdb.h source/src/joystick/SDL_joystick.c source/src/joystick/SDL_joystick_c.h source/src/joystick/SDL_sysjoystick.h source/src/joystick/android/SDL_sysjoystick.c source/src/joystick/android/SDL_sysjoystick_c.h source/src/joystick/bsd/SDL_sysjoystick.c source/src/joystick/controller_type.h source/src/joystick/darwin/SDL_sysjoystick.c source/src/joystick/darwin/SDL_sysjoystick_c.h source/src/joystick/dummy/SDL_sysjoystick.c source/src/joystick/emscripten/SDL_sysjoystick.c source/src/joystick/emscripten/SDL_sysjoystick_c.h source/src/joystick/haiku/SDL_haikujoystick.cc source/src/joystick/hidapi/SDL_hidapi_gamecube.c source/src/joystick/hidapi/SDL_hidapi_ps4.c source/src/joystick/hidapi/SDL_hidapi_rumble.c source/src/joystick/hidapi/SDL_hidapi_rumble.h source/src/joystick/hidapi/SDL_hidapi_steam.c source/src/joystick/hidapi/SDL_hidapi_switch.c source/src/joystick/hidapi/SDL_hidapi_xbox360.c source/src/joystick/hidapi/SDL_hidapi_xbox360w.c source/src/joystick/hidapi/SDL_hidapi_xboxone.c source/src/joystick/hidapi/SDL_hidapijoystick.c source/src/joystick/hidapi/SDL_hidapijoystick_c.h source/src/joystick/hidapi/steam/controller_constants.h source/src/joystick/hidapi/steam/controller_structs.h source/src/joystick/iphoneos/SDL_sysjoystick.m source/src/joystick/iphoneos/SDL_sysjoystick_c.h source/src/joystick/linux/SDL_sysjoystick.c source/src/joystick/linux/SDL_sysjoystick_c.h source/src/joystick/psp/SDL_sysjoystick.c source/src/joystick/sort_controllers.py source/src/joystick/steam/SDL_steamcontroller.c source/src/joystick/steam/SDL_steamcontroller.h source/src/joystick/usb_ids.h source/src/joystick/windows/SDL_dinputjoystick.c source/src/joystick/windows/SDL_dinputjoystick_c.h source/src/joystick/windows/SDL_mmjoystick.c source/src/joystick/windows/SDL_windowsjoystick.c source/src/joystick/windows/SDL_windowsjoystick_c.h source/src/joystick/windows/SDL_xinputjoystick.c source/src/joystick/windows/SDL_xinputjoystick_c.h source/src/libm/e_exp.c source/src/libm/e_pow.c source/src/libm/k_rem_pio2.c source/src/libm/math_libm.h source/src/libm/math_private.h source/src/libm/s_atan.c source/src/libm/s_floor.c source/src/libm/s_scalbn.c source/src/loadso/dlopen/SDL_sysloadso.c source/src/loadso/dummy/SDL_sysloadso.c source/src/loadso/windows/SDL_sysloadso.c source/src/main/haiku/SDL_BApp.h source/src/main/haiku/SDL_BeApp.cc source/src/main/haiku/SDL_BeApp.h source/src/main/nacl/SDL_nacl_main.c source/src/main/uikit/SDL_uikit_main.c source/src/main/windows/SDL_windows_main.c source/src/main/windows/version.rc source/src/power/SDL_power.c source/src/power/SDL_syspower.h source/src/power/android/SDL_syspower.c source/src/power/emscripten/SDL_syspower.c source/src/power/haiku/SDL_syspower.c source/src/power/linux/SDL_syspower.c source/src/power/macosx/SDL_syspower.c source/src/power/psp/SDL_syspower.c source/src/power/uikit/SDL_syspower.h source/src/power/uikit/SDL_syspower.m source/src/power/windows/SDL_syspower.c source/src/power/winrt/SDL_syspower.cpp source/src/render/SDL_d3dmath.c source/src/render/SDL_d3dmath.h source/src/render/SDL_render.c source/src/render/SDL_sysrender.h source/src/render/SDL_yuv_sw.c source/src/render/SDL_yuv_sw_c.h source/src/render/direct3d/SDL_render_d3d.c source/src/render/direct3d/SDL_shaders_d3d.c source/src/render/direct3d/SDL_shaders_d3d.h source/src/render/direct3d11/SDL_render_d3d11.c source/src/render/direct3d11/SDL_render_winrt.cpp source/src/render/direct3d11/SDL_render_winrt.h source/src/render/direct3d11/SDL_shaders_d3d11.c source/src/render/direct3d11/SDL_shaders_d3d11.h source/src/render/metal/SDL_render_metal.m source/src/render/metal/SDL_shaders_metal.metal source/src/render/metal/SDL_shaders_metal_ios.h source/src/render/metal/SDL_shaders_metal_osx.h source/src/render/metal/SDL_shaders_metal_tvos.h source/src/render/metal/build-metal-shaders.sh source/src/render/opengl/SDL_glfuncs.h source/src/render/opengl/SDL_render_gl.c source/src/render/opengl/SDL_shaders_gl.c source/src/render/opengl/SDL_shaders_gl.h source/src/render/opengles/SDL_glesfuncs.h source/src/render/opengles/SDL_render_gles.c source/src/render/opengles2/SDL_gles2funcs.h source/src/render/opengles2/SDL_render_gles2.c source/src/render/opengles2/SDL_shaders_gles2.c source/src/render/opengles2/SDL_shaders_gles2.h source/src/render/psp/SDL_render_psp.c source/src/render/software/SDL_blendfillrect.c source/src/render/software/SDL_blendfillrect.h source/src/render/software/SDL_blendline.c source/src/render/software/SDL_blendline.h source/src/render/software/SDL_blendpoint.c source/src/render/software/SDL_blendpoint.h source/src/render/software/SDL_draw.h source/src/render/software/SDL_drawline.c source/src/render/software/SDL_drawline.h source/src/render/software/SDL_drawpoint.c source/src/render/software/SDL_drawpoint.h source/src/render/software/SDL_render_sw.c source/src/render/software/SDL_render_sw_c.h source/src/render/software/SDL_rotate.c source/src/render/software/SDL_rotate.h source/src/sensor/SDL_sensor.c source/src/sensor/SDL_sensor_c.h source/src/sensor/SDL_syssensor.h source/src/sensor/android/SDL_androidsensor.c source/src/sensor/android/SDL_androidsensor.h source/src/sensor/coremotion/SDL_coremotionsensor.h source/src/sensor/coremotion/SDL_coremotionsensor.m source/src/sensor/dummy/SDL_dummysensor.c source/src/sensor/dummy/SDL_dummysensor.h source/src/stdlib/SDL_getenv.c source/src/stdlib/SDL_iconv.c source/src/stdlib/SDL_malloc.c source/src/stdlib/SDL_qsort.c source/src/stdlib/SDL_stdlib.c source/src/stdlib/SDL_string.c source/src/stdlib/SDL_strtokr.c source/src/test/SDL_test_assert.c source/src/test/SDL_test_common.c source/src/test/SDL_test_compare.c source/src/test/SDL_test_crc32.c source/src/test/SDL_test_font.c source/src/test/SDL_test_fuzzer.c source/src/test/SDL_test_harness.c source/src/test/SDL_test_imageBlit.c source/src/test/SDL_test_imageBlitBlend.c source/src/test/SDL_test_imageFace.c source/src/test/SDL_test_imagePrimitives.c source/src/test/SDL_test_imagePrimitivesBlend.c source/src/test/SDL_test_log.c source/src/test/SDL_test_md5.c source/src/test/SDL_test_memory.c source/src/test/SDL_test_random.c source/src/thread/SDL_systhread.h source/src/thread/SDL_thread.c source/src/thread/SDL_thread_c.h source/src/thread/generic/SDL_syscond.c source/src/thread/generic/SDL_sysmutex.c source/src/thread/generic/SDL_sysmutex_c.h source/src/thread/generic/SDL_syssem.c source/src/thread/generic/SDL_systhread.c source/src/thread/generic/SDL_systhread_c.h source/src/thread/generic/SDL_systls.c source/src/thread/psp/SDL_syscond.c source/src/thread/psp/SDL_sysmutex.c source/src/thread/psp/SDL_sysmutex_c.h source/src/thread/psp/SDL_syssem.c source/src/thread/psp/SDL_systhread.c source/src/thread/psp/SDL_systhread_c.h source/src/thread/pthread/SDL_syscond.c source/src/thread/pthread/SDL_sysmutex.c source/src/thread/pthread/SDL_sysmutex_c.h source/src/thread/pthread/SDL_syssem.c source/src/thread/pthread/SDL_systhread.c source/src/thread/pthread/SDL_systhread_c.h source/src/thread/pthread/SDL_systls.c source/src/thread/stdcpp/SDL_syscond.cpp source/src/thread/stdcpp/SDL_sysmutex.cpp source/src/thread/stdcpp/SDL_sysmutex_c.h source/src/thread/stdcpp/SDL_systhread.cpp source/src/thread/stdcpp/SDL_systhread_c.h source/src/thread/windows/SDL_sysmutex.c source/src/thread/windows/SDL_syssem.c source/src/thread/windows/SDL_systhread.c source/src/thread/windows/SDL_systhread_c.h source/src/thread/windows/SDL_systls.c source/src/timer/SDL_timer.c source/src/timer/SDL_timer_c.h source/src/timer/dummy/SDL_systimer.c source/src/timer/haiku/SDL_systimer.c source/src/timer/psp/SDL_systimer.c source/src/timer/unix/SDL_systimer.c source/src/timer/windows/SDL_systimer.c source/src/video/SDL_RLEaccel.c source/src/video/SDL_RLEaccel_c.h source/src/video/SDL_blit.c source/src/video/SDL_blit.h source/src/video/SDL_blit_0.c source/src/video/SDL_blit_1.c source/src/video/SDL_blit_A.c source/src/video/SDL_blit_N.c source/src/video/SDL_blit_auto.c source/src/video/SDL_blit_auto.h source/src/video/SDL_blit_copy.c source/src/video/SDL_blit_copy.h source/src/video/SDL_blit_slow.c source/src/video/SDL_blit_slow.h source/src/video/SDL_bmp.c source/src/video/SDL_clipboard.c source/src/video/SDL_egl.c source/src/video/SDL_egl_c.h source/src/video/SDL_fillrect.c source/src/video/SDL_pixels.c source/src/video/SDL_pixels_c.h source/src/video/SDL_rect.c source/src/video/SDL_rect_c.h source/src/video/SDL_shape.c source/src/video/SDL_shape_internals.h source/src/video/SDL_stretch.c source/src/video/SDL_surface.c source/src/video/SDL_sysvideo.h source/src/video/SDL_video.c source/src/video/SDL_vulkan_internal.h source/src/video/SDL_vulkan_utils.c source/src/video/SDL_yuv.c source/src/video/SDL_yuv_c.h source/src/video/android/SDL_androidclipboard.c source/src/video/android/SDL_androidclipboard.h source/src/video/android/SDL_androidevents.c source/src/video/android/SDL_androidevents.h source/src/video/android/SDL_androidgl.c source/src/video/android/SDL_androidgl.h source/src/video/android/SDL_androidkeyboard.c source/src/video/android/SDL_androidkeyboard.h source/src/video/android/SDL_androidmessagebox.c source/src/video/android/SDL_androidmessagebox.h source/src/video/android/SDL_androidmouse.c source/src/video/android/SDL_androidmouse.h source/src/video/android/SDL_androidtouch.c source/src/video/android/SDL_androidtouch.h source/src/video/android/SDL_androidvideo.c source/src/video/android/SDL_androidvideo.h source/src/video/android/SDL_androidvulkan.c source/src/video/android/SDL_androidvulkan.h source/src/video/android/SDL_androidwindow.c source/src/video/android/SDL_androidwindow.h source/src/video/arm/pixman-arm-asm.h source/src/video/arm/pixman-arm-neon-asm.S source/src/video/arm/pixman-arm-neon-asm.h source/src/video/arm/pixman-arm-simd-asm.S source/src/video/arm/pixman-arm-simd-asm.h source/src/video/cocoa/SDL_cocoaclipboard.h source/src/video/cocoa/SDL_cocoaclipboard.m source/src/video/cocoa/SDL_cocoaevents.h source/src/video/cocoa/SDL_cocoaevents.m source/src/video/cocoa/SDL_cocoakeyboard.h source/src/video/cocoa/SDL_cocoakeyboard.m source/src/video/cocoa/SDL_cocoamessagebox.h source/src/video/cocoa/SDL_cocoamessagebox.m source/src/video/cocoa/SDL_cocoametalview.h source/src/video/cocoa/SDL_cocoametalview.m source/src/video/cocoa/SDL_cocoamodes.h source/src/video/cocoa/SDL_cocoamodes.m source/src/video/cocoa/SDL_cocoamouse.h source/src/video/cocoa/SDL_cocoamouse.m source/src/video/cocoa/SDL_cocoamousetap.h source/src/video/cocoa/SDL_cocoamousetap.m source/src/video/cocoa/SDL_cocoaopengl.h source/src/video/cocoa/SDL_cocoaopengl.m source/src/video/cocoa/SDL_cocoaopengles.h source/src/video/cocoa/SDL_cocoaopengles.m source/src/video/cocoa/SDL_cocoashape.h source/src/video/cocoa/SDL_cocoashape.m source/src/video/cocoa/SDL_cocoavideo.h source/src/video/cocoa/SDL_cocoavideo.m source/src/video/cocoa/SDL_cocoavulkan.h source/src/video/cocoa/SDL_cocoavulkan.m source/src/video/cocoa/SDL_cocoawindow.h source/src/video/cocoa/SDL_cocoawindow.m source/src/video/directfb/SDL_DirectFB_WM.c source/src/video/directfb/SDL_DirectFB_WM.h source/src/video/directfb/SDL_DirectFB_dyn.c source/src/video/directfb/SDL_DirectFB_dyn.h source/src/video/directfb/SDL_DirectFB_events.c source/src/video/directfb/SDL_DirectFB_events.h source/src/video/directfb/SDL_DirectFB_modes.c source/src/video/directfb/SDL_DirectFB_modes.h source/src/video/directfb/SDL_DirectFB_mouse.c source/src/video/directfb/SDL_DirectFB_mouse.h source/src/video/directfb/SDL_DirectFB_opengl.c source/src/video/directfb/SDL_DirectFB_opengl.h source/src/video/directfb/SDL_DirectFB_render.c source/src/video/directfb/SDL_DirectFB_render.h source/src/video/directfb/SDL_DirectFB_shape.c source/src/video/directfb/SDL_DirectFB_shape.h source/src/video/directfb/SDL_DirectFB_video.c source/src/video/directfb/SDL_DirectFB_video.h source/src/video/directfb/SDL_DirectFB_window.c source/src/video/directfb/SDL_DirectFB_window.h source/src/video/dummy/SDL_nullevents.c source/src/video/dummy/SDL_nullevents_c.h source/src/video/dummy/SDL_nullframebuffer.c source/src/video/dummy/SDL_nullframebuffer_c.h source/src/video/dummy/SDL_nullvideo.c source/src/video/dummy/SDL_nullvideo.h source/src/video/emscripten/SDL_emscriptenevents.c source/src/video/emscripten/SDL_emscriptenevents.h source/src/video/emscripten/SDL_emscriptenframebuffer.c source/src/video/emscripten/SDL_emscriptenframebuffer.h source/src/video/emscripten/SDL_emscriptenmouse.c source/src/video/emscripten/SDL_emscriptenmouse.h source/src/video/emscripten/SDL_emscriptenopengles.c source/src/video/emscripten/SDL_emscriptenopengles.h source/src/video/emscripten/SDL_emscriptenvideo.c source/src/video/emscripten/SDL_emscriptenvideo.h source/src/video/haiku/SDL_BWin.h source/src/video/haiku/SDL_bclipboard.cc source/src/video/haiku/SDL_bclipboard.h source/src/video/haiku/SDL_bevents.cc source/src/video/haiku/SDL_bevents.h source/src/video/haiku/SDL_bframebuffer.cc source/src/video/haiku/SDL_bframebuffer.h source/src/video/haiku/SDL_bkeyboard.cc source/src/video/haiku/SDL_bkeyboard.h source/src/video/haiku/SDL_bmessagebox.cc source/src/video/haiku/SDL_bmessagebox.h source/src/video/haiku/SDL_bmodes.cc source/src/video/haiku/SDL_bmodes.h source/src/video/haiku/SDL_bopengl.cc source/src/video/haiku/SDL_bopengl.h source/src/video/haiku/SDL_bvideo.cc source/src/video/haiku/SDL_bvideo.h source/src/video/haiku/SDL_bwindow.cc source/src/video/haiku/SDL_bwindow.h source/src/video/khronos/vulkan/vk_icd.h source/src/video/khronos/vulkan/vk_layer.h source/src/video/khronos/vulkan/vk_platform.h source/src/video/khronos/vulkan/vk_sdk_platform.h source/src/video/khronos/vulkan/vulkan.h source/src/video/khronos/vulkan/vulkan.hpp source/src/video/khronos/vulkan/vulkan_android.h source/src/video/khronos/vulkan/vulkan_core.h source/src/video/khronos/vulkan/vulkan_fuchsia.h source/src/video/khronos/vulkan/vulkan_ios.h source/src/video/khronos/vulkan/vulkan_macos.h source/src/video/khronos/vulkan/vulkan_mir.h source/src/video/khronos/vulkan/vulkan_vi.h source/src/video/khronos/vulkan/vulkan_wayland.h source/src/video/khronos/vulkan/vulkan_win32.h source/src/video/khronos/vulkan/vulkan_xcb.h source/src/video/khronos/vulkan/vulkan_xlib.h source/src/video/khronos/vulkan/vulkan_xlib_xrandr.h source/src/video/kmsdrm/SDL_kmsdrmdyn.c source/src/video/kmsdrm/SDL_kmsdrmdyn.h source/src/video/kmsdrm/SDL_kmsdrmevents.c source/src/video/kmsdrm/SDL_kmsdrmevents.h source/src/video/kmsdrm/SDL_kmsdrmmouse.c source/src/video/kmsdrm/SDL_kmsdrmmouse.h source/src/video/kmsdrm/SDL_kmsdrmopengles.c source/src/video/kmsdrm/SDL_kmsdrmopengles.h source/src/video/kmsdrm/SDL_kmsdrmsym.h source/src/video/kmsdrm/SDL_kmsdrmvideo.c source/src/video/kmsdrm/SDL_kmsdrmvideo.h source/src/video/mir/SDL_mirdyn.c (deleted) source/src/video/mir/SDL_mirdyn.h (deleted) source/src/video/mir/SDL_mirevents.c (deleted) source/src/video/mir/SDL_mirframebuffer.c (deleted) source/src/video/mir/SDL_mirframebuffer.h (deleted) source/src/video/mir/SDL_mirmouse.c (deleted) source/src/video/mir/SDL_miropengl.c (deleted) source/src/video/mir/SDL_miropengl.h (deleted) source/src/video/mir/SDL_mirsym.h (deleted) source/src/video/mir/SDL_mirvideo.c (deleted) source/src/video/mir/SDL_mirvideo.h (deleted) source/src/video/mir/SDL_mirwindow.c (deleted) source/src/video/mir/SDL_mirwindow.h (deleted) source/src/video/nacl/SDL_naclevents.c source/src/video/nacl/SDL_naclevents_c.h source/src/video/nacl/SDL_naclglue.c source/src/video/nacl/SDL_naclopengles.c source/src/video/nacl/SDL_naclopengles.h source/src/video/nacl/SDL_naclvideo.c source/src/video/nacl/SDL_naclvideo.h source/src/video/nacl/SDL_naclwindow.c source/src/video/nacl/SDL_naclwindow.h source/src/video/offscreen/SDL_offscreenevents.c source/src/video/offscreen/SDL_offscreenevents_c.h source/src/video/offscreen/SDL_offscreenframebuffer.c source/src/video/offscreen/SDL_offscreenframebuffer_c.h source/src/video/offscreen/SDL_offscreenopengl.c source/src/video/offscreen/SDL_offscreenopengl.h source/src/video/offscreen/SDL_offscreenvideo.c source/src/video/offscreen/SDL_offscreenvideo.h source/src/video/offscreen/SDL_offscreenwindow.c source/src/video/offscreen/SDL_offscreenwindow.h source/src/video/pandora/SDL_pandora.c source/src/video/pandora/SDL_pandora.h source/src/video/pandora/SDL_pandora_events.c source/src/video/pandora/SDL_pandora_events.h source/src/video/psp/SDL_pspevents.c source/src/video/psp/SDL_pspevents_c.h source/src/video/psp/SDL_pspgl.c source/src/video/psp/SDL_pspgl_c.h source/src/video/psp/SDL_pspmouse.c source/src/video/psp/SDL_pspmouse_c.h source/src/video/psp/SDL_pspvideo.c source/src/video/psp/SDL_pspvideo.h source/src/video/raspberry/SDL_rpievents.c source/src/video/raspberry/SDL_rpievents_c.h source/src/video/raspberry/SDL_rpimouse.c source/src/video/raspberry/SDL_rpimouse.h source/src/video/raspberry/SDL_rpiopengles.c source/src/video/raspberry/SDL_rpiopengles.h source/src/video/raspberry/SDL_rpivideo.c source/src/video/raspberry/SDL_rpivideo.h source/src/video/sdlgenblit.pl source/src/video/uikit/SDL_uikitappdelegate.h source/src/video/uikit/SDL_uikitappdelegate.m source/src/video/uikit/SDL_uikitclipboard.h source/src/video/uikit/SDL_uikitclipboard.m source/src/video/uikit/SDL_uikitevents.h source/src/video/uikit/SDL_uikitevents.m source/src/video/uikit/SDL_uikitmessagebox.h source/src/video/uikit/SDL_uikitmessagebox.m source/src/video/uikit/SDL_uikitmetalview.h source/src/video/uikit/SDL_uikitmetalview.m source/src/video/uikit/SDL_uikitmodes.h source/src/video/uikit/SDL_uikitmodes.m source/src/video/uikit/SDL_uikitopengles.h source/src/video/uikit/SDL_uikitopengles.m source/src/video/uikit/SDL_uikitopenglview.h source/src/video/uikit/SDL_uikitopenglview.m source/src/video/uikit/SDL_uikitvideo.h source/src/video/uikit/SDL_uikitvideo.m source/src/video/uikit/SDL_uikitview.h source/src/video/uikit/SDL_uikitview.m source/src/video/uikit/SDL_uikitviewcontroller.h source/src/video/uikit/SDL_uikitviewcontroller.m source/src/video/uikit/SDL_uikitvulkan.h source/src/video/uikit/SDL_uikitvulkan.m source/src/video/uikit/SDL_uikitwindow.h source/src/video/uikit/SDL_uikitwindow.m source/src/video/uikit/keyinfotable.h source/src/video/vivante/SDL_vivanteopengles.c source/src/video/vivante/SDL_vivanteopengles.h source/src/video/vivante/SDL_vivanteplatform.c source/src/video/vivante/SDL_vivanteplatform.h source/src/video/vivante/SDL_vivantevideo.c source/src/video/vivante/SDL_vivantevideo.h source/src/video/vivante/SDL_vivantevulkan.c source/src/video/vivante/SDL_vivantevulkan.h source/src/video/wayland/SDL_waylandclipboard.c source/src/video/wayland/SDL_waylandclipboard.h source/src/video/wayland/SDL_waylanddatamanager.c source/src/video/wayland/SDL_waylanddatamanager.h source/src/video/wayland/SDL_waylanddyn.c source/src/video/wayland/SDL_waylanddyn.h source/src/video/wayland/SDL_waylandevents.c source/src/video/wayland/SDL_waylandevents_c.h source/src/video/wayland/SDL_waylandmouse.c source/src/video/wayland/SDL_waylandmouse.h source/src/video/wayland/SDL_waylandopengles.c source/src/video/wayland/SDL_waylandopengles.h source/src/video/wayland/SDL_waylandsym.h source/src/video/wayland/SDL_waylandtouch.c source/src/video/wayland/SDL_waylandtouch.h source/src/video/wayland/SDL_waylandvideo.c source/src/video/wayland/SDL_waylandvideo.h source/src/video/wayland/SDL_waylandvulkan.c source/src/video/wayland/SDL_waylandvulkan.h source/src/video/wayland/SDL_waylandwindow.c source/src/video/wayland/SDL_waylandwindow.h source/src/video/windows/SDL_msctf.h source/src/video/windows/SDL_vkeys.h source/src/video/windows/SDL_windowsclipboard.c source/src/video/windows/SDL_windowsclipboard.h source/src/video/windows/SDL_windowsevents.c source/src/video/windows/SDL_windowsevents.h source/src/video/windows/SDL_windowsframebuffer.c source/src/video/windows/SDL_windowsframebuffer.h source/src/video/windows/SDL_windowskeyboard.c source/src/video/windows/SDL_windowskeyboard.h source/src/video/windows/SDL_windowsmessagebox.c source/src/video/windows/SDL_windowsmessagebox.h source/src/video/windows/SDL_windowsmodes.c source/src/video/windows/SDL_windowsmodes.h source/src/video/windows/SDL_windowsmouse.c source/src/video/windows/SDL_windowsmouse.h source/src/video/windows/SDL_windowsopengl.c source/src/video/windows/SDL_windowsopengl.h source/src/video/windows/SDL_windowsopengles.c source/src/video/windows/SDL_windowsopengles.h source/src/video/windows/SDL_windowsshape.c source/src/video/windows/SDL_windowsshape.h source/src/video/windows/SDL_windowstaskdialog.h source/src/video/windows/SDL_windowsvideo.c source/src/video/windows/SDL_windowsvideo.h source/src/video/windows/SDL_windowsvulkan.c source/src/video/windows/SDL_windowsvulkan.h source/src/video/windows/SDL_windowswindow.c source/src/video/windows/SDL_windowswindow.h source/src/video/windows/wmmsg.h source/src/video/winrt/SDL_winrtevents.cpp source/src/video/winrt/SDL_winrtevents_c.h source/src/video/winrt/SDL_winrtgamebar.cpp source/src/video/winrt/SDL_winrtgamebar_cpp.h source/src/video/winrt/SDL_winrtkeyboard.cpp source/src/video/winrt/SDL_winrtmessagebox.cpp source/src/video/winrt/SDL_winrtmessagebox.h source/src/video/winrt/SDL_winrtmouse.cpp source/src/video/winrt/SDL_winrtmouse_c.h source/src/video/winrt/SDL_winrtopengles.cpp source/src/video/winrt/SDL_winrtopengles.h source/src/video/winrt/SDL_winrtpointerinput.cpp source/src/video/winrt/SDL_winrtvideo.cpp source/src/video/winrt/SDL_winrtvideo_cpp.h source/src/video/x11/SDL_x11clipboard.c source/src/video/x11/SDL_x11clipboard.h source/src/video/x11/SDL_x11dyn.c source/src/video/x11/SDL_x11dyn.h source/src/video/x11/SDL_x11events.c source/src/video/x11/SDL_x11events.h source/src/video/x11/SDL_x11framebuffer.c source/src/video/x11/SDL_x11framebuffer.h source/src/video/x11/SDL_x11keyboard.c source/src/video/x11/SDL_x11keyboard.h source/src/video/x11/SDL_x11messagebox.c source/src/video/x11/SDL_x11messagebox.h source/src/video/x11/SDL_x11modes.c source/src/video/x11/SDL_x11modes.h source/src/video/x11/SDL_x11mouse.c source/src/video/x11/SDL_x11mouse.h source/src/video/x11/SDL_x11opengl.c source/src/video/x11/SDL_x11opengl.h source/src/video/x11/SDL_x11opengles.c source/src/video/x11/SDL_x11opengles.h source/src/video/x11/SDL_x11shape.c source/src/video/x11/SDL_x11shape.h source/src/video/x11/SDL_x11sym.h source/src/video/x11/SDL_x11touch.c source/src/video/x11/SDL_x11touch.h source/src/video/x11/SDL_x11video.c source/src/video/x11/SDL_x11video.h source/src/video/x11/SDL_x11vulkan.c source/src/video/x11/SDL_x11vulkan.h source/src/video/x11/SDL_x11window.c source/src/video/x11/SDL_x11window.h source/src/video/x11/SDL_x11xinput2.c source/src/video/x11/SDL_x11xinput2.h source/src/video/yuv2rgb/yuv_rgb.c source/test/CMakeLists.txt source/test/Makefile.in source/test/Makefile.os2 source/test/aclocal.m4 (deleted) source/test/checkkeys.c source/test/configure source/test/configure.ac source/test/controllermap.c source/test/loopwave.c source/test/loopwavequeue.c source/test/testatomic.c source/test/testaudiocapture.c source/test/testaudiohotplug.c source/test/testaudioinfo.c source/test/testautomation.c source/test/testautomation_pixels.c source/test/testautomation_rwops.c source/test/testautomation_surface.c source/test/testbounds.c source/test/testcustomcursor.c source/test/testdisplayinfo.c source/test/testdraw2.c source/test/testdrawchessboard.c source/test/testdropfile.c source/test/testerror.c source/test/testfile.c source/test/testfilesystem.c source/test/testgamecontroller.c source/test/testgesture.c source/test/testgl2.c source/test/testgles.c source/test/testgles2.c source/test/testhaptic.c source/test/testhotplug.c source/test/testiconv.c source/test/testime.c source/test/testintersections.c source/test/testjoystick.c source/test/testkeys.c source/test/testloadso.c source/test/testlock.c source/test/testmessage.c source/test/testmultiaudio.c source/test/testnative.c source/test/testnative.h source/test/testnativew32.c source/test/testnativex11.c source/test/testoffscreen.c source/test/testoverlay2.c source/test/testplatform.c source/test/testpower.c source/test/testqsort.c source/test/testrelative.c source/test/testrendercopyex.c source/test/testrendertarget.c source/test/testresample.c source/test/testrumble.c source/test/testscale.c source/test/testsem.c source/test/testsensor.c source/test/testshader.c source/test/testshape.c source/test/testsprite2.c source/test/testspriteminimal.c source/test/teststreaming.c source/test/testthread.c source/test/testtimer.c source/test/testver.c source/test/testviewport.c source/test/testvulkan.c source/test/testwm2.c source/test/testyuv.c source/test/testyuv_cvt.c source/test/testyuv_cvt.h source/test/torturethread.c source/visualtest/unittest/testquit.c source/wayland-protocols/org-kde-kwin-server-decoration-manager.xml source/wayland-protocols/xdg-decoration-unstable-v1.xml