Commit Graph

10279 Commits (0ffaf5b871c8cfd895368538eb2e59a122aa89ba)

Author SHA1 Message Date
erik yuzwa 7f1b833373 initial work 2021-02-15 08:35:13 -08:00
Ozkan Sezer a2fbc452ca replace i386 checks with __i386__ 2021-02-15 03:02:32 +03:00
Cacodemon345 cf15faae68 Change "memset" to "SDL_zero" 2021-02-14 13:54:08 -05:00
Cacodemon345 c5f9e061b5 Disable FreeBSD console mouse when initializing evdev input
Enable it again after quitting evdev input.
2021-02-14 13:54:08 -05:00
Alex Szpakowski d4d32833f4 macOS: Fix Xcode project when deployment target is > 10.7
SDL_mfijoystick.m requires ARC, but the Xcode project's macOS targets weren't compiling the file with ARC enabled.
2021-02-14 13:51:34 -05:00
Ozkan Sezer b34d92bf37 further .gitignore updates 2021-02-14 11:56:40 +03:00
Ozkan Sezer 0d92507d71 regenerated configure 2021-02-14 11:55:50 +03:00
Ozkan Sezer 2faa478325 further .gitignore updates 2021-02-14 11:55:24 +03:00
Ryan C. Gordon a6388cf2ca
Add the usual "vi" comment to the end of pre-push-hook. 2021-02-13 23:02:26 -05:00
Misa 3da58b47f6 Fix errors with fallback impls of SDL_isxdigit() and SDL_ispunct()
SDL_isxdigit() should only accept A-Fa-f, not A-Za-z (it shouldn't use
SDL_isalpha()).

SDL_ispunct() shouldn't accept spaces (it should use SDL_isgraph()
instead).
2021-02-13 19:30:24 -05:00
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