Commit Graph

6654 Commits (d0b87fede62f2b16bd80eaa76f7ae7924330914a)

Author SHA1 Message Date
Ozkan Sezer a6c6e5f582 configure.ac: fix POSIX conformance issues (bug #4261.)
Patch from Matt Whitlock:
There are actually two distinct classes of problems at play here.
On the one hand, libsdl2's configure.ac has some POSIX conformance
issues - namely, the use of 'echo -n' and the passage of arguments
containing embedded backslashes to 'echo', neither of which is
defined by POSIX. The attached patch takes care of these issues.
2020-12-27 14:00:02 +03:00
Ozkan Sezer 9f6fddb40f CMake: don't check for --no-undefined linker flag for OpenBSD (bug #5174)
it now matches autotools.
2020-12-27 05:20:10 +03:00
Manuel Alfayate Corchete 46d31d570d [KMS/DRM][Vulkan] Fix segfault when changing fullscren mode and permanent cursor when changing between Vulkan and GL renderers in vkQuake3. Tidy up window destruction code. 2020-12-27 00:43:06 +01:00
Joel Linn e7c479414b Disable WaitOnAddress SDL_sem implementation on Windows Phone
Apps that use the required APIs do not pass certification.
2020-12-25 17:10:02 +03:00
Joel Linn 5b64fdc9bf thread/windows: Remove synchronization.lib from WinPhone81 dependencies
synch APIs are implicitly available on this platform.
2020-12-25 10:41:20 +03:00
Joel Linn d6afc1c608 thread/windows: Statically link synchronization APIs on WINRT
GetModuleHandleW is not available on those platforms
---
 .../WinPhone81_VS2013/SDL-WinPhone81.vcxproj         |  8 ++++----
 VisualC-WinRT/WinRT81_VS2013/SDL-WinRT81.vcxproj     | 12 ++++++------
 src/thread/windows/SDL_sysmutex.c                    | 12 ++++++++++++
 src/thread/windows/SDL_syssem.c                      | 11 +++++++++++
 4 files changed, 33 insertions(+), 10 deletions(-)
2020-12-25 04:00:20 +03:00
Sam Lantinga ff913a22f4 Fixed compile warnings on platforms without hidapi support 2020-12-23 16:16:55 -08:00
Sam Lantinga 047b20e3b6 Fixed compile warnings on platforms without hidapi support 2020-12-23 16:11:16 -08:00
Sam Lantinga 9838611a8b Fixed compiler crash building for iOS with clang 11.0.3 2020-12-23 15:52:12 -08:00
Ozkan Sezer 2b760c3697 attempt to fix emscripten-buildbot: s/wasm/wasm32/ 2020-12-24 01:55:00 +03:00
Ozkan Sezer b9eb43a5c6 build-scripts: update install-sh and mkinstalldirs from automake-1.16.3 2020-12-24 01:32:10 +03:00
Ozkan Sezer 3c4103b87d fix config.guess permissions 2020-12-24 01:20:00 +03:00
Sam Lantinga fd3cb20b0f Fixed bug 5411 - config.guess and config.sub outdated
Ozkan Sezer

Our config.guess and config.sub are rather outdated.
Attached new versions of them here.

However, build-scripts/config.sub.patch do not apply
to these new versions: I don't know if and where that
patch is still needed.
2020-12-23 14:09:01 -08:00
Ozkan Sezer 5ed3d21f6e testsem.c: fix -Wmissing-braces warnings. 2020-12-24 00:55:30 +03:00
Sylvain Becker 4aebad77bd SDL_SoftStretchLowerLinear: try to make xcode buildbot compile (Bug 5313) 2020-12-23 22:50:50 +01:00
Sam Lantinga 93ccdee8c1 Fixed bug 5404 - stdlib: Added SDL_round, SDL_roundf, SDL_lround and SDL_lroundf
Cameron Cawley

stdlib: Added SDL_round, SDL_roundf, SDL_lround and SDL_lroundf

The default implementation is based on the one used in the Windows RT video driver.
2020-12-23 13:47:49 -08:00
Joel Linn d0b8295c0d Add SDL_sem implementation using Atomics and WaitOnAddress API.
Keep Semaphore Kernel Object impl for Windows 7 and older - choose at runtime

v2: - Fix mixed int/LONG types
    - Reorder definitions
    - Add missing include

v3: - Use `GetModuleHandle()` to load the API Set
2020-12-23 13:36:46 -08:00
Joel Linn 2b040cebbe Atomic test: Fix use after free
SDL_SemPost() was called by the FIFO threads after the semaphore was
freed because the main thread actually synchronized on the
`writerRunning`/`readersRunning` count and not the semaphores itself.
2020-12-23 13:36:23 -08:00
Joel Linn 6267b95177 Semaphore test: Add overhead tests. 2020-12-23 13:36:02 -08:00
Joel Linn 95a6d4e848 Semaphore test: Put test into separate function. 2020-12-23 13:35:35 -08:00
Joel Linn 548cb90893 Add SDL_mutex implementation using Windows Slim Reader/Writer Locks Keep Critical Section impl for Windows XP/Vista - choose at runtime
v2: - Add SRW definitions as suggested by Ozkan Sezer
      Allows building against older platform headers.
    - Rename "hidden" function parameter `mutex_` to `_mutex`

v3: - Use GetModuleHandle instead of LoadLibrary
    - Fix typo in comment
2020-12-23 13:33:36 -08:00
Ozkan Sezer 090fffac6a test/Makefile.os2: add warning switches to CFLAGS. 2020-12-24 00:29:40 +03:00
Ozkan Sezer 239c8f1f4c testvulkan.c: fix -Wmissing-braces warnings. also fix whitespace. 2020-12-24 00:28:50 +03:00
Ozkan Sezer 20ca1192d2 testgesture.c: comment out unused drawLine() 2020-12-24 00:26:32 +03:00
Ozkan Sezer b064028c2d testatomic.c: fix warnings due to SDL_AtomicDecRef() use 2020-12-24 00:25:40 +03:00
Sylvain Becker 8e20376f1a SDL_SoftStretchLinear: use SDL_INLINE (bug 5313) 2020-12-23 22:09:01 +01:00
Sylvain Becker 7b8d5b7dc3 SDL_SoftStretchLinear: fix implicit conversion (bug 5313) 2020-12-23 22:02:28 +01:00
Ozkan Sezer 15fea33915 ran gendynapi.pl after addition of SDL_SoftStretchLinear 2020-12-23 23:47:10 +03:00
Sylvain Becker ae8a270f61 Add SDL_SoftStretchLowerLinear() (Bug 5313) 2020-12-23 21:37:40 +01:00
Sylvain Becker 050ee9a410 Split SDL_SoftStretch in Lower and Uppler functions (Bug 5313) 2020-12-23 21:32:01 +01:00
Manuel Alfayate Corchete 09fcc9ed17 [KMS/DRM][Vulkan] Fix small warning, thanks to Ozkan Sezer for spotting it. 2020-12-23 16:45:23 +01:00
Manuel Alfayate Corchete a6dc838d52 [KMS/DRM][Vulkan] Only try to create a display mode when no suitable mode is found. 2020-12-23 16:22:46 +01:00
Sam Lantinga 0ed4d92938 Fixed setting player LEDs for PS5 controllers over Bluetooth 2020-12-23 04:53:23 -08:00
Sam Lantinga 6341bb35a5 Fixed controller disconnect detection for PS4 and PS5 controllers over Bluetooth 2020-12-22 21:51:59 -08:00
Sam Lantinga a30adae567 Make it possible to turn on PS4 rumble effects at runtime using the hint 2020-12-22 20:58:32 -08:00
Sam Lantinga 390b2cf0d3 Enable PS5 enhanced functionality for testgamecontroller 2020-12-22 20:53:27 -08:00
Sam Lantinga c93947a2cb Make it possible to turn on PS5 rumble effects at runtime using the hint 2020-12-22 20:12:03 -08:00
Sam Lantinga 058a0ab47f Set the pad lights on the PS5 controller corresponding to the player index
Also allow setting the player index from testgamecontroller using the number keys
2020-12-22 14:38:32 -08:00
Sam Lantinga 6a57072eef Only add the touchpad and sensors to the PS5 controller if effects are enabled 2020-12-22 14:10:08 -08:00
Sam Lantinga 4ec776c334 Don't switch the PS5 controller out of DirectInput mode by default 2020-12-22 13:29:23 -08:00
Ozkan Sezer b4b674dabb CMakeLists.txt: sync DYLIB_CURRENT_VERSION to Xcode project 2020-12-22 22:10:50 +03:00
Sam Lantinga 350f1b0d16 Updated SDL to version 2.0.15 for development 2020-12-22 10:36:15 -08:00
Manuel Alfayate Corchete 13244de5c2 [Buildsystem] Only build KMSDRM support if EGL+OpenGL is detected by CMake. 2020-12-22 17:17:30 +01:00
Ozkan Sezer a19c008a7f use GetModuleHandleW() to retrieve kernel32.dll handle (bug #5390.)
SDL_systhread.c and SDL_syslocale.c used to call LoadLibrary() without
calling FreeLibrary() later.  GetModuleHandleW() should always succeed
because GetModuleHandleW() itself is imported from kernel32.dll and we
don't need to bother releasing it.
2020-12-22 17:10:02 +03:00
Ozkan Sezer 9f655fe522 regenerated configure 2020-12-22 17:03:20 +03:00
Ozkan Sezer 5ad5645757 acinclude/pkg.m4: update from mainstream pkgconfig tree. 2020-12-22 17:01:50 +03:00
Ozkan Sezer 86191351c0 acinclude & sdl2.m4 updates:
- acinclude/alsa.m4, esd.m4: Ran through autoupdate to replace several
  AC_TRY_[COMPILE|LINK|RUN] with corresponding AC_???_IFELSE , so that
  autoconf-2.70 doesn't warn.
- sdl2.m4: Ditto.
- test/acinclude.m4 (sdl2): Ditto.
2020-12-22 17:00:28 +03:00
Ozkan Sezer f117db5186 sdl2.m4 updates:
- remove HP/UX 9 (%@#!) support
- change fopen() mode from "a" to "w" in test code.
- bump its serial num to 2.
- test/acinclude.m4: same sdl2.m4 updates.
2020-12-22 17:00:11 +03:00
Ozkan Sezer 087de97b56 acinclude/esd.m4: update from mainstream esound tree,
- revise for better compatibility with new autoconf,
- remove HP/UX 9 (%@#!) support from it,
- replace system("touch conf.esdtest") with fopen/fclose in the
  test code (see, e.g. glib-2.0.m4 -- sdl.m4 does the same.)
2020-12-22 17:00:00 +03:00
Ozkan Sezer 15abab9cf8 regenerated configure 2020-12-22 16:25:00 +03:00