Frank Praznik
30bb8f616d
wayland: Pass through event timestamps of 0
...
Always pass through event timestamps of 0 so the current time will be used for the event.
2022-12-06 09:17:00 -08:00
Lei.Huang
39eab4bf44
Add window title to app_ids for different
...
"app_ids" can be used for multiple windows
Signed-off-by: Lei.Huang <leihuang@amd.com>
2022-12-05 21:30:03 -05:00
Sam Lantinga
e8b1dfef9b
Fixed centering the D-pad on some joysticks
...
Fixes https://github.com/libsdl-org/SDL/issues/6767
2022-12-05 13:33:04 -08:00
Sam Lantinga
fcafe40948
Removed balls from the joystick API
...
They were only used by one joystick decades ago, so removing them for SDL3
Fixes https://github.com/libsdl-org/SDL/issues/6766
2022-12-05 13:17:18 -08:00
Sam Lantinga
75f1eb9216
Don't assume evdev events and SDL_GetTicks() use the same time source
...
The evdev events are in the same time base as gettimeofday(), but SDL_GetTicks() might be using clock_gettime()
2022-12-05 10:40:16 -08:00
Sam Lantinga
57d34f2e10
Make sure we never get a zero tick_start value
2022-12-05 10:17:38 -08:00
Sam Lantinga
c468d93760
Removed unnecessary conversion from nanoseconds to milliseconds in SDL_GetTicks()
2022-12-05 10:11:22 -08:00
Sam Lantinga
82b01035d1
Reduce the chance of overflow when calculating nanosecond time
...
Fixes https://github.com/libsdl-org/SDL/issues/6762
2022-12-05 09:43:30 -08:00
Ozkan Sezer
ed6d401616
gendynapi.pl: fix "Use of uninitialized value $7" after commit 0f9482e
.
...
Reference issue: https://github.com/libsdl-org/SDL/issues/6740 .
2022-12-05 20:29:56 +03:00
Sylvain
af5bda5ef3
Fix warnings 'macro argument should be enclosed in parentheses'
2022-12-05 09:06:44 -08:00
Frank Praznik
8cafde5ecc
wayland: Add high-resolution event timestamp support
...
Add the protocol for high-resolution timestamp events and subscribe to them if available.
Event timestamps are now handled natively in nanoseconds as much as possible to avoid error-prone conversions.
Variables have been appended with _ms or _ns where appropriate, to avoid ambiguity.
2022-12-04 16:56:26 -08:00
Ozkan Sezer
4a22ee7277
tests: avoid redefinition warnings for MSVC _CRT_???_NO_DEPRECATE macros
2022-12-05 00:35:20 +03:00
Sam Lantinga
38de07d9e4
Cancel current CI actions when a PR is updated
2022-12-04 10:05:54 -08:00
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