|
8ab3ae98
|
2022-05-10T09:44:23
|
|
stdinc: Add a comment to clarify why inline functions are needed here
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
f7280dce
|
2022-05-10T14:52:14
|
|
log: Check for integer overflow.
|
|
d35c737f
|
2022-05-07T21:38:48
|
|
macOS: change min supported OS from 10.6 to 10.7.
|
|
ec8fa577
|
2022-05-07T21:57:23
|
|
macOS: always use Objective-C ARC (automatic ref counting).
Change Cocoa SDL_VideoData and SDL_WindowData implementations from C structs to Objective-C objects, since bridging between C and ObjC is easier that way.
|
|
6422a5d2
|
2022-05-10T07:33:32
|
|
updated config.guess and config.sub from mainstream
|
|
d15f6e37
|
2022-05-09T18:19:21
|
|
test: Add a unit test for overflow detection
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
f661654f
|
2022-05-09T14:36:27
|
|
stdinc: Add overflow-checking add and multiply for size_t
This can be used to check whether untrusted sizes would cause overflow
when used to calculate how much memory is needed.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
2a794801
|
2022-05-09T14:58:51
|
|
cpuinfo: Check for overflow in SIMD allocation
If the size to be allocated is very large and untrusted, then adding
the padding etc. might be enough to cause unsigned overflow, after
which a very small amount of memory will be allocated.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
cf1daafa
|
2022-05-09T18:48:46
|
|
cpuinfo: Set padding to 0 if none is needed
It'll be simpler to use overflow detection after this refactor.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
6e6e425e
|
2022-05-05T17:50:28
|
|
workflows: Do the equivalent of Automake `make distcheck`
The official source code release isn't much use unless it contains
everything that users and downstream distributions need to do a
new build, so check that it does.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
c71ee68b
|
2022-05-08T17:17:49
|
|
Fix enabling tests on platforms without testnative support
|
|
318b5577
|
2022-05-08T20:59:10
|
|
Delete gcc-fat.sh
|
|
9ef68857
|
2022-05-08T15:53:43
|
|
Fix MSVC ARM32 builds
|
|
b352b783
|
2022-05-07T14:57:17
|
|
Add 'static VCRT' cases to MSVC build matrix
|
|
0e63b514
|
2022-05-07T14:52:35
|
|
Don't define memcpy(), memset() when using static VC runtime.
The linker will complain about duplicated symbols otherwise
(see #3662, #5156).
|
|
8cd908e0
|
2022-05-06T10:51:55
|
|
Fixed building with Visual Studio 2013
Added SDL_vacopy.h since it needs to be included after Windows headers
|
|
a3c1ca1f
|
2022-05-06T09:07:36
|
|
Added support for the Backbone One guide button
The guide button is activated on a long press (> 400ms)
|
|
95f9c3cf
|
2022-05-06T18:56:24
|
|
Makefile.os2: add SDL_BUILD_???_VERSION defines to correct CFLAGS.
|
|
0c196021
|
2022-05-06T07:59:36
|
|
Applied 0004-Define-crt-macros.patch.txt from vcpkg ports
|
|
fa505970
|
2022-05-05T11:54:00
|
|
Simplified autogen.sh, thanks to @smcv for the tip
|
|
db36664f
|
2022-05-05T18:55:02
|
|
configure.ac: remove unnecessary AC_SUBST's added by commit 38ef6789909c
|
|
f0c870b9
|
2022-05-05T08:19:10
|
|
Rebuilt configure from configure.ac changes
|
|
b03e08f3
|
2022-05-05T16:06:11
|
|
configure.ac: Use Autoconf quadrigraphs for character set in AS_CASE
The use of square brackets for a character set collides with the use
of square brackets for m4 quote characters, so use the other quoting
mechanism that Autoconf provides, by escaping `[` as `@<:@` and so on.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
b299f74d
|
2022-05-04T15:34:41
|
|
test: Make testevdev succeed if the feature is disabled
"Not applicable" is more like success than it is like failure.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
6fc7aa28
|
2022-05-04T13:15:12
|
|
cmake: Add some missing test-cases
These were built by Autotools but not by CMake.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
c244bbc5
|
2022-05-04T17:50:44
|
|
workflows: Install and run GNOME-style installed-tests
This is currently only done for the Linux Autotools build. The CMake
build does not add a significant amount of extra test coverage, and
Github Workflows run in an environment where `cmake` and `sudo cmake`
point to different executables, which makes it awkward to install into
/usr/local from CMake.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
ce502054
|
2022-05-04T13:53:15
|
|
test: Install GNOME-style installed-tests metadata
This allows these tests to be discovered and run by
gnome-desktop-test-runner.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
38ef6789
|
2020-11-25T13:30:29
|
|
test: Add a `make install` target for the tests
This makes it more convenient to compile them alongside SDL, install
them in an optional package and use them as smoke-tests or diagnostic
tools. The default installation directory is taken from GNOME's
installed-tests, which seems as good a convention as any other:
https://wiki.gnome.org/Initiatives/GnomeGoals/InstalledTests
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
76a7b629
|
2022-04-12T13:07:18
|
|
test: Add some common code to load test resources
As well as reducing duplication, this lets the tests load their resources
from the SDL_GetBasePath() on platforms that support it, which is useful
if the tests are compiled along with the rest of SDL and installed below
/usr as manual tests, similar to GNOME's installed-tests convention.
Thanks to Ozkan Sezer for the OS/2 build glue.
Co-authored-by: Ozkan Sezer <sezeroz@gmail.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
ecf1e15f
|
2022-05-04T19:31:11
|
|
workflows: Parallelize Linux Autotools and CMake builds
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
dba79ade
|
2022-05-04T13:57:30
|
|
workflows: Run build-time tests
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
40bef98f
|
2022-05-04T19:16:01
|
|
test: Add a mode to skip tests that involve arbitrary delays
This can be used as a quick acceptance test for CI workflows.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
7d2808e3
|
2022-04-12T13:33:58
|
|
test: Run selected noninteractive tests at build-time
In Autotools, these are run by `make -C ${builddir}/test check`.
In CMake, they're run by `make -C ${builddir} test` or
`ninja -C ${builddir} test` or `ctest --test-dir ${builddir}`.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
a4594797
|
2022-05-04T18:13:25
|
|
workflows: Only run `cmake --install` on Unix platforms
The syntax used in this step assumes a Unix shell.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
79a16da6
|
2022-05-04T18:14:22
|
|
workflows: Change how we make CMake verbose
Some CI workers don't seem to understand `cmake -v`, and Windows' shell
doesn't understand `VERBOSE=1 cmake`.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
4da47601
|
2022-05-04T18:13:38
|
|
workflows: Remove redundant `cmake --build`
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
2a8297e4
|
2022-05-04T16:43:59
|
|
workflows: Add a test to assert that all the version numbers agree
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
fff97c95
|
2022-05-04T16:40:11
|
|
build: Mechanically generate ABI versions from version number
If we're strict about applying something resembling semantic versioning
to the "marketing" version number, then we can mechanically generate
the ABI version from it.
This limits the range of valid micro versions (patchlevels) to 0-99.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
60d702ac
|
2022-05-04T16:39:05
|
|
docs: Document new versioning scheme
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
cd7c2f1d
|
2022-05-03T15:16:11
|
|
Switch versioning scheme to be the same as GLib and Flatpak
For stable releases, this gives us the ability to make bugfix-only point
releases such as 2.24.1 if we want to, and distinguish between them
programmatically. For example, this ability could have been useful after
2.0.16 to fix Xwayland regressions, and after 2.0.18 to fix event loop
regressions.
For development releases, this gives us the ability to make multiple
prereleases during the same feature cycle, and distinguish between them
programmatically. For example, this would have been useful during 2.0.22
development, which went through three prereleases before reaching the
final release.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
63814ec7
|
2022-05-03T14:39:00
|
|
Add static assertions that the version number is consistent
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
22002d91
|
2022-05-03T14:09:12
|
|
docs/release_checklist.md: Document how/where to bump version numbers
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
d4b82bfa
|
2022-05-03T13:17:59
|
|
Add static assertions for version numbers' limits
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
ba6f9627
|
2022-05-03T13:17:41
|
|
Document SDL_VERSIONNUM as able to encode larger minor versions
Now that we've said this will be removed from SDL 3, we're free to use
any encoding that is compatible with existing SDL versions and will still
compare correctly for all SDL 2 version numbers. This allows the SDL 2
minor version to go beyond 1 digit, limited only by the size of
SDL_version.minor (which is 8 bits), making the largest possible version
number 2.255.99.
The patchlevel (micro version) is still limited to 2 digits.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
e0daa2a5
|
2022-05-03T13:08:38
|
|
Deprecate SDL_COMPILEDVERSION and SDL_VERSIONNUM, to be removed in 3.x
The encoding used in SDL_VERSIONNUM (e.g. 2.0.22 -> 2022) cannot
represent 2-digit minor versions without overflowing from the hundreds
digit into the thousands digit, which produces confusing version
numbers that will compare incorrectly when the major version is increased
to 3.
However, we can sidestep this problem by declaring that SDL_VERSIONNUM
will no longer be present in SDL 3, which means it only needs to be able
to represent SDL 2 version numbers losslessly.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
f9a5cf77
|
2022-05-03T13:05:02
|
|
Make SDL_VERSION_ATLEAST future-proof against larger version numbers
This comparison normally happens at compile-time, not at runtime, so
it doesn't matter if it isn't optimal. This avoids incorrect comparison
if the minor version in SDL_COMPILEDVERSION and SDL_VERSIONNUM has more
than one digit, which would cause it to overflow from the hundreds place
into the thousands place.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
50bc0136
|
2022-05-04T17:45:26
|
|
workflows: Tell CMake and Makefile.in to show compiler command-lines
This is usually desirable for batch processing: it lets us see exactly
what is happening in the logs.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
b398a847
|
2022-05-03T23:21:10
|
|
Add SDL_FLOATWORDORDER for older ARM toolchains
|
|
adac3bd1
|
2022-05-03T12:31:50
|
|
video: restore ability to disable fb accel via hint
Somewhere in code refactoring between .20 and .22 this check
was lost, and so the hint had no effect anymore.
|
|
85a77fb5
|
2022-05-03T20:22:48
|
|
workflows: List files installed by CMake
This lets us compare them with Autotools more easily.
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
90da399b
|
2022-04-12T14:54:24
|
|
workflows: Add a workflow to exercise the Autotools build on Linux
This builds the tests, but does not run them (for now).
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
3f813cf1
|
2022-05-04T10:05:56
|
|
SDL_rawinputjoystick.c: fixed -Werror=declaration-after-statement
|
|
2021a109
|
2022-05-03T20:37:03
|
|
cmake: Defer test subproject until after defining install/uninstall
It looks as though something in the test subproject "leaks" into the
main build system, causing us to try to install ${builddir}/test/sdl2.pc
instead of the correct ${builddir}/sdl2.pc. Moving the tests subproject
further down avoids this.
Resolves: https://github.com/libsdl-org/SDL/issues/5604
Signed-off-by: Simon McVittie <smcv@collabora.com>
|
|
db9e14e5
|
2022-01-31T13:55:37
|
|
disabled linux joystick debugging outputs and reverted unnecessary comment edit
|
|
3b53555b
|
2022-01-28T14:53:28
|
|
copied default Steam Controller mapping for wired and wireless-dongle USB pids
|
|
13b1bf4f
|
2022-01-28T13:31:08
|
|
added default gamepad mapping for Steam Controller with new GUID (possibly caused by the firmware update to enable BLE?)
|
|
f7a19f9e
|
2022-01-14T13:14:42
|
|
relaxed the digital hat deadzone slightly, and fixed typo in DEBUG_GAMEPAD_MAPPING define
|
|
3696e23d
|
2022-01-14T10:45:16
|
|
added hints SDL_HINT_LINUX_DIGITAL_HATS and SDL_HINT_LINUX_HAT_DEADZONES to control the new Linux hat handling; added define DEBUG_GAMEPAD_MAPPINGS to log messages when generating default gamepad mapings for Linux joysticks
|
|
0b8e796e
|
2022-01-12T22:00:46
|
|
added hueristic to differentiate digital vs analog 'hat' input axes and expose the latter as regular axes; added automatic deadzones to hat outputs, in case analog axes are still mapped to digital hats; updated automatic gamepad control mapping to more completely follow the spec
|
|
fbd230bb
|
2022-05-03T17:51:49
|
|
Add support for the Nokia N-Gage (#5597)
* Add initial support for the Nokia N-Gage
* N-Gage: disable clipping for the time being, issue needs to be resolved later
* Move va_copy definition to SDL_internal.h
* Move stdlib.h include to SDL_config_ngage.h, much cleaner this way
* Remove redundant include, add HAVE_STDLIB_H
* Revert "N-Gage: disable clipping for the time being, issue needs to be resolved later"
This reverts commit 4f5f0fc36cc7f34fad05e45671dfa7b8dc32fd51.
* N-Gage: fix clipping issue by providing proper math functions
|
|
3fcc2cb5
|
2022-05-03T11:19:39
|
|
x11: get x1/x2 button state in GetGlobalMouseState
|
|
f25a78ee
|
2022-05-03T00:40:42
|
|
Enable `SDL_TEXTEDITING_EXT` events in `checkkeys` test
|
|
6150245d
|
2022-05-03T00:11:44
|
|
Add new verbosity level for logging of `SDL_SysWMEvent`s
Now logged only if SDL_HINT_EVENT_LOGGING is set to "3" or above.
|
|
d1a3981b
|
2022-05-02T15:22:46
|
|
Fix crash when reading background events for MFi controllers on macOS
Enabling GCController.shouldMonitorBackgroundEvents to read background events
for MFi controllers before receiving the first GCControllerDidConnectNotification
is apparently a no-go on macOS (12.3.1 for me), and would crash on attempt.
Apple's documentation is... not great, and doesn't point this out.
This waits for IOS_AddMFIJoystickDevice() to get called down the chain from GCControllerDidConnectNotification, and enables GCController.shouldMonitorBackgroundEvents
if it hadn't been already.
On iOS and tvOS, GCController.shouldMonitorBackgroundEvents is ignored, so
there's no need to check their versions.
|
|
bb0b6dd4
|
2022-05-02T20:12:13
|
|
Fixed using WGI without XInput
|
|
5394238c
|
2022-04-30T11:40:26
|
|
Don't include the internal header for a file intended for use by applications
|
|
41b91985
|
2022-04-30T11:39:44
|
|
Fixed Xcode warning about Framework include style
|
|
829f6b3d
|
2022-04-30T11:32:04
|
|
These headers are system headers, not local headers
|
|
0687128c
|
2022-04-29T20:57:00
|
|
Reduce CPU usage in testgamecontroller
|
|
9e5cbf03
|
2022-04-29T22:36:12
|
|
Disallow non-positive allocation.
Ensure that we're not trying to call SDL_small_alloc()
with a count of zero.
Transforming the code like this fixes a
-Wmaybe-uninitialized warning from GCC 12.0.1
|
|
f8141970
|
2022-04-29T11:28:59
|
|
Document that SDL_MAX_LOG_MESSAGE is no longer meaningful
|
|
6c2928b4
|
2022-04-29T19:30:47
|
|
Switch uses of MIN() to SDL_min()
We're excluding files in src/hidapi to minimize the
diff against the upstream project.
|
|
ca26df34
|
2022-04-29T16:44:32
|
|
assert: Allow messages of any length.
Messages are no longer truncated to SDL_MAX_LOG_MESSAGE.
|
|
88889924
|
2022-04-29T16:30:30
|
|
log: Allow log messages of any length.
Log messages are no longer truncated to SDL_MAX_LOG_MESSAGE.
|
|
645db217
|
2022-04-29T14:06:05
|
|
log: Use malloc for long messages.
For short messages, use a stack buffer that is
significantly smaller than SDL_MAX_LOG_MESSAGE.
The rationale for this is that we don't want to risk
blowing the stack, while at the same time we would
like to not put pressure on the memory allocator unless
absolutely necessary.
|
|
73448fe2
|
2022-04-29T14:05:15
|
|
assert: Remove use of alloca()
For short messages, use a stack buffer that is
significantly smaller than SDL_MAX_LOG_MESSAGE.
For larger messages, fall back to allocation.
|
|
97774cdf
|
2022-04-29T14:01:03
|
|
Move in va_copy() define block from stdlib.
|
|
7e636b03
|
2022-04-29T10:16:14
|
|
Removed log message length limitation for Apple platforms
This works in conjunction with https://github.com/libsdl-org/SDL/pull/5584
|
|
1aa9754d
|
2022-04-29T08:47:28
|
|
Add missing backslashes in README-linux.md command
|
|
2ccb0dfd
|
2022-04-13T15:39:29
|
|
Check for macOS 10.16 to support apps built with older macOS SDKs
|
|
a0cdc1fc
|
2022-04-28T15:01:34
|
|
Added declaration of SDL_LogInit() and SDL_LogQuit()
Fixes compile warning on Android
|
|
29694869
|
2022-04-28T15:56:52
|
|
audio: Revert one of the resampler optimizations.
This is the one that splits the "left wing" into two for loops to
bubble out the conditional that decides if it should read from the
left padding or the input buffer.
I still believe the optimization is good, but the basic logic of it
was incorrect, and needs to be reexamined and fixed before going
back into revision control.
|
|
5c1f5a73
|
2022-04-28T20:57:20
|
|
test: Correct invalid enum length.
Ensure that they can't break like this again.
|
|
0f45a4e3
|
2022-04-27T12:22:37
|
|
log: Don't try to SDL_free the static array. :)
I shouldn't be allowed near computers, I swear.
|
|
31e83cd1
|
2022-04-27T12:13:44
|
|
log: Fixed build (sorry!)
|
|
fde9a708
|
2022-04-27T12:05:07
|
|
log: Make the message buffer static.
Now we don't have to worry about allocation failure, or performance
issues or changes to the allocation layout when trying to track down
subtle bugs.
|
|
c4141bc1
|
2022-04-27T09:39:24
|
|
log: Wrap the call to the logging implementation in a mutex.
Fixes #2463.
|
|
2a429522
|
2022-04-27T08:06:28
|
|
log: Don't stack-allocate the message buffer.
It's 4 kilobytes, so I could see this failing if you have a thread with
a tiny stack that unexpectedly logs something.
|
|
12f15aaa
|
2022-04-27T10:03:32
|
|
fix build
|
|
05bd225a
|
2022-04-26T23:14:44
|
|
x11: If XRandR isn't available, add a generic display.
We can get _some_ of the info we need out of standard Xlib and report a
single display (which might actually be multiple physical displays mushed
into a single desktop). This is better than nothing, but you should really
just build with XRandR support and get a better X server. :)
|
|
ccc70e64
|
2022-04-26T23:14:21
|
|
x11: Fixed some compiler warnings.
|
|
7d7ec9c9
|
2022-04-26T16:41:28
|
|
x11: Remove XVidMode and Xinerama support.
Fixes #1782.
|
|
e551384a
|
2022-04-26T14:54:14
|
|
Added functions to get the platform dependent name for a joystick or game controller
|
|
b293888c
|
2022-04-26T19:44:34
|
|
Fixes an issue introduced via #5573 when building for i686
|
|
5066910b
|
2022-04-10T13:44:01
|
|
audio: Make pregenerated resampler kaiser filter more precise.
|
|
111c3add
|
2022-04-10T13:23:51
|
|
audio: Resampler optimizations.
- Calculate `j * RESAMPLER_SAMPLES_PER_ZERO_CROSSING` once per loop
iteration since we use it multiple times.
- Do the left-wing loop in two sections: while `srcframe < 0` and then
the remaining calculations when `srcframe >= 0`. This bubbles a conditional
out of every iteration of a tight loop, giving us a boost. We could
_probably_ do this to the right-wing loop too, but it's less straightforward
there.
- The real win: Use floats instead of doubles. This almost doubles the speed
of the entire function on Intel CPUs, and for embedded things without
hardware-level support for doubles, the speedup is enormous. This in
theory might reduce audio quality, though, and I had to put a check in
place to avoid a division-by-zero that we avoided at higher precision, but
this is likely to be worth keeping for at least the Sony PSP and other
smaller platforms, if not everyone.
|
|
de019568
|
2022-04-09T23:43:57
|
|
audio: Prebake the resampler's kaiser table instead of doing it at runtime.
|
|
f6eb4b07
|
2022-04-26T13:14:15
|
|
pulseaudio: Feed audio data in response to write callbacks.
Instead of waiting until the entire buffer from the SDL callback is ready
to be accepted by PulseAudio, we use pa_stream_set_write_callback and
feed some portion of the buffer as callbacks come in asking for more.
This lets us remove the halving of the buffer size during device open,
and also (hopefully) solves several strange hangs that happen in unusual
circumstances.
Fixes #4387
Fixes #2262
|
|
01ef98a5
|
2022-04-26T10:19:03
|
|
Don't force keyboard auto-repeat on, if the user has disabled it for some reason
Fixes https://github.com/libsdl-org/SDL/issues/2400
|
|
795744fc
|
2022-01-07T10:11:46
|
|
Turn off relative mouse before window checks as well
|