Commit graph

11207 commits

Author SHA1 Message Date
Sam Lantinga 3bdc62215e Fixed Apple build after d0bbfdbfb8 2022-12-01 15:11:29 -08:00
Sam Lantinga 423c558e44 Detect the G923 (Xbox style) and PXN V900 (PS3 mode) as wheels
(cherry picked from commit 7237c5649994d2b2c2b364c3b116a6db80ea671d)
2022-12-01 14:44:52 -08:00
Sam Lantinga 42238f88ea Fixed build after d0bbfdbfb8 2022-12-01 13:28:48 -08:00
Pierre Wendling d0bbfdbfb8 Clang-Tidy fixes (#6725)
(cherry picked from commit 3c501b963dd8f0605a6ce7978882df39ba76f9cd)
2022-12-01 13:08:50 -08:00
Sam Lantinga e29c0661cc Removed check for _HAVE_STDINT_H, which nobody defines
Fixes https://github.com/libsdl-org/SDL/issues/6619
2022-12-01 12:54:02 -08:00
Ozkan Sezer e57554ea65 SDL_main.h: added field to SDL_GDKSuspendComplete documentation. 2022-12-01 20:37:00 +03:00
Sylvain 09ee811f4b Small format changed (using clang-format 15.0.2-1)
(cherry picked from commit 778b8926b4808f0642a331ed84a9e8e19899b6db)
2022-12-01 08:29:15 -08:00
Ozkan Sezer b067ab9202 restore SDL_malloc.c original formatting.
(cherry picked from commit 45025799b75f544251f4a853e1c3f206243f0109)
2022-11-30 18:18:06 -08:00
Sam Lantinga 6e40c7a9b8 Added support for the Logitech Cordless Precision PS3 controller 2022-11-30 17:03:29 -08:00
Sam Lantinga 01541bc350 Added support for the HORIPAD Pro for Xbox Series X 2022-11-30 16:42:00 -08:00
Sam Lantinga 4504c10f3b Re-enabled support for third party PS3 controllers 2022-11-30 16:37:20 -08:00
Sam Lantinga 7b1000013e Reverted code formatting for Apple platforms
We didn't get the merge right, and rather than tease out exactly what happened, I'm just reverting for now.
2022-11-30 15:51:17 -08:00
Sam Lantinga 9e997cc787 Fixed Victrix FS Pro V2 controller hang on reboot 2022-11-30 15:39:10 -08:00
Sam Lantinga d87048fd5a Fixed crash if GetRectDisplayIndex() is called before SDL_VideoInit() 2022-11-30 14:37:34 -08:00
Sam Lantinga 6926d046c0 Fixed build after cherry-pick of 5750bcb174300011b91d1de20edb288fcca70f8c from SDL3 2022-11-30 13:05:57 -08:00
Sam Lantinga b8d85c6939 Update for SDL3 coding style (#6717)
I updated .clang-format and ran clang-format 14 over the src and test directories to standardize the code base.

In general I let clang-format have it's way, and added markup to prevent formatting of code that would break or be completely unreadable if formatted.

The script I ran for the src directory is added as build-scripts/clang-format-src.sh

This fixes:
#6592
#6593
#6594

(cherry picked from commit 5750bcb174300011b91d1de20edb288fcca70f8c)
2022-11-30 12:57:41 -08:00
Sam Lantinga 5c4bc807f7 Revert "SDL_test_md5.h: fix MD5UINT4 type to be really 32 bits."
This reverts commit 8eeca8c7db as it's potentially an ABI break.
2022-11-30 05:59:56 -08:00
Ozkan Sezer 8eeca8c7db SDL_test_md5.h: fix MD5UINT4 type to be really 32 bits.
(cherry picked from commit 8901297437ed9ced67e6029a1d525e8052275b7c)
2022-11-30 05:59:03 -08:00
David Edmundson d7664a6ef1 Support wayland fractional scale protocol
The new protocol adds support for more native communication of
fractional scaling.

Everything in the wayland backend already existed only our fractional
scale was calculated implicitly through a combination of output size
guesswork for fullscreen windows.

This new protocol makes that explicit, providing a more robust solution
and a solution for non-fullscreen surfaces. The fallback code is still
left in place for now whilst compositors gain support.
2022-11-29 16:37:02 -05:00
Anonymous Maarten 5df106603d cmake: move platform detection to cmake/sdl/paltform.cmake for re-use by SDL2-compat 2022-11-29 20:20:33 +01:00
Ryan C. Gordon 69f0223474
dynapi: Abstract out the environment variable name.
(cherry picked from commit cc487ffb801f862aec7e2b415e74c563c4d528d5)
2022-11-29 14:15:20 -05:00
pionere 724845110c video: fix error messages
- do not overwrite error message set by SDL_InitFormat (SDL_AllocFormat)
- set proper error message (Cocoa_Metal_CreateView)
- protect against allocation failure (UIKit_Metal_CreateView)

(cherry picked from commit cf0cb44df88a4293805fdc926880155d58a46bea)
2022-11-29 11:04:11 -08:00
Anonymous Maarten 84039e2514 cmake: use target_link_libraries to pass -Wl,--undefined=WinMain
(cherry-picked from commit e2060de714481ed58b6a2e781f7439090003a7b4)
2022-11-29 21:15:21 +03:00
Sam Lantinga 2d24baaad4 Fixed building on Windows with SDL_VIDEO=OFF
Fixes https://github.com/libsdl-org/SDL/issues/6562
2022-11-29 09:26:29 -08:00
Sam Lantinga b7cc4dce70 Fixed bug #6698 - VISA: wrong check sceKernelPollSema
(cherry picked from commit f077c691930f70a2e826eb40cbd0e35a7465a4af)
2022-11-29 08:51:23 -08:00
pionere 0b7a9a8e9f thread: code style
(cherry picked from commit 461a38ff1af1d749426c8e2c6f2a56e2b31c1a45)
2022-11-29 08:47:52 -08:00
Sylvain 8cda5102fc
Fixed bug #6698 - VISA: wrong check sceKernelPollSema 2022-11-29 16:16:10 +01:00
pionere ee13e8c76b
thread: return -1 from SDL_SemWaitTimeout if semaphore is NULL
(cherry picked from commit f6db1aba664079e63df44cbb6e6925a088b8f3a8)
2022-11-29 09:40:58 -05:00
pionere fcd7d658dc
thread: fix inconsistent return values
- SDL_CreateMutex returns NULL when the creation fails (ngage)
- SDL_SemValue returns 0 when the semaphore is NULL (n3ds)

(cherry picked from commit 6875e1c262ae968a4fb52b367cf6912d9c76d4c9)
2022-11-29 09:28:33 -05:00
Sam Lantinga 89e9f7b42b Added support for the Xbox Elite controller paddles with firmware version 5.13+ 2022-11-28 23:10:02 -08:00
Vasily Khoruzhick b6c875a923 Add support for the 8BitDo Ultimate Wireless 2.4GHz Controller in DirectInput mode
Generated using controller map
2022-11-28 17:48:03 -08:00
Samuel Venable a65d1bfb14 Fix broken solaris build. (missing brace).
missing brace.
2022-11-28 15:51:28 -08:00
Sam Lantinga 37d244ea81 Added support for the 8BitDo Ultimate Wired Controller in DirectInput mode, including the misc button and paddles 2022-11-28 14:49:07 -08:00
Sam Lantinga a937b5c4ad Add 8BitDo to the list of Xbox 360 third party vendors
Allows detection of the 8BitDo Ultimate Wired Controller
2022-11-28 13:47:30 -08:00
Sylvain Becker fb0ce375f0 Cleanup add brace (#6545)
* Add braces after if conditions

* More add braces after if conditions

* Add braces after while() conditions

* Fix compilation because of macro being modified

* Add braces to for loop

* Add braces after if/goto

* Move comments up

* Remove extra () in the 'return ...;' statements

* More remove extra () in the 'return ...;' statements

* More remove extra () in the 'return ...;' statements after merge

* Fix inconsistent patterns are xxx == NULL vs !xxx

* More "{}" for "if() break;"  and "if() continue;"

* More "{}" after if() short statement

* More "{}" after "if () return;" statement

* More fix inconsistent patterns are xxx == NULL vs !xxx

* Revert some modificaion on SDL_RLEaccel.c

* SDL_RLEaccel: no short statement

* Cleanup 'if' where the bracket is in a new line

* Cleanup 'while' where the bracket is in a new line

* Cleanup 'for' where the bracket is in a new line

* Cleanup 'else' where the bracket is in a new line

(cherry picked from commit 6a2200823c66e53bd3cda4a25f0206b834392652 to reduce conflicts merging between SDL2 and SDL3)
2022-11-28 12:33:03 -08:00
Samuel Venable 0739d237ad
[skip ci] Solaris getexecname() returns argv[0]
`argv[0]`/`getexexname()` are not always absolute paths by default and can be modified to anything the developer wants them to be.

Consider using `readSymLink("/proc/self/path/a.out")` instead and `getexecname()` as the fallback, since the symlink will always be the correct absolute path (unless /proc is ot mounted, but it is by default on Solaris and Illumos platforms).

(cherry picked from commit 4f5e9fd5bda0d58c2907f75fa4ea0c92c3a2525f)
2022-11-27 21:38:01 -05:00
Markus Mittendrein 8145212103 SDL_ResampleAudio: Fix float accumulation error
While 78f97108f9 reduced the accumulation error, it was still big enough to cause distortions.
Fixes #6196.
2022-11-27 21:06:52 -05:00
Joshua Root 2df39e64ab Fix build with Xcode < 7
The _Nullable attribute is not available in older versions.

(cherry picked from commit 9a64aa6f95298bf459f8b9dca583df7064956cd9)
2022-11-26 20:36:54 -08:00
Sam Lantinga 8fddf146bf Temporary hack to address performance issues in https://github.com/libsdl-org/SDL/issues/6581#issuecomment-1327987916 (thanks @icculus!)
(cherry picked from commit 9c8369e097b229997875c0aeb4dc9cfdcde0e2b2)
2022-11-26 13:11:26 -08:00
Ryan C. Gordon 3f5593d613 cocoa: Patched to compile on macOS SDK < 10.10.
Fixes #6586.

(cherry picked from commit fa5adcafd52303fde86c64094462303404259d75)
2022-11-26 13:59:44 -05:00
Anonymous Maarten dcd1252368 cmake: test for lsx and lasx intrinsics for loongarch 2022-11-25 21:50:43 +01:00
Anonymous Maarten edb75bc29e cmake: make all assembly options depend on SDL_ASSEMBLY and architecture 2022-11-25 21:50:25 +01:00
Anonymous Maarten 660cec69b1 cmake: find libudev library so it gets priority 2022-11-25 21:37:42 +01:00
Anonymous Maarten a2611edcf3 cmake: add support for some BSD's wscons input 2022-11-25 21:37:36 +01:00
Michael Fitzmayer e19c532ebf Add bitdraw.h, remove non-working stub class
(cherry picked from commit 67f31a19a8eb06ee80bccb9ec8cc8c34aa635b3d)
2022-11-24 13:13:08 -08:00
Anonymous Maarten e426617c9c cmake: add X11 include dir to check dirs 2022-11-24 21:00:26 +01:00
Sylvain Becker 192cdf3d04 SDL_mfijoystick.m: remove VLA, so that projects can be built with error on vla 2022-11-24 18:33:50 +03:00
Ozkan Sezer 64a5e7be98 added missing FGREP to Makefile.in. fixed syntax. regenerated configure. 2022-11-24 17:00:20 +03:00
Frank Praznik 66bd15555c wayland: Fix build when not using the shared Wayland libraries
Explicitly include the Wayland protocol headers when statically linking against the Wayland libraries or older system headers might be used instead of the local versions.

(cherry picked from commit 836eb224428aca3bdab2a6bf56d347262e475b15)
2022-11-24 03:01:42 -08:00
Sam James 4c7156c1e6 Avoid use of deprecated egrep/fgrep
GNU grep 3.8 emits a deprecation warning on use of egrep/fgrep.

Signed-off-by: Sam James <sam@gentoo.org>
(cherry picked from commit 3e7952ce8a0affd325c802755cae5fd843b86d99)
2022-11-24 02:59:41 -08:00