Browse Source

Update SDL to 2.0.12

Miku AuahDark 5 years ago
parent
commit
210d185200
100 changed files with 4517 additions and 716 deletions
  1. 0 1
      love/src/jni/SDL2/Android.mk
  2. 27 9
      love/src/jni/SDL2/CMakeLists.txt
  3. 1 1
      love/src/jni/SDL2/COPYING.txt
  4. 3 1
      love/src/jni/SDL2/Makefile.in
  5. 1 1
      love/src/jni/SDL2/Makefile.os2
  6. 119 0
      love/src/jni/SDL2/SDL2.spec
  7. 3 0
      love/src/jni/SDL2/VisualC/SDL/SDL.vcxproj
  8. 3 0
      love/src/jni/SDL2/VisualC/SDL/SDL.vcxproj.filters
  9. 57 1
      love/src/jni/SDL2/WhatsNew.txt
  10. 48 0
      love/src/jni/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj
  11. 2 2
      love/src/jni/SDL2/Xcode/SDL/Info-Framework.plist
  12. 3696 472
      love/src/jni/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj
  13. 22 0
      love/src/jni/SDL2/Xcode/SDL/hidapi/Info.plist
  14. 1 1
      love/src/jni/SDL2/Xcode/SDL/pkg-support/resources/License.txt
  15. 14 0
      love/src/jni/SDL2/android-project/app/src/main/AndroidManifest.xml
  16. 3 0
      love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDevice.java
  17. 14 8
      love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java
  18. 56 73
      love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java
  19. 16 19
      love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
  20. 93 22
      love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java
  21. 1 1
      love/src/jni/SDL2/build-scripts/winrtbuild.ps1
  22. 3 1
      love/src/jni/SDL2/cmake/sdlchecks.cmake
  23. 39 8
      love/src/jni/SDL2/configure
  24. 33 8
      love/src/jni/SDL2/configure.ac
  25. 6 0
      love/src/jni/SDL2/debian/changelog
  26. 6 6
      love/src/jni/SDL2/debian/copyright
  27. 1 0
      love/src/jni/SDL2/debian/libsdl2-dev.install
  28. 1 1
      love/src/jni/SDL2/include/SDL.h
  29. 1 1
      love/src/jni/SDL2/include/SDL_assert.h
  30. 1 1
      love/src/jni/SDL2/include/SDL_atomic.h
  31. 1 1
      love/src/jni/SDL2/include/SDL_audio.h
  32. 1 1
      love/src/jni/SDL2/include/SDL_bits.h
  33. 4 1
      love/src/jni/SDL2/include/SDL_blendmode.h
  34. 1 1
      love/src/jni/SDL2/include/SDL_clipboard.h
  35. 1 1
      love/src/jni/SDL2/include/SDL_config.h
  36. 1 1
      love/src/jni/SDL2/include/SDL_config.h.cmake
  37. 1 1
      love/src/jni/SDL2/include/SDL_config.h.in
  38. 1 1
      love/src/jni/SDL2/include/SDL_config_android.h
  39. 2 2
      love/src/jni/SDL2/include/SDL_config_iphoneos.h
  40. 1 1
      love/src/jni/SDL2/include/SDL_config_macosx.h
  41. 1 1
      love/src/jni/SDL2/include/SDL_config_minimal.h
  42. 1 1
      love/src/jni/SDL2/include/SDL_config_os2.h
  43. 1 1
      love/src/jni/SDL2/include/SDL_config_pandora.h
  44. 1 1
      love/src/jni/SDL2/include/SDL_config_psp.h
  45. 1 1
      love/src/jni/SDL2/include/SDL_config_windows.h
  46. 1 1
      love/src/jni/SDL2/include/SDL_config_winrt.h
  47. 1 1
      love/src/jni/SDL2/include/SDL_config_wiz.h
  48. 1 1
      love/src/jni/SDL2/include/SDL_copying.h
  49. 1 1
      love/src/jni/SDL2/include/SDL_cpuinfo.h
  50. 1 1
      love/src/jni/SDL2/include/SDL_egl.h
  51. 1 1
      love/src/jni/SDL2/include/SDL_endian.h
  52. 1 1
      love/src/jni/SDL2/include/SDL_error.h
  53. 1 1
      love/src/jni/SDL2/include/SDL_events.h
  54. 1 1
      love/src/jni/SDL2/include/SDL_filesystem.h
  55. 11 1
      love/src/jni/SDL2/include/SDL_gamecontroller.h
  56. 1 1
      love/src/jni/SDL2/include/SDL_gesture.h
  57. 1 1
      love/src/jni/SDL2/include/SDL_haptic.h
  58. 55 1
      love/src/jni/SDL2/include/SDL_hints.h
  59. 12 2
      love/src/jni/SDL2/include/SDL_joystick.h
  60. 1 1
      love/src/jni/SDL2/include/SDL_keyboard.h
  61. 1 1
      love/src/jni/SDL2/include/SDL_keycode.h
  62. 1 1
      love/src/jni/SDL2/include/SDL_loadso.h
  63. 1 1
      love/src/jni/SDL2/include/SDL_log.h
  64. 1 1
      love/src/jni/SDL2/include/SDL_main.h
  65. 1 1
      love/src/jni/SDL2/include/SDL_messagebox.h
  66. 1 1
      love/src/jni/SDL2/include/SDL_metal.h
  67. 1 1
      love/src/jni/SDL2/include/SDL_mouse.h
  68. 1 1
      love/src/jni/SDL2/include/SDL_mutex.h
  69. 1 1
      love/src/jni/SDL2/include/SDL_name.h
  70. 1 1
      love/src/jni/SDL2/include/SDL_opengl.h
  71. 1 1
      love/src/jni/SDL2/include/SDL_opengles.h
  72. 1 1
      love/src/jni/SDL2/include/SDL_opengles2.h
  73. 1 1
      love/src/jni/SDL2/include/SDL_pixels.h
  74. 1 1
      love/src/jni/SDL2/include/SDL_platform.h
  75. 1 1
      love/src/jni/SDL2/include/SDL_power.h
  76. 1 1
      love/src/jni/SDL2/include/SDL_quit.h
  77. 1 1
      love/src/jni/SDL2/include/SDL_rect.h
  78. 42 3
      love/src/jni/SDL2/include/SDL_render.h
  79. 2 2
      love/src/jni/SDL2/include/SDL_revision.h
  80. 1 1
      love/src/jni/SDL2/include/SDL_rwops.h
  81. 1 1
      love/src/jni/SDL2/include/SDL_scancode.h
  82. 1 1
      love/src/jni/SDL2/include/SDL_sensor.h
  83. 1 1
      love/src/jni/SDL2/include/SDL_shape.h
  84. 3 1
      love/src/jni/SDL2/include/SDL_stdinc.h
  85. 1 1
      love/src/jni/SDL2/include/SDL_surface.h
  86. 41 4
      love/src/jni/SDL2/include/SDL_system.h
  87. 1 1
      love/src/jni/SDL2/include/SDL_syswm.h
  88. 1 1
      love/src/jni/SDL2/include/SDL_test.h
  89. 1 1
      love/src/jni/SDL2/include/SDL_test_assert.h
  90. 14 1
      love/src/jni/SDL2/include/SDL_test_common.h
  91. 1 1
      love/src/jni/SDL2/include/SDL_test_compare.h
  92. 1 1
      love/src/jni/SDL2/include/SDL_test_crc32.h
  93. 1 1
      love/src/jni/SDL2/include/SDL_test_font.h
  94. 1 1
      love/src/jni/SDL2/include/SDL_test_fuzzer.h
  95. 1 1
      love/src/jni/SDL2/include/SDL_test_harness.h
  96. 1 1
      love/src/jni/SDL2/include/SDL_test_images.h
  97. 1 1
      love/src/jni/SDL2/include/SDL_test_log.h
  98. 1 1
      love/src/jni/SDL2/include/SDL_test_md5.h
  99. 1 1
      love/src/jni/SDL2/include/SDL_test_memory.h
  100. 1 1
      love/src/jni/SDL2/include/SDL_test_random.h

+ 0 - 1
love/src/jni/SDL2/Android.mk

@@ -66,7 +66,6 @@ LOCAL_CFLAGS += \
 	-Wshorten-64-to-32 \
 	-Wunreachable-code-return \
 	-Wshift-sign-overflow \
-	-Wunused-macros \
 	-Wstrict-prototypes \
 	-Wkeyword-macro \
 

+ 27 - 9
love/src/jni/SDL2/CMakeLists.txt

@@ -42,9 +42,9 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
 # set SDL_BINARY_AGE and SDL_INTERFACE_AGE to 0.
 set(SDL_MAJOR_VERSION 2)
 set(SDL_MINOR_VERSION 0)
-set(SDL_MICRO_VERSION 11)
+set(SDL_MICRO_VERSION 12)
 set(SDL_INTERFACE_AGE 0)
-set(SDL_BINARY_AGE 11)
+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 12.0.0)
@@ -129,7 +129,7 @@ elseif(CMAKE_SYSTEM_NAME MATCHES "Haiku.*")
 endif()
 
 # Don't mistake osx for unix
-if(UNIX AND NOT APPLE)
+if(UNIX AND NOT APPLE AND NOT RISCOS)
   set(UNIX_SYS ON)
 else()
   set(UNIX_SYS OFF)
@@ -341,7 +341,7 @@ set_option(VIDEO_OPENGLES      "Include OpenGL ES support" ON)
 set_option(PTHREADS            "Use POSIX threads for multi-threading" ${SDL_PTHREADS_ENABLED_BY_DEFAULT})
 dep_option(PTHREADS_SEM        "Use pthread semaphores" ON "PTHREADS" OFF)
 set_option(SDL_DLOPEN          "Use dlopen for shared object loading" ${SDL_DLOPEN_ENABLED_BY_DEFAULT})
-set_option(OSS                 "Support the OSS audio API" ${UNIX_SYS})
+dep_option(OSS                 "Support the OSS audio API" ON "UNIX_SYS OR RISCOS" OFF)
 set_option(ALSA                "Support the ALSA audio API" ${UNIX_SYS})
 dep_option(ALSA_SHARED         "Dynamically load ALSA audio support" ON "ALSA" OFF)
 set_option(JACK                "Support the JACK audio API" ${UNIX_SYS})
@@ -1091,7 +1091,7 @@ elseif(EMSCRIPTEN)
     endif()
   endif()
 
-elseif(UNIX AND NOT APPLE AND NOT ANDROID)
+elseif(UNIX AND NOT APPLE AND NOT ANDROID AND NOT RISCOS)
   if(SDL_AUDIO)
     if(SYSV5 OR SOLARIS OR HPUX)
         set(SDL_AUDIO_DRIVER_SUNAUDIO 1)
@@ -1814,6 +1814,24 @@ elseif(HAIKU)
   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)
@@ -2010,7 +2028,7 @@ 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}")
@@ -2045,7 +2063,7 @@ if(SDL_SHARED)
   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}")
   endif()
@@ -2091,7 +2109,7 @@ if(SDL_STATIC)
   # libraries - do we need to consider this?
   set(_INSTALL_LIBS "SDL2-static" ${_INSTALL_LIBS})
   target_link_libraries(SDL2-static ${EXTRA_LIBS} ${EXTRA_LDFLAGS})
-  target_include_directories(SDL2-static PUBLIC "$<BUILD_INTERFACE:${SDL2_SOURCE_DIR}/include>" $<INSTALL_INTERFACE:include/SDL2>)
+  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}")
   endif()
@@ -2119,7 +2137,7 @@ install(TARGETS ${_INSTALL_LIBS} EXPORT SDL2Targets
 if (WINDOWS)
   set(PKG_PREFIX "cmake")
 else ()
-  set(PKG_PREFIX "lib/cmake/SDL2")
+  set(PKG_PREFIX "lib${LIB_SUFFIX}/cmake/SDL2")
 endif ()
 
 include(CMakePackageConfigHelpers)

+ 1 - 1
love/src/jni/SDL2/COPYING.txt

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

+ 3 - 1
love/src/jni/SDL2/Makefile.in

@@ -46,7 +46,7 @@ WAYLAND_SCANNER = @WAYLAND_SCANNER@
 
 INSTALL_SDL2_CONFIG = @INSTALL_SDL2_CONFIG@
 
-SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
+SRC_DIST = *.txt acinclude Android.mk autogen.sh android-project build-scripts cmake cmake_uninstall.cmake.in configure configure.ac debian docs include Makefile.* sdl2-config.cmake.in sdl2-config-version.cmake.in sdl2-config.in sdl2.m4 sdl2.pc.in SDL2.spec.in SDL2Config.cmake src test VisualC.html VisualC VisualC-WinRT Xcode Xcode-iOS wayland-protocols
 GEN_DIST = SDL2.spec
 
 ifneq ($V,1)
@@ -188,6 +188,7 @@ install-data:
 ifeq ($(INSTALL_SDL2_CONFIG),TRUE)
 	$(SHELL) $(auxdir)/mkinstalldirs $(DESTDIR)$(libdir)/cmake/SDL2
 	$(INSTALL) -m 644 sdl2-config.cmake $(DESTDIR)$(libdir)/cmake/SDL2
+	$(INSTALL) -m 644 sdl2-config-version.cmake $(DESTDIR)$(libdir)/cmake/SDL2
 endif
 
 uninstall: uninstall-bin uninstall-hdrs uninstall-lib uninstall-data
@@ -208,6 +209,7 @@ uninstall-data:
 	rm -f $(DESTDIR)$(datadir)/aclocal/sdl2.m4
 	rm -f $(DESTDIR)$(libdir)/pkgconfig/sdl2.pc
 	rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config.cmake
+	rm -f $(DESTDIR)$(libdir)/cmake/SDL2/sdl2-config-version.cmake
 
 clean:
 	rm -rf $(objects)

+ 1 - 1
love/src/jni/SDL2/Makefile.os2

@@ -2,7 +2,7 @@
 # wmake -f Makefile.os2
 
 LIBNAME = SDL2
-VERSION = 2.0.11
+VERSION = 2.0.12
 DESCRIPTION = Simple DirectMedia Layer 2
 
 LIBHOME = .

+ 119 - 0
love/src/jni/SDL2/SDL2.spec

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

+ 3 - 0
love/src/jni/SDL2/VisualC/SDL/SDL.vcxproj

@@ -419,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" />

+ 3 - 0
love/src/jni/SDL2/VisualC/SDL/SDL.vcxproj.filters

@@ -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" />

+ 57 - 1
love/src/jni/SDL2/WhatsNew.txt

@@ -2,11 +2,67 @@
 This is a list of major changes in SDL's version history.
 
 ---------------------------------------------------------------------------
-2.0.11/12:
+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:

+ 48 - 0
love/src/jni/SDL2/Xcode-iOS/SDL/SDL.xcodeproj/project.pbxproj

@@ -363,10 +363,29 @@
 		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 */; };
@@ -971,8 +990,13 @@
 		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>"; };
@@ -1467,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 */,
@@ -1971,6 +2000,7 @@
 				52ED1DD5222889500061FCE0 /* SDL_syswm.h in Headers */,
 				52ED1DD6222889500061FCE0 /* SDL_thread.h in Headers */,
 				52ED1DD7222889500061FCE0 /* SDL_timer.h in Headers */,
+				A75FDBDE23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
 				52ED1DD8222889500061FCE0 /* SDL_touch.h in Headers */,
 				52ED1DD9222889500061FCE0 /* SDL_types.h in Headers */,
 				52ED1DDA222889500061FCE0 /* SDL_version.h in Headers */,
@@ -2107,6 +2137,7 @@
 				F3E3C6C32241389A007D243C /* SDL_syswm.h in Headers */,
 				F3E3C6C42241389A007D243C /* SDL_thread.h in Headers */,
 				F3E3C6C52241389A007D243C /* SDL_timer.h in Headers */,
+				A75FDBDF23EA38AD00529352 /* SDL_hidapi_rumble.h in Headers */,
 				F3E3C6C62241389A007D243C /* SDL_touch.h in Headers */,
 				F3E3C6C72241389A007D243C /* SDL_types.h in Headers */,
 				F3E3C6C82241389A007D243C /* SDL_version.h in Headers */,
@@ -2244,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 */,
@@ -2495,12 +2527,14 @@
 				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 */,
@@ -2516,6 +2550,7 @@
 				52ED1E1C222889500061FCE0 /* SDL_stretch.c in Sources */,
 				52ED1E1D222889500061FCE0 /* SDL_egl.c in Sources */,
 				52ED1E1E222889500061FCE0 /* SDL_surface.c in Sources */,
+				A75FDBDA23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
 				52ED1E1F222889500061FCE0 /* SDL_video.c in Sources */,
 				52ED1E20222889500061FCE0 /* SDL_nullevents.c in Sources */,
 				52ED1E21222889500061FCE0 /* SDL_nullvideo.c in Sources */,
@@ -2559,6 +2594,7 @@
 				52ED1E47222889500061FCE0 /* SDL_render_gles.c in Sources */,
 				52ED1E48222889500061FCE0 /* SDL_hints.c in Sources */,
 				52ED1E49222889500061FCE0 /* SDL_shape.c in Sources */,
+				A7FF6B6823AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
 				52ED1E4A222889500061FCE0 /* SDL_render_gles2.c in Sources */,
 				52ED1E4B222889500061FCE0 /* SDL_dummysensor.c in Sources */,
 				52ED1E4C222889500061FCE0 /* SDL_shaders_gles2.c in Sources */,
@@ -2624,12 +2660,14 @@
 				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 */,
@@ -2645,6 +2683,7 @@
 				F3E3C70A2241389A007D243C /* SDL_stretch.c in Sources */,
 				F3E3C70B2241389A007D243C /* SDL_egl.c in Sources */,
 				F3E3C70C2241389A007D243C /* SDL_surface.c in Sources */,
+				A75FDBDC23EA38AD00529352 /* SDL_hidapi_rumble.c in Sources */,
 				F3E3C70D2241389A007D243C /* SDL_video.c in Sources */,
 				F3E3C70E2241389A007D243C /* SDL_nullevents.c in Sources */,
 				F3E3C70F2241389A007D243C /* SDL_nullvideo.c in Sources */,
@@ -2688,6 +2727,7 @@
 				F3E3C7362241389A007D243C /* SDL_render_gles.c in Sources */,
 				F3E3C7372241389A007D243C /* SDL_hints.c in Sources */,
 				F3E3C7382241389A007D243C /* SDL_shape.c in Sources */,
+				A7FF6B6A23AC3BCD005876C6 /* SDL_hidapi_xbox360w.c in Sources */,
 				F3E3C7392241389A007D243C /* SDL_render_gles2.c in Sources */,
 				F3E3C73A2241389A007D243C /* SDL_dummysensor.c in Sources */,
 				F3E3C73B2241389A007D243C /* SDL_shaders_gles2.c in Sources */,
@@ -2750,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 */,
@@ -2758,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 */,
@@ -2787,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 */,
@@ -2805,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 */,
@@ -2872,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 */,
@@ -2883,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 */,
@@ -2893,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 */,
@@ -2936,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 */,

+ 2 - 2
love/src/jni/SDL2/Xcode/SDL/Info-Framework.plist

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

File diff suppressed because it is too large
+ 3696 - 472
love/src/jni/SDL2/Xcode/SDL/SDL.xcodeproj/project.pbxproj


+ 22 - 0
love/src/jni/SDL2/Xcode/SDL/hidapi/Info.plist

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

+ 1 - 1
love/src/jni/SDL2/Xcode/SDL/pkg-support/resources/License.txt

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

+ 14 - 0
love/src/jni/SDL2/android-project/app/src/main/AndroidManifest.xml

@@ -17,17 +17,31 @@
         android:required="false" />
 
     <!-- Game controller support -->
+    <uses-feature
+        android:name="android.hardware.bluetooth"
+        android:required="false" />
     <uses-feature
         android:name="android.hardware.gamepad"
         android:required="false" />
+    <uses-feature
+        android:name="android.hardware.usb.host"
+        android:required="false" />
 
     <!-- External mouse input events -->
     <uses-feature
         android:name="android.hardware.type.pc"
         android:required="false" />
 
+    <!-- Audio recording support -->
+    <!-- if you want to capture audio, uncomment this. -->
+    <!-- <uses-feature
+        android:name="android.hardware.microphone"
+        android:required="false" /> -->
+
     <!-- Allow writing to external storage -->
     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <!-- Allow access to Bluetooth devices -->
+    <uses-permission android:name="android.permission.BLUETOOTH" />
     <!-- Allow access to the vibrator -->
     <uses-permission android:name="android.permission.VIBRATE" />
 

+ 3 - 0
love/src/jni/SDL2/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 @@ interface HIDDevice
     public int getVersion();
     public String getManufacturerName();
     public String getProductName();
+    public UsbDevice getDevice();
     public boolean open();
     public int sendFeatureReport(byte[] report);
     public int sendOutputReport(byte[] report);

+ 14 - 8
love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceBLESteamController.java

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

+ 56 - 73
love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceManager.java

@@ -19,8 +19,9 @@ import android.hardware.usb.*;
 import android.os.Handler;
 import android.os.Looper;
 
-import java.util.HashMap;
 import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
 import java.util.List;
 
 public class HIDDeviceManager {
@@ -50,7 +51,6 @@ public class HIDDeviceManager {
 
     private Context mContext;
     private HashMap<Integer, HIDDevice> mDevicesById = new HashMap<Integer, HIDDevice>();
-    private HashMap<UsbDevice, HIDDeviceUSB> mUSBDevices = new HashMap<UsbDevice, HIDDeviceUSB>();
     private HashMap<BluetoothDevice, HIDDeviceBLESteamController> mBluetoothDevices = new HashMap<BluetoothDevice, HIDDeviceBLESteamController>();
     private int mNextDeviceId = 0;
     private SharedPreferences mSharedPreferences = null;
@@ -241,31 +241,20 @@ public class HIDDeviceManager {
         }
     }
 
-    private boolean isHIDDeviceUSB(UsbDevice usbDevice) {
-        for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); ++interface_number) {
-            if (isHIDDeviceInterface(usbDevice, interface_number)) {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private boolean isHIDDeviceInterface(UsbDevice usbDevice, int interface_number) {
-        UsbInterface usbInterface = usbDevice.getInterface(interface_number);
+    private boolean isHIDDeviceInterface(UsbDevice usbDevice, UsbInterface usbInterface) {
         if (usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_HID) {
             return true;
         }
-        if (interface_number == 0) {
-            if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
-                return true;
-            }
+        if (isXbox360Controller(usbDevice, usbInterface) || isXboxOneController(usbDevice, usbInterface)) {
+            return true;
         }
         return false;
     }
 
     private boolean isXbox360Controller(UsbDevice usbDevice, UsbInterface usbInterface) {
         final int XB360_IFACE_SUBCLASS = 93;
-        final int XB360_IFACE_PROTOCOL = 1; // Wired only
+        final int XB360_IFACE_PROTOCOL = 1; // Wired
+        final int XB360W_IFACE_PROTOCOL = 129; // Wireless
         final int[] SUPPORTED_VENDORS = {
             0x0079, // GPD Win 2
             0x044f, // Thrustmaster
@@ -290,10 +279,10 @@ public class HIDDeviceManager {
             0x24c6, // PowerA
         };
 
-        if (usbInterface.getId() == 0 &&
-            usbInterface.getInterfaceClass() == UsbConstants.USB_CLASS_VENDOR_SPEC &&
+        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) {
@@ -332,45 +321,45 @@ public class HIDDeviceManager {
     }
 
     private void handleUsbDeviceAttached(UsbDevice usbDevice) {
-        if (isHIDDeviceUSB(usbDevice)) {
-            connectHIDDeviceUSB(usbDevice);
-        }
+        connectHIDDeviceUSB(usbDevice);
     }
 
     private void handleUsbDeviceDetached(UsbDevice usbDevice) {
-        HIDDeviceUSB device = mUSBDevices.get(usbDevice);
-        if (device == null)
-            return;
-
-        int id = device.getId();
-        mUSBDevices.remove(usbDevice);
-        mDevicesById.remove(id);
-        device.shutdown();
-        HIDDeviceDisconnected(id);
+        List<Integer> devices = new ArrayList<Integer>();
+        for (HIDDevice device : mDevicesById.values()) {
+            if (usbDevice.equals(device.getDevice())) {
+                devices.add(device.getId());
+            }
+        }
+        for (int id : devices) {
+            HIDDevice device = mDevicesById.get(id);
+            mDevicesById.remove(id);
+            device.shutdown();
+            HIDDeviceDisconnected(id);
+        }
     }
 
     private void handleUsbDevicePermission(UsbDevice usbDevice, boolean permission_granted) {
-        HIDDeviceUSB device = mUSBDevices.get(usbDevice);
-        if (device == null)
-            return;
-
-        boolean opened = false;
-        if (permission_granted) {
-            opened = device.open();
+        for (HIDDevice device : mDevicesById.values()) {
+            if (usbDevice.equals(device.getDevice())) {
+                boolean opened = false;
+                if (permission_granted) {
+                    opened = device.open();
+                }
+                HIDDeviceOpenResult(device.getId(), opened);
+            }
         }
-        HIDDeviceOpenResult(device.getId(), opened);
     }
 
     private void connectHIDDeviceUSB(UsbDevice usbDevice) {
         synchronized (this) {
-            for (int interface_number = 0; interface_number < usbDevice.getInterfaceCount(); interface_number++) {
-                if (isHIDDeviceInterface(usbDevice, interface_number)) {
-                    HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_number);
+            for (int interface_index = 0; interface_index < usbDevice.getInterfaceCount(); interface_index++) {
+                UsbInterface usbInterface = usbDevice.getInterface(interface_index);
+                if (isHIDDeviceInterface(usbDevice, usbInterface)) {
+                    HIDDeviceUSB device = new HIDDeviceUSB(this, usbDevice, interface_index);
                     int id = device.getId();
-                    mUSBDevices.put(usbDevice, device);
                     mDevicesById.put(id, device);
-                    HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), interface_number);
-                    break;
+                    HIDDeviceConnected(id, device.getIdentifier(), device.getVendorId(), device.getProductId(), device.getSerialNumber(), device.getVersion(), device.getManufacturerName(), device.getProductName(), usbInterface.getId(), usbInterface.getInterfaceClass(), usbInterface.getInterfaceSubclass(), usbInterface.getInterfaceProtocol());
                 }
             }
         }
@@ -567,33 +556,27 @@ public class HIDDeviceManager {
     //////////////////////////////////////////////////////////////////////////////////////////////////////
 
     public boolean openDevice(int deviceID) {
+        Log.v(TAG, "openDevice deviceID=" + deviceID);
+        HIDDevice device = getDevice(deviceID);
+        if (device == null) {
+            HIDDeviceDisconnected(deviceID);
+            return false;
+        }
+
         // Look to see if this is a USB device and we have permission to access it
-        for (HIDDeviceUSB device : mUSBDevices.values()) {
-            if (deviceID == device.getId()) {
-                UsbDevice usbDevice = device.getDevice();
-                if (!mUsbManager.hasPermission(usbDevice)) {
-                    HIDDeviceOpenPending(deviceID);
-                    try {
-                        mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
-                    } catch (Exception e) {
-                        Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
-                        HIDDeviceOpenResult(deviceID, false);
-                    }
-                    return false;
-                }
-                break;
+        UsbDevice usbDevice = device.getDevice();
+        if (usbDevice != null && !mUsbManager.hasPermission(usbDevice)) {
+            HIDDeviceOpenPending(deviceID);
+            try {
+                mUsbManager.requestPermission(usbDevice, PendingIntent.getBroadcast(mContext, 0, new Intent(HIDDeviceManager.ACTION_USB_PERMISSION), 0));
+            } catch (Exception e) {
+                Log.v(TAG, "Couldn't request permission for USB device " + usbDevice);
+                HIDDeviceOpenResult(deviceID, false);
             }
+            return false;
         }
 
         try {
-            Log.v(TAG, "openDevice deviceID=" + deviceID);
-            HIDDevice device;
-            device = getDevice(deviceID);
-            if (device == null) {
-                HIDDeviceDisconnected(deviceID);
-                return false;
-            }
-
             return device.open();
         } catch (Exception e) {
             Log.e(TAG, "Got exception: " + Log.getStackTraceString(e));
@@ -603,7 +586,7 @@ public class HIDDeviceManager {
 
     public int sendOutputReport(int deviceID, byte[] report) {
         try {
-            Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
+            //Log.v(TAG, "sendOutputReport deviceID=" + deviceID + " length=" + report.length);
             HIDDevice device;
             device = getDevice(deviceID);
             if (device == null) {
@@ -620,7 +603,7 @@ public class HIDDeviceManager {
 
     public int sendFeatureReport(int deviceID, byte[] report) {
         try {
-            Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
+            //Log.v(TAG, "sendFeatureReport deviceID=" + deviceID + " length=" + report.length);
             HIDDevice device;
             device = getDevice(deviceID);
             if (device == null) {
@@ -637,7 +620,7 @@ public class HIDDeviceManager {
 
     public boolean getFeatureReport(int deviceID, byte[] report) {
         try {
-            Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
+            //Log.v(TAG, "getFeatureReport deviceID=" + deviceID);
             HIDDevice device;
             device = getDevice(deviceID);
             if (device == null) {
@@ -676,7 +659,7 @@ public class HIDDeviceManager {
     private native void HIDDeviceRegisterCallback();
     private native void HIDDeviceReleaseCallback();
 
-    native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number);
+    native void HIDDeviceConnected(int deviceID, String identifier, int vendorId, int productId, String serial_number, int release_number, String manufacturer_string, String product_string, int interface_number, int interface_class, int interface_subclass, int interface_protocol);
     native void HIDDeviceOpenPending(int deviceID);
     native void HIDDeviceOpenResult(int deviceID, boolean opened);
     native void HIDDeviceDisconnected(int deviceID);

+ 16 - 19
love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java

@@ -11,6 +11,7 @@ class HIDDeviceUSB implements HIDDevice {
 
     protected HIDDeviceManager mManager;
     protected UsbDevice mDevice;
+    protected int mInterfaceIndex;
     protected int mInterface;
     protected int mDeviceId;
     protected UsbDeviceConnection mConnection;
@@ -20,16 +21,17 @@ class HIDDeviceUSB implements HIDDevice {
     protected boolean mRunning;
     protected boolean mFrozen;
 
-    public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_number) {
+    public HIDDeviceUSB(HIDDeviceManager manager, UsbDevice usbDevice, int interface_index) {
         mManager = manager;
         mDevice = usbDevice;
-        mInterface = interface_number;
+        mInterfaceIndex = interface_index;
+        mInterface = mDevice.getInterface(mInterfaceIndex).getId();
         mDeviceId = manager.getDeviceIDForIdentifier(getIdentifier());
         mRunning = false;
     }
 
     public String getIdentifier() {
-        return String.format("%s/%x/%x", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId());
+        return String.format("%s/%x/%x/%d", mDevice.getDeviceName(), mDevice.getVendorId(), mDevice.getProductId(), mInterfaceIndex);
     }
 
     @Override
@@ -88,6 +90,7 @@ class HIDDeviceUSB implements HIDDevice {
         return result;
     }
 
+    @Override
     public UsbDevice getDevice() {
         return mDevice;
     }
@@ -104,19 +107,15 @@ class HIDDeviceUSB implements HIDDevice {
             return false;
         }
 
-        // Force claim all interfaces
-        for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
-            UsbInterface iface = mDevice.getInterface(i);
-
-            if (!mConnection.claimInterface(iface, true)) {
-                Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
-                close();
-                return false;
-            }
+        // Force claim our interface
+        UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
+        if (!mConnection.claimInterface(iface, true)) {
+            Log.w(TAG, "Failed to claim interfaces on USB device " + getDeviceName());
+            close();
+            return false;
         }
 
         // Find the endpoints
-        UsbInterface iface = mDevice.getInterface(mInterface);
         for (int j = 0; j < iface.getEndpointCount(); j++) {
             UsbEndpoint endpt = iface.getEndpoint(j);
             switch (endpt.getDirection()) {
@@ -166,7 +165,7 @@ class HIDDeviceUSB implements HIDDevice {
             UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_OUT,
             0x09/*HID set_report*/,
             (3/*HID feature*/ << 8) | report_number,
-            0,
+            mInterface,
             report, offset, length,
             1000/*timeout millis*/);
 
@@ -210,7 +209,7 @@ class HIDDeviceUSB implements HIDDevice {
             UsbConstants.USB_TYPE_CLASS | 0x01 /*RECIPIENT_INTERFACE*/ | UsbConstants.USB_DIR_IN,
             0x01/*HID get_report*/,
             (3/*HID feature*/ << 8) | report_number,
-            0,
+            mInterface,
             report, offset, length,
             1000/*timeout millis*/);
 
@@ -250,10 +249,8 @@ class HIDDeviceUSB implements HIDDevice {
             mInputThread = null;
         }
         if (mConnection != null) {
-            for (int i = 0; i < mDevice.getInterfaceCount(); i++) {
-                UsbInterface iface = mDevice.getInterface(i);
-                mConnection.releaseInterface(iface);
-            }
+            UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
+            mConnection.releaseInterface(iface);
             mConnection.close();
             mConnection = null;
         }

+ 93 - 22
love/src/jni/SDL2/android-project/app/src/main/java/org/libsdl/app/SDLActivity.java

@@ -321,6 +321,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
     protected void onPause() {
         Log.v(TAG, "onPause()");
         super.onPause();
+
+        if (mHIDDeviceManager != null) {
+            mHIDDeviceManager.setFrozen(true);
+        }
         if (!mHasMultiWindow) {
             pauseNativeThread();
         }
@@ -330,6 +334,10 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
     protected void onResume() {
         Log.v(TAG, "onResume()");
         super.onResume();
+
+        if (mHIDDeviceManager != null) {
+            mHIDDeviceManager.setFrozen(false);
+        }
         if (!mHasMultiWindow) {
             resumeNativeThread();
         }
@@ -475,7 +483,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         }
 
         // Default system back button behavior.
-        super.onBackPressed();
+        if (!isFinishing()) {
+            super.onBackPressed();
+        }
     }
 
     // Called by JNI from SDL.
@@ -488,7 +498,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         runOnUiThread(new Runnable() {
             @Override
             public void run() {
-                SDLActivity.this.superOnBackPressed();
+                if (!SDLActivity.this.isFinishing()) {
+                    SDLActivity.this.superOnBackPressed();
+                }
             }
         });
     }
@@ -748,7 +760,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
                 }
             }
 
-            if (bShouldWait) {
+            if (bShouldWait && (SDLActivity.getContext() != null)) {
                 // We'll wait for the surfaceChanged() method, which will notify us
                 // when called.  That way, we know our current size is really the
                 // size we need, instead of grabbing a size that's still got
@@ -801,6 +813,7 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
     public static native void nativeSetenv(String name, String value);
     public static native void onNativeOrientationChanged(int orientation);
     public static native void nativeAddTouch(int touchId, String name);
+    public static native void nativePermissionResult(int requestCode, boolean result);
 
     /**
      * This method is called by SDL using JNI.
@@ -835,39 +848,62 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
      */
     public void setOrientationBis(int w, int h, boolean resizable, String hint)
     {
-        int orientation = -1;
+        int orientation_landscape = -1;
+        int orientation_portrait = -1;
 
+        /* If set, hint "explicitly controls which UI orientations are allowed". */
         if (hint.contains("LandscapeRight") && hint.contains("LandscapeLeft")) {
-            orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
+            orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_SENSOR_LANDSCAPE;
         } else if (hint.contains("LandscapeRight")) {
-            orientation = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
+            orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE;
         } else if (hint.contains("LandscapeLeft")) {
-            orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
-        } else if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
-            orientation = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
+            orientation_landscape = ActivityInfo.SCREEN_ORIENTATION_REVERSE_LANDSCAPE;
+        }
+
+        if (hint.contains("Portrait") && hint.contains("PortraitUpsideDown")) {
+            orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_SENSOR_PORTRAIT;
         } else if (hint.contains("Portrait")) {
-            orientation = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
+            orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_PORTRAIT;
         } else if (hint.contains("PortraitUpsideDown")) {
-            orientation = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
+            orientation_portrait = ActivityInfo.SCREEN_ORIENTATION_REVERSE_PORTRAIT;
         }
 
-        /* no valid hint */
-        if (orientation == -1) {
+        boolean is_landscape_allowed = (orientation_landscape == -1 ? false : true);
+        boolean is_portrait_allowed = (orientation_portrait == -1 ? false : true);
+        int req = -1; /* Requested orientation */
+
+        /* No valid hint, nothing is explicitly allowed */
+        if (!is_portrait_allowed && !is_landscape_allowed) {
             if (resizable) {
-                /* no fixed orientation */
+                /* All orientations are allowed */
+                req = ActivityInfo.SCREEN_ORIENTATION_FULL_SENSOR;
             } else {
-                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);
     }
 
     /**
@@ -994,6 +1030,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.equals("X96-W")) {
             return true;
         }
+        if (Build.MANUFACTURER.equals("Amlogic") && Build.MODEL.startsWith("TV")) {
+            return true;
+        }
         return false;
     }
 
@@ -1003,6 +1042,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
     public static boolean isTablet() {
         DisplayMetrics metrics = new DisplayMetrics();
         Activity activity = (Activity)getContext();
+        if (activity == null) {
+            return false;
+        }
         activity.getWindowManager().getDefaultDisplay().getMetrics(metrics);
 
         double dWidthInches = metrics.widthPixels / (double)metrics.xdpi;
@@ -1018,6 +1060,9 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
      * This method is called by SDL using JNI.
      */
     public static boolean isChromebook() {
+        if (getContext() == null) {
+            return false;
+        }
         return getContext().getPackageManager().hasSystemFeature("org.chromium.arc.device_management");
     }
 
@@ -1589,6 +1634,32 @@ public class SDLActivity extends Activity implements View.OnSystemUiVisibilityCh
         }
         return true;
     }
+
+    /**
+     * This method is called by SDL using JNI.
+     */
+    public static void requestPermission(String permission, int requestCode) {
+        if (Build.VERSION.SDK_INT < 23) {
+            nativePermissionResult(requestCode, true);
+            return;
+        }
+
+        Activity activity = (Activity)getContext();
+        if (activity.checkSelfPermission(permission) != PackageManager.PERMISSION_GRANTED) {
+            activity.requestPermissions(new String[]{permission}, requestCode);
+        } else {
+            nativePermissionResult(requestCode, true);
+        }
+    }
+
+    @Override
+    public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
+        if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) {
+            nativePermissionResult(requestCode, true);
+        } else {
+            nativePermissionResult(requestCode, false);
+        }
+    }
 }
 
 /**
@@ -1615,7 +1686,7 @@ class SDLMain implements Runnable {
         Log.v("SDL", "Finished main function");
 
         if (!SDLActivity.mExitCalledFromJava) {
-            if (SDLActivity.mSingleton.isFinishing()) {
+            if (SDLActivity.mSingleton == null || SDLActivity.mSingleton.isFinishing()) {
                 // Activity is already being destroyed
             } else {
                 // Let's finish the Activity

+ 1 - 1
love/src/jni/SDL2/build-scripts/winrtbuild.ps1

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

+ 3 - 1
love/src/jni/SDL2/cmake/sdlchecks.cmake

@@ -757,8 +757,10 @@ macro(CheckOpenGLX11)
 endmacro()
 
 # Requires:
-# - nada
+# - PkgCheckModules
 macro(CheckOpenGLESX11)
+  pkg_check_modules(EGL egl)
+  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${EGL_CFLAGS}")
   if(VIDEO_OPENGLES)
     check_c_source_compiles("
         #define EGL_API_FB

+ 39 - 8
love/src/jni/SDL2/configure

@@ -1625,7 +1625,7 @@ Optional Features:
   --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=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
@@ -2817,9 +2817,9 @@ orig_CFLAGS="$CFLAGS"
 #
 SDL_MAJOR_VERSION=2
 SDL_MINOR_VERSION=0
-SDL_MICRO_VERSION=11
+SDL_MICRO_VERSION=12
 SDL_INTERFACE_AGE=0
-SDL_BINARY_AGE=11
+SDL_BINARY_AGE=12
 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
 
 
@@ -19417,7 +19417,7 @@ CheckNEON()
 if test "${enable_arm_neon+set}" = set; then :
   enableval=$enable_arm_neon; enable_arm_neon=$enableval
 else
-  enable_arm_neon=yes
+  enable_arm_neon=no
 fi
 
     if test x$enable_video = xyes -a x$enable_assembly = xyes -a x$enable_arm_neon = xyes; then
@@ -21487,6 +21487,9 @@ $as_echo "#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1" >>confdefs.h
                 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
 }
 
@@ -24332,6 +24335,7 @@ $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/SDL_hidapi.c"
 
             if test x$have_libusb_h = xyes; then
                 EXTRA_CFLAGS="$EXTRA_CFLAGS $LIBUSB_CFLAGS"
@@ -24343,7 +24347,6 @@ $as_echo "#define SDL_JOYSTICK_HIDAPI 1" >>confdefs.h
                         { $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
-                    SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
                     # libusb is loaded dynamically, so don't add it to LDFLAGS
                     libusb_lib=""
                     case "$host" in
@@ -24363,8 +24366,6 @@ cat >>confdefs.h <<_ACEOF
 _ACEOF
 
                 fi
-            else
-                SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
             fi
         fi
 
@@ -25108,6 +25109,14 @@ $as_echo "#define SDL_JOYSTICK_MFI 1" >>confdefs.h
         #    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
 
@@ -25347,6 +25356,27 @@ $as_echo "#define SDL_FILESYSTEM_EMSCRIPTEN 1" >>confdefs.h
         # 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
+        ;;
+    *-*-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"
@@ -25600,7 +25630,7 @@ $SDLTEST_DEPENDS
 $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"
 
@@ -26752,6 +26782,7 @@ do
     "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" ;;

+ 33 - 8
love/src/jni/SDL2/configure.ac

@@ -20,9 +20,9 @@ dnl Set various version strings - taken gratefully from the GTk sources
 #
 SDL_MAJOR_VERSION=2
 SDL_MINOR_VERSION=0
-SDL_MICRO_VERSION=11
+SDL_MICRO_VERSION=12
 SDL_INTERFACE_AGE=0
-SDL_BINARY_AGE=11
+SDL_BINARY_AGE=12
 SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
 
 AC_SUBST(SDL_MAJOR_VERSION)
@@ -1344,8 +1344,8 @@ 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=yes]]]),
-                  enable_arm_neon=$enableval, enable_arm_neon=yes)
+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
@@ -2035,6 +2035,9 @@ AS_HELP_STRING([--enable-video-x11-vm], [use X11 VM extension for fullscreen [[d
                 SUMMARY_video_x11="${SUMMARY_video_x11} xvidmode"
             fi
         fi
+    else
+        # Prevent Mesa from including X11 headers
+        EXTRA_CFLAGS="$EXTRA_CFLAGS -DMESA_EGL_NO_X11_HEADERS -DEGL_NO_X11"
     fi
 }
 
@@ -3326,7 +3329,6 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
                     if test x$have_loadso != xyes; then
                         AC_MSG_WARN([You must have SDL_LoadObject() support for dynamic libusb loading])
                     fi
-                    SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
                     # libusb is loaded dynamically, so don't add it to LDFLAGS
                     libusb_lib=""
                     case "$host" in
@@ -3342,8 +3344,6 @@ AS_HELP_STRING([--enable-hidapi], [use HIDAPI for low level joystick drivers [[d
                     fi
                     AC_DEFINE_UNQUOTED(SDL_LIBUSB_DYNAMIC, "$libusb_lib", [ ])
                 fi
-            else
-                SOURCES="$SOURCES $srcdir/src/hidapi/SDL_hidapi.c"
             fi
         fi
 
@@ -3859,6 +3859,12 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
         #    have_haptic=yes
         #    EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-framework,ForceFeedback"
         #fi
+        # Set up files for the sensor library
+        if test x$enable_sensor = xyes; then
+            AC_DEFINE(SDL_SENSOR_COREMOTION, 1, [ ])
+            SOURCES="$SOURCES $srcdir/src/sensor/coremotion/*.m"
+            have_sensor=yes
+        fi
         # Set up files for the power library
         if test x$enable_power = xyes; then
             AC_DEFINE(SDL_POWER_UIKIT, 1, [ ])
@@ -4053,6 +4059,25 @@ AS_HELP_STRING([--enable-render-d3d], [enable the Direct3D render driver [[defau
             SOURCES="$SOURCES $srcdir/src/filesystem/emscripten/*.c"
             have_filesystem=yes
         fi
+        # Set up files for the timer library
+        if test x$enable_timers = xyes; then
+            AC_DEFINE(SDL_TIMER_UNIX, 1, [ ])
+            SOURCES="$SOURCES $srcdir/src/timer/unix/*.c"
+            have_timers=yes
+        fi
+        ;;
+    *-*-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, [ ])
@@ -4271,7 +4296,7 @@ $WAYLAND_PROTOCOLS_DEPENDS
 __EOF__
 
 AC_CONFIG_FILES([
-    Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake SDL2.spec sdl2.pc
+    Makefile:Makefile.in:Makefile.rules sdl2-config sdl2-config.cmake sdl2-config-version.cmake SDL2.spec sdl2.pc
 ])
 AC_CONFIG_COMMANDS([sdl2_config],[chmod a+x sdl2-config])
 

+ 6 - 0
love/src/jni/SDL2/debian/changelog

@@ -1,3 +1,9 @@
+libsdl2 (2.0.12) UNRELEASED; urgency=low
+
+  * Updated SDL to version 2.0.12 for development builds
+
+ -- Sam Lantinga <[email protected]>  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

+ 6 - 6
love/src/jni/SDL2/debian/copyright

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

+ 1 - 0
love/src/jni/SDL2/debian/libsdl2-dev.install

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

+ 1 - 1
love/src/jni/SDL2/include/SDL.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_assert.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_atomic.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_audio.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_bits.h

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

+ 4 - 1
love/src/jni/SDL2/include/SDL_blendmode.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_clipboard.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config.h.cmake

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config.h.in

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_android.h

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

+ 2 - 2
love/src/jni/SDL2/include/SDL_config_iphoneos.h

@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -138,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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_macosx.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_minimal.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_os2.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_pandora.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_psp.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_windows.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_winrt.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_config_wiz.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_copying.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_cpuinfo.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_egl.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_endian.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_error.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_events.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_filesystem.h

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

+ 11 - 1
love/src/jni/SDL2/include/SDL_gamecontroller.h

@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -214,6 +214,11 @@ extern DECLSPEC SDL_GameController *SDLCALL SDL_GameControllerOpen(int joystick_
  */
 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
  */
@@ -231,6 +236,11 @@ extern DECLSPEC SDL_GameControllerType SDLCALL SDL_GameControllerGetType(SDL_Gam
  */
 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.

+ 1 - 1
love/src/jni/SDL2/include/SDL_gesture.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_haptic.h

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

+ 55 - 1
love/src/jni/SDL2/include/SDL_hints.h

@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -244,6 +244,17 @@ extern "C" {
  */
 #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 
  *
@@ -457,6 +468,24 @@ extern "C" {
  */
 #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.
  *
@@ -609,6 +638,17 @@ extern "C" {
  */
 #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
  *
@@ -1218,6 +1258,20 @@ extern "C" {
  */
 #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
  */

+ 12 - 2
love/src/jni/SDL2/include/SDL_joystick.h

@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -192,7 +192,12 @@ extern DECLSPEC SDL_Joystick *SDLCALL SDL_JoystickOpen(int device_index);
 /**
  * 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.
@@ -207,6 +212,11 @@ extern DECLSPEC const char *SDLCALL SDL_JoystickName(SDL_Joystick * joystick);
  */
 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
  */

+ 1 - 1
love/src/jni/SDL2/include/SDL_keyboard.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_keycode.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_loadso.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_log.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_main.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_messagebox.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_metal.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_mouse.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_mutex.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_name.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_opengl.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_opengles.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_opengles2.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_pixels.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_platform.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_power.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_quit.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_rect.h

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

+ 42 - 3
love/src/jni/SDL2/include/SDL_render.h

@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -85,6 +85,16 @@ typedef struct SDL_RendererInfo
     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.
  */
@@ -366,6 +376,35 @@ extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
 extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
                                                     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.
  *
@@ -579,8 +618,8 @@ extern DECLSPEC void SDLCALL SDL_RenderGetViewport(SDL_Renderer * renderer,
  *  \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
  *

+ 2 - 2
love/src/jni/SDL2/include/SDL_revision.h

@@ -1,2 +1,2 @@
-#define SDL_REVISION "hg-0:aaaaaaaaaaah"
-#define SDL_REVISION_NUMBER 0
+#define SDL_REVISION "hg-13609:34cc7d3b69d3"
+#define SDL_REVISION_NUMBER 13609

+ 1 - 1
love/src/jni/SDL2/include/SDL_rwops.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_scancode.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_sensor.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_shape.h

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

+ 3 - 1
love/src/jni/SDL2/include/SDL_stdinc.h

@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -408,6 +408,8 @@ extern DECLSPEC int SDLCALL SDL_abs(int x);
 
 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);
 

+ 1 - 1
love/src/jni/SDL2/include/SDL_surface.h

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

+ 41 - 4
love/src/jni/SDL2/include/SDL_system.h

@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -89,7 +89,7 @@ extern DECLSPEC int SDLCALL SDL_LinuxSetThreadPriority(Sint64 threadID, int prio
 #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 @@ extern DECLSPEC void SDLCALL SDL_iPhoneSetEventPump(SDL_bool enabled);
 
 
 /* Platform specific functions for Android */
-#if defined(__ANDROID__) && __ANDROID__
+#ifdef __ANDROID__
 
 /**
    \brief Get the JNI environment for the current thread
@@ -120,6 +120,32 @@ extern DECLSPEC void * SDLCALL SDL_AndroidGetJNIEnv(void);
  */
 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 @@ extern DECLSPEC const char * SDLCALL SDL_AndroidGetExternalStoragePath(void);
 #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_WinRT_DeviceFamily SDLCALL SDL_WinRTGetDeviceFamily();
  */
 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
 }

+ 1 - 1
love/src/jni/SDL2/include/SDL_syswm.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_assert.h

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

+ 14 - 1
love/src/jni/SDL2/include/SDL_test_common.h

@@ -1,6 +1,6 @@
 /*
   Simple DirectMedia Layer
-  Copyright (C) 1997-2019 Sam Lantinga <[email protected]>
+  Copyright (C) 1997-2020 Sam Lantinga <[email protected]>
 
   This software is provided 'as-is', without any express or implied
   warranty.  In no event will the authors be held liable for any damages
@@ -155,6 +155,19 @@ int SDLTest_CommonArg(SDLTest_CommonState * state, int index);
  */
 void SDLTest_CommonLogUsage(SDLTest_CommonState * state, const char *argv0, const char **options);
 
+/**
+ * \brief Returns common usage information
+ *
+ * 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);
+
 /**
  * \brief Open test window.
  *

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_compare.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_crc32.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_font.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_fuzzer.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_harness.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_images.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_log.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_md5.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_memory.h

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

+ 1 - 1
love/src/jni/SDL2/include/SDL_test_random.h

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

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