Commit Graph

11209 Commits

Author SHA1 Message Date
Sam Lantinga
39e39f335e Only cancel previous builds when iterating on pull requests 2022-12-04 09:50:51 -08:00
Ozkan Sezer
d6327a00fb re-applied the SDL_NewAudioStream deconstification, including to its definition
we should keep this to SDL3 only.
2022-12-04 20:50:20 +03:00
Sam Lantinga
d3ba6529e6 Fixed windows build 2022-12-04 09:39:55 -08:00
Cameron Cawley
ee0e9e979c Move intrinsic includes into a private header 2022-12-04 09:34:10 -08:00
Sam Lantinga
b4da4ed95a Removed SDL_SensorGetDataWithTimestamp() and SDL_GameControllerGetSensorDataWithTimestamp()
If you care about timestamps you'll also want to catch all of the sensor events instead of just polling the current state. For example, Nintendo Switch controllers generate 3 sensor events with distinct values for each polling interval.
2022-12-04 09:29:28 -08:00
Sam Lantinga
b8760a3ffe The timestamp_us member of the sensor events has been renamed sensor_timestamp and now represents nanoseconds. 2022-12-04 09:29:28 -08:00
Sam Lantinga
73f4aeee6a Pass the event timestamp for joystick events
This allows the application to get more fine grained information about controller event timing, and group events that happened together.
2022-12-04 09:29:28 -08:00
Sam Lantinga
f32cdfa096 Fixed presentation reset calculation (thanks @zturtleman!) 2022-12-04 09:28:03 -08:00
Sam Lantinga
f9ad84fd5d Cancel current CI actions when a PR is updated
This should help get build feedback more quickly when someone is iterating on a PR
2022-12-04 09:11:38 -08:00
Ozkan Sezer
25e62193f4 just revert the const removal from SDL_NewAudioStream in commit d0bbfdb 2022-12-04 12:56:50 +03:00
Ozkan Sezer
202eaeea11 replace windows timeapi.h with mmsystem.h for better compatibility. 2022-12-04 12:50:04 +03:00
Ozkan Sezer
36a43eac00 apply const removal changes from SDL_NewAudioStream to dynapi side too. 2022-12-04 12:47:20 +03:00
Frank Praznik
1f40b9de96 wayland: Pass event timestamps to SDL
SDL events support system timestamps now, so pass them through.
2022-12-03 21:17:35 -08:00
Sylvain Becker
4ffa7f868d
Fixed bug libsdl-org#6745 - Check for overflow in SDL_CalculateYUVSize (#6747)
Fixed bug #6745 - Check for overflow in SDL_CalculateYUVSize
2022-12-03 21:22:14 +01:00
Max Bachmann
5650046f93 Detect Logitech PRO Racing Wheel as wheel 2022-12-03 08:21:18 -08:00
Sylvain
021d0b7300
Fix wrong clang-tidy modification. This is an integer division. Thanks @meyraud705 (see PR #6725) 2022-12-03 13:36:09 +01:00
Ozkan Sezer
0f9482ebc3 reran gendynapi.pl to add SDL_GetTicksNS / SDL_DelayNS to SDL_dynapi.sym 2022-12-03 00:33:50 +03:00
Sam Lantinga
1a890808a4 Fixed build 2022-12-02 13:11:04 -08:00
Jan Engelhardt
1878674477 build: add symbol versioning for SDL
If a program built against one version of SDL is run in an
environment where there is an earlier version of the SDL .so library
installed, the result varies depending on platform configuration; in
the best case, it won't start at all, at worst it aborts in the
middle of the user doing "something important" (systems implementing
lazy symbol resolution). verdefs on the other hand are always checked
on startup.

The dependency information present in programs and shared libraries
is not only of value to the dynamic linker, but also to a
distribution's package management. If the dynamic linker is able to
tell that a program is not runnable per the above, a package manager
is able to come to the same conclusion — and block the installation
of a nonfunctional program+library ensemble.

Because there are a lot more symbols than there are libraries (I am
going to throw in "10^4 to 1 or worse"), package managers generally
do not evaluate symbols, but only e.g. the SONAME, NEEDED and VERNEED
fields/blocks. Because the SONAME is the same between two SDL
versions like 2.0.24, and 2.0.26, everything rests on having verdefs.

This patch proposes the addition of verdefs.
2022-12-02 13:05:37 -08:00
Sylvain Becker
92cd2c0a74
Enable creation of yuv SDL_Surfaces (#6735) 2022-12-02 12:53:48 -08:00
Sam Lantinga
0a3262e819 Pass the OS event timestamp for keyboard, mouse, and touch events where possible
Currently implemented for Windows and Apple platforms
2022-12-02 12:37:41 -08:00
Sam Lantinga
1f4cc733a1 Removed the nanosecond versions of event and thread primitive waits from the public API
It's not clear applications need this level of precision yet, so let's leave these private for now.
2022-12-02 12:37:41 -08:00
Sam Lantinga
e2432bbd3b How did PS2 build without a condition variable implementation? 2022-12-02 12:37:41 -08:00
Sam Lantinga
8121bbd083 Convert ticks to 64-bit, added nanosecond precision to the API
Fixes https://github.com/libsdl-org/SDL/issues/5512
Fixes https://github.com/libsdl-org/SDL/issues/6731
2022-12-02 12:37:41 -08:00
Sylvain
764b899a13
Fix Conditional jump or move depends on uninitialised value(s)
eg ./testsprite2 --trackmem
2022-12-02 21:11:33 +01:00
Sam Lantinga
4713db1484 Commented out syntax that causes Visual Studio 2019 to complain on every edit 2022-12-02 00:43:01 -08:00
Ozkan Sezer
a3d7dd2464 SDL_sysfilesystem.c (SDL_GetBasePath): fixed the solaris code path.
Reference issue: https://github.com/libsdl-org/SDL/pull/6681
2022-12-02 06:23:30 +03:00
Ozkan Sezer
ab916e8a61 fixed corrupted (zero-sized) SDL3-WinRTResource_BlankCursor.cur.
(copied from SDL2 branch with renaming.)
2022-12-02 03:32:00 +03:00
Ozkan Sezer
bb8adf74e0 cmake/sdlchecks.cmake: make it diff smaller against SDL2 2022-12-02 03:01:02 +03:00
Frank Praznik
378b1c286a Fix formatting on Wayland and Pipewire function signatures
Fixes the formatting on some function signatures that clang-format missed.
2022-12-01 15:13:28 -08:00
Sylvain Becker
ab1f4172e3
Remove SDL_GL_CONTEXT_EGL #6657 (#6683) 2022-12-01 14:53:37 -08:00
Sam Lantinga
7237c56499 Detect the G923 (Xbox style) and PXN V900 (PS3 mode) as wheels 2022-12-01 14:43:34 -08:00
Pierre Wendling
3c501b963d
Clang-Tidy fixes (#6725) 2022-12-01 13:07:03 -08:00
Sam Lantinga
c2ce44bead More cleanup for #6619 2022-12-01 12:53:11 -08:00
Anonymous Maarten
11ef4df207 cmake: rely on targets from the main cmake script 2022-12-01 20:32:47 +01:00
Anonymous Maarten
14ffaba399 cmake: build with rpath's, they are removed on install
This allows to build and run tests (on Linux) linked against the shared library
2022-12-01 20:32:47 +01:00
Anonymous Maarten
1dce3f9265 ci: RISCOS is a bool 2022-12-01 20:32:47 +01:00
Anonymous Maarten
88b41c47fa ci: do verbose PSP build 2022-12-01 20:32:47 +01:00
Sam Lantinga
a463aca0d1 Simplified SDL_CreateRGBSurface* functions 2022-12-01 08:53:14 -08:00
Sam Lantinga
1e7e25626b Use SDL_PIXELFORMAT_RGB565, which is the most common 16-bit format 2022-12-01 08:34:41 -08:00
Sam Lantinga
a01759f8f0 Fixed 16-bit RGBA masks 2022-12-01 08:32:57 -08:00
Sam Lantinga
c30b2063e0 Clarified the migration path for SDL_CreateSurface() 2022-12-01 08:26:32 -08:00
Sylvain Becker
932f61348d
Remove mask versions of SDL_CreateRGBSurface* #6701 (#6711)
* Rename SDL_CreateRGBSurface{,From} to SDL_CreateSurface{,From}, which now takes a format parameter
2022-12-01 08:04:02 -08:00
Sylvain
778b8926b4
Small format changed (using clang-format 15.0.2-1) 2022-12-01 09:39:08 +01:00
Ozkan Sezer
45025799b7 restore SDL_malloc.c original formatting. 2022-11-30 17:28:26 -08:00
Sasha Szpakowski
b3b94cf36b Fix xcode project after opengles renderer removal 2022-11-30 17:25:43 -08:00
Sam Lantinga
36c5d5cc65 Added support for the Logitech Cordless Precision PS3 controller 2022-11-30 17:18:00 -08:00
Sam Lantinga
4f9c2b3e2e Added support for the HORIPAD Pro for Xbox Series X 2022-11-30 17:17:44 -08:00
Sam Lantinga
e2df0a9d5a Re-enabled support for third party PS3 controllers 2022-11-30 17:17:15 -08:00
Sam Lantinga
27e8eb4ca8 Fixed Victrix FS Pro V2 controller hang on reboot
(cherry picked from commit 9e997cc787)
2022-11-30 15:39:48 -08:00