Commit Graph

6919 Commits (67e8522d31b875874ffd24086678ee6c861ff91c)

Author SHA1 Message Date
Joshua Saxby fe6f62e6ce Add ALIAS targets to all installed SDL2 targets
This provides a linking interface that matches the one available when `find_package()` is used, by aliasing all of SDL's public targets into the SDL2:: namespace. Thus, dependees link to the same-named targets regardless of how SDL was acquired.
This approach permits the use of wrappers around CMake's FetchContent API such as https://github.com/cpm-cmake/CPM.cmake
2021-02-13 11:43:35 -08:00
Misa dfe219ec71 Add all missing "is characteristic" stdlib functions
SDL has been missing a bunch of these 'isX' functions for some time,
where X is some characteristic of a given character.

This commit adds the rest of them to the SDL stdlib, so now we have:
- SDL_isalpha()
- SDL_isalnum()
- SDL_isblank()
- SDL_iscntrl()
- SDL_isxdigit()
- SDL_ispunct()
- SDL_isprint()
- SDL_isgraph()
2021-02-13 11:42:13 -08:00
Cacodemon345 88f1c2c1b0 Replace "echo -en" with "printf" in autoconf script
Fixes summary output on FreeBSD.
2021-02-13 11:41:42 -08:00
Ozkan Sezer 67a9d6ba98 updates to .gitignore 2021-02-13 20:50:24 +03:00
erik yuzwa 3937eefcfb a draft for a pull_request template 2021-02-13 11:58:09 -05:00
Charlie Birks 1a48ca666f emscripten: Create directory recursively in GetPrefPath 2021-02-13 11:56:01 -05:00
Stephan Vedder fa367cdd5c emscripten: Fix alt key being a nav key 2021-02-13 11:56:01 -05:00
Alon Zakai 20be1d634b emscripten: Automatically resume audio contexts
This uses the mechanism added in emscripten-core/emscripten#10843
which was applied to SDL1 and OpenAL. This adds the same for SDL2.

This also reverts commit 865eaddffed50dbd13e6564c3f73902472cf74e8
which did something similar, but the new mechanism is more effective.
2021-02-13 11:56:01 -05:00
Charlie Birks edaf3f9c9c emscripten: Extend the "nav key" blacklist
Add the F keys and Ctrl/Alt+*. Consistent with other naviagtion
disabling. Also, none of these generate keypress events anyway.
2021-02-13 11:56:01 -05:00
Erik Yuzwa 82a96afa70
Update wiki.libsdl.org urls to libsdl-org/SDL/wiki (#4069) 2021-02-13 11:49:31 -05:00
erik yuzwa 5cbe62eac0 ignore vs2019 meta folder 2021-02-13 14:27:20 +03:00
Cameron Cawley 9f71a809e9 Rename .hgignore to .gitignore 2021-02-13 02:41:49 +03:00
Ethan Lee a99eec7751 wayland: Minor whitespace fix 2021-02-13 02:41:29 +03:00
Ryan C. Gordon 0e9fd0f8bb Added a script that can be used to show commit URLs during a `git push`.
Just symlink/copy it to .git/hooks/pre-push and make sure it's executable!
2021-02-12 17:12:56 -05:00
Ryan C. Gordon 65fbf36c9e Cleaned up a few more Bugzilla mentions. 2021-02-12 14:46:49 -05:00
Ryan C. Gordon 60a99b0b59 BUGS.txt now points to GitHub Issues instead of bugzilla.libsdl.org. 2021-02-12 14:41:11 -05:00
Ryan C. Gordon 4ff51d29c3 Deprecate SDL_GetRevisionNumber and update things for git instead of hg.
Fixes #4063
2021-02-12 14:31:38 -05:00
Sam Lantinga ee25a1e6e2 The revision defaults to the empty string 2021-02-12 08:54:08 -08:00
Sam Lantinga 9deffcd325 Updated the revision header with git revision 2021-02-12 08:50:16 -08:00
soredake 39153f81b9 add Linux mapping for Ipega PG-9087S, closes #3783 2021-02-12 08:00:41 -08:00
Jay Petacat f443a6fc7a Fix format string warnings for width-based integers
The DJGPP compiler emits many warnings for conflicts between print
format specifiers and argument types. To fix the warnings, I added
`SDL_PRIx32` macros for use with `Sint32` and `Uint32` types. The macros
alias those found in <inttypes.h> or fallback to a reasonable default.

As an alternative, print arguments could be cast to plain old integers.
I opted slightly for the current solution as it felt more technically correct,
despite making the format strings more verbose.
2021-02-11 19:41:41 -08:00
Sam Lantinga 5427f4861b Added support for trigger rumble for all Microsoft Xbox One controllers 2021-02-11 17:28:07 -08:00
Sam Lantinga 1f7ec3fa4e Added support for the PowerA Xbox One Series X Wired Controller 2021-02-11 17:27:22 -08:00
Ryan C. Gordon f9046b4cab We're in Git now! Updated docs. 2021-02-11 14:39:08 -08:00
Ethan Lee cad67082f3 wayland: Check for both _WAYLAND_CLIENT_H and WAYLAND_CLIENT_H 2021-02-11 14:27:08 -08:00
Vladislav Dmitrievich Turbanov 31e8a4627a * Fixed closing the test window. 2021-02-11 14:20:01 -08:00
Sam Lantinga ef52560a24 Fixed bug 5539 - Clang 11 fails to compile a CMake build with conflicting types for _m_prefetchw
vladius

In SDL_cpuinfo.h it seems like <intrin.h> is not included when __clang__ is defined, as the comment in the file explicitly reads:
"Many of the intrinsics SDL uses are not implemented by clang with Visual Studio"

However, the SDL_endian.h header does include <intrin.h> without any precautions like:
>#ifdef _MSC_VER
>#include <intrin.h>
>#endif

Maybe it should be changed to something like:
>#ifdef _MSC_VER
>#ifndef __clang__
>#include <intrin.h>
>#endif
>#endif
2021-02-10 10:22:20 -05:00
Sam Lantinga 629334f283 Fixed bug 5543 - Wayland: Fix waylandvideo.h warnings
wahil1976

This patch fixes the warnings seen when compiling the Wayland backend. This will also be required in the future to avoid issues with compilation.
2021-02-10 10:22:20 -05:00
Cameron Gutman f70e197363 Fix waiting on condition variables with the SRW lock implmentation
When SleepConditionVariableSRW() releases the SRW lock internally, it causes
our SDL_mutex_srw state to become inconsistent. The lock is unowned yet inside,
the owner is still the sleeping thread and more importantly the owner count is
still 1.

The next time someone acquires the lock, they will bump the owner count from 1
to 2. At that point, the lock is hosed. From the internal lock state, it looks
to us like that owner has acquired the lock recursively, even though they have
not. When they call SDL_UnlockMutex(), it will see the owner count > 0 and not
call ReleaseSRWLockExclusive().

Now when someone calls SDL_CondSignal(), SleepConditionVariableSRW() will start
the wakeup process by attempting to re-acquire the SRW lock. This will deadlock
because the lock was never released after the other thread had used it. The
thread waiting on the condition variable will never be able to wake up, even if
the SDL_CondWaitTimeout() function is used and the timeout expires.
2021-02-10 10:22:20 -05:00
Sam Lantinga d9ba20442e Backed out changeset 852a7bdbdf4b
This causes a use-after-free memory error
2021-02-10 10:22:20 -05:00
Christian Rauch 4183211a54 free the 'display' after it was added to global list 2021-02-10 10:22:20 -05:00
Manuel Alfayate Corchete 005e2c59a7 [KMS/DRM] Bugfix number #5535: Improve reliability, by wahil1976. 2021-02-10 10:22:20 -05:00
Christian Rauch 2170c7bfde make AddressSanitizer optional and disabled by default 2021-02-10 10:22:20 -05:00
Christian Rauch 5045d299a6 enable AddressSanitizer only for GCC 5 onwards (bug #5533) 2021-02-10 10:22:20 -05:00
Christian Rauch 066960c207 add '-shared-libasan' to debug flags (bug #5533) 2021-02-10 10:22:20 -05:00
Ozkan Sezer dc45a228b9 avoid some pedantic warnings in array initializers 2021-02-10 10:22:20 -05:00
Sam Lantinga 9c3aa7f055 SDL: fix packet handling for original version of Stadia FW 2021-02-10 10:22:20 -05:00
Ozkan Sezer bb9e049d1d minor updates to libc function checks 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 19fa85d8af [KMS/DRM] Fix build warning. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 6ee53258cd [KMS/DRM] Replace indent tabs with spaces, as intended. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 59cd46c24a [KMS/DRM] Merge patch for bug #5532: No need to correct cursor position now that all windows are fullscreen. Link: https://bugzilla.libsdl.org/show_bug.cgi?id=5519. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 538f7ad6b7 [KMS/DRM] Remove redundant SDL_SendWindowEvent() call. 2021-02-10 10:22:19 -05:00
Manuel Alfayate Corchete 7beba05013 [KMS/DRM] Restore all-windows-are-fullscreen functionality, since there is no window manager in KMSDRM. 2021-02-10 10:22:19 -05:00
Cameron Gutman f4d58689e0 Fix Xbox Series X controller on macOS
There were two different implementations of IsBluetoothXboxOneController(), one
in SDL_hidapi_xbox360.c and one in SDL_hidapi_xboxone.c. The latter had been
updated to include USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH while the former had
not.

This mismatch led to the Xbox Series X failing on macOS only. We have special
code for handling the 360Controller driver for macOS which requires us to use
the Xbox 360 driver for wired Xbox One controllers, and the SDL_hidapi_xbox360
version of IsBluetoothXboxOneController() was used to determine which devices
were wired.

In addition to adding the missing USB_PRODUCT_XBOX_ONE_SERIES_X_BLUETOOTH, this
change moves IsBluetoothXboxOneController() into a single shared function which
will ensure this bug won't happen again.
2021-02-10 10:22:19 -05:00
Sam Lantinga 525196dd8b Updated runtime dependency on libudev 2021-02-10 10:22:19 -05:00
Sam Lantinga ff297753db Fixed compiler warning 2021-02-10 10:22:19 -05:00
Sam Lantinga a60af1e4d0 Backed out changeset 1cde3dd0f44d - this breaks windows which are created and then set to FULLSCREEN_DESKTOP 2021-02-10 10:22:19 -05:00
Sylvain Becker d74779b748 Android: documention update 2021-02-10 10:22:19 -05:00
Sam Lantinga e404b525f1 KMSDRM doesn't have a window manager, so all windows are fullscreen 2021-02-10 10:22:19 -05:00
Sylvain Becker 549bc13362 SDL_vulkan_utils: minor code clean-up 2021-02-10 10:22:19 -05:00