Sam Lantinga
80850af7ce
The controller update complete events are no longer disabled by default
2023-08-10 17:45:00 -07:00
Sam Lantinga
3f486224a9
Fixed refresh rate calculation for KMSDRM
2023-08-10 15:39:38 -07:00
Anonymous Maarten
342ec51131
Fix overflow when doing SDL_sscanf("%hd", ...)
...
An overflow occured in the stdlib_sscanf test, when using msys2 clang32 toolchain.
2023-08-10 15:06:42 -07:00
Sam Lantinga
9129e1d557
Fixed crash when setting the default cursor twice
...
This happens in the KMSDRM driver, once after video init, setting a blank default cursor, and once when creating a window when the KMSDRM mouse is initialized.
Also fixed a memory leak freeing the default cursor at shutdown
2023-08-10 12:13:40 -07:00
Sam Lantinga
8e99a4f4f5
Undo variable rename
2023-08-10 11:45:20 -07:00
Sam Lantinga
be67f0de10
Fixed crashes related to the default cursor on WinRT and KMSDRM
...
Fixes https://github.com/libsdl-org/SDL/issues/8104
2023-08-10 11:40:36 -07:00
Mathieu Eyraud
94b3f78c44
Fix out of bound read of 'has_hat' array
2023-08-10 08:25:01 -07:00
Sam Lantinga
94f48f19b0
Use more specific build destinations when creating an xcframework
2023-08-10 01:52:10 -07:00
Sam Lantinga
dabd45997e
Back out change supporting multiple names for binding elements
...
testcontroller expects to be able to call SDL_GetGamepadStringForButton() and find that name in the binding string
We can revisit this later if it becomes important to use new names in bindings. @smcv
2023-08-09 11:25:37 -07:00
Simon McVittie
efe15588d5
Relabel back paddles as left or right
...
The sequence order of the four paddles is not obvious, with SDL and Xbox
controllers swapping the order of P2 and P3 relative to each other.
If we group them into left and right, then it becomes more obvious.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-09 11:03:30 -07:00
Anonymous Maarten
be884f0c95
ci: disable visionos.yml by renaming the file
2023-08-09 19:17:20 +02:00
Anonymous Maarten
ac094d00f5
ci: add workflow_dispatch event to visionos workflow
2023-08-09 18:59:10 +02:00
Simon McVittie
9be9e2292b
build: Consistently use pathlib APIs in cmake/xxd.py
...
The ability to pass a pathlib.Path to open() was new in Python 3.6,
and the oldest branch of the Steam Runtime only has Python 3.5 available.
Even without considering retrocomputing, using the Path.open method is
more consistent with how we read the input 2 lines earlier.
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-09 15:44:05 +02:00
Sam Lantinga
a9f6950657
Fixed deadlock shutting down Android sensors
2023-08-08 23:01:55 -07:00
Sam Lantinga
d9f09e77f2
Actually make the sensors magical!
2023-08-08 22:34:41 -07:00
Ravbug
690eae7d22
Implement visionOS support
2023-08-08 22:25:04 -07:00
Sam Lantinga
e385d6da0a
Fixed build warning
2023-08-08 22:20:49 -07:00
Sam Lantinga
6b93e788fa
Improved sensor thread-safety
...
This fixes an issue where the main thread would hang indefinitely when polling events if sensors were initialized and shutdown on another thread.
2023-08-08 22:09:47 -07:00
Sam Lantinga
4ee0e5a984
Fixed thread-safety warnings
2023-08-08 22:09:47 -07:00
Sam Lantinga
12deed91f8
Added information on how to enable thread-safety analysis
2023-08-08 22:09:46 -07:00
Ryan C. Gordon
5735d2b03b
coreaudio: Fixed assertion when device fails/quits mid-iteration.
...
Fixes #8094 .
2023-08-08 23:57:42 -04:00
Ryan C. Gordon
1022fd6e04
testaudio: the test framework opens an audio device at startup; close it.
...
Not opening a device at all would be more desirable, though.
2023-08-08 21:42:48 -04:00
Ryan C. Gordon
0714da37a4
audio: Fix audio stream callback calculations when future buffer has space.
...
We were subtracting backwards. :/
2023-08-08 21:42:48 -04:00
Anonymous Maarten
917e036f6f
MSVC has __declspec(deprecated)
2023-08-09 02:54:18 +02:00
Sam Lantinga
279ff8909f
Changed example code to avoid potential divide by zero
2023-08-08 16:52:09 -07:00
Sam Lantinga
8a1afc9b10
Fixed Android not sending controller event timestamps
2023-08-08 09:47:49 -07:00
Sam Lantinga
463c456b98
Fill the correct member with the joystick ID in SDL_EVENT_JOYSTICK_UPDATE_COMPLETE
2023-08-08 09:47:49 -07:00
Simon McVittie
55cf1abaa6
test: Don't flag testsurround as suitable for non-interactive use
...
According to #8088 it has no value as an automated test, and by
default it takes long enough to hit the default test timeout.
Resolves : #8088
Signed-off-by: Simon McVittie <smcv@collabora.com>
2023-08-08 08:45:57 -07:00
Sam Lantinga
a2d594269c
Fixed pixel format compatibility with SDL2
2023-08-07 22:45:21 -07:00
Sam Lantinga
79a190aa23
Fixed setting invalid bpp for FOURCC formats in SDL_GetMasksForPixelFormatEnum()
2023-08-07 22:20:40 -07:00
SDL Wiki Bot
8fdebdd3e0
Sync SDL3 wiki -> header
2023-08-08 03:37:14 +00:00
Sam Lantinga
b903ccf945
SDL_rwops read/write functions return size_t again
...
The current status is stored in the SDL_rwops 'status' field to be able to determine whether a 0 return value is caused by end of file, an error, or a non-blocking source not being ready.
The functions to read sized datatypes now return SDL_bool so you can detect read errors.
Fixes https://github.com/libsdl-org/SDL/issues/6729
2023-08-07 20:36:21 -07:00
Brick
c03f5b4b69
Fixed rounding up in SDL_PrintFloat
...
This wasn't caught by the 9.9999999 case, because that value is actually just equal to 10.0
2023-08-07 14:15:19 -07:00
Sam Lantinga
75a020aa6b
Only query serial number and firmware versions from Sony PS5 controllers
...
I don't know of any specific issue with this, but third party PS4 controllers have had issues with reports that are specific to Sony hardware, so this is a speculative change to prevent issues with future controllers.
If it turns out that these reports are valid and useful for third party controllers, we can back this change out.
2023-08-07 14:06:10 -07:00
Sam Lantinga
fa189d302e
Added the Victrix Pro FS for PS4/PS5 to the controller list
2023-08-07 14:04:34 -07:00
Sam Lantinga
26205b659d
Fixed PS4/PS5 touchpad for third party controllers
...
We should always report touchpad and battery status if they are available. We just want to make sure we don't enable enhanced reports unless the application wants that behavior.
2023-08-07 10:48:52 -07:00
Ryan C. Gordon
6af0448af9
include: fixed a typo in SDL_RenderGetMetalCommandEncoder docs.
...
(cherry picked from commit 8087c0a5d2e2e47b7841cdd9d3fdff8cfb23e241)
2023-08-06 10:45:46 -04:00
Ozkan Sezer
f3cb46b083
SDL_thread.h: do not conflict with sdl2-compat::sdl3_include_wrapper.h
...
The windows hacks in there will not be needed any longer
2023-08-06 14:11:02 +03:00
Sam Lantinga
080b1dfbdb
Revert "Improved fallback for SDL_COMPILE_TIME_ASSERT() (thanks @icculus!)"
...
This reverts commit 9d453daa23
.
Oops, it totally doesn't work:
error: unused variable 'SDL_compile_time_assert_SDL_copyp' [-Werror=unused-variable]
2023-08-05 19:23:30 -07:00
Sam Lantinga
9d453daa23
Improved fallback for SDL_COMPILE_TIME_ASSERT() (thanks @icculus!)
2023-08-05 19:18:31 -07:00
Sam Lantinga
1fb2419882
Removed reference to renamed function
2023-08-05 19:11:10 -07:00
Ryan C. Gordon
e7d56dd0b2
audio: Renamed new API SDL_UnpauseAudioDevice to SDL_ResumeAudioDevice.
2023-08-05 19:20:14 -04:00
Mathieu Eyraud
2b0c0f5b6b
Don't pass NULL to strncmp
2023-08-05 18:17:21 -04:00
Mathieu Eyraud
778e8185cd
Fix size of memcpy in SDL_AudioDeviceFormatChangedAlreadyLocked
...
And add diagnostic that allows to find this kind of issue in clang-tidy
2023-08-05 14:14:45 -04:00
SDL Wiki Bot
4bb426abad
Sync SDL3 wiki -> header
2023-08-05 17:45:14 +00:00
meyraud705
3a752ce650
Reapply "Changed 'freesrc' parameter from int to SDL_bool" to SDL_wave.c
...
Commit bea99d4
was partially reverted by 905c4ff
"audio: First shot at the SDL3 audio subsystem redesign!"
2023-08-05 13:44:48 -04:00
Ozkan Sezer
2ba03b4db0
fix build after previous commit.
2023-08-05 18:15:10 +03:00
Ozkan Sezer
0026adffd4
apply force_align_arg_pointer attribute to correct version of SDL_RunApp
2023-08-05 18:10:10 +03:00
Ozkan Sezer
77446e2029
Unaligned stacks on i686-w64-mingw32 may lead to crashes
...
Port of original SDL2 patch by Christopher Wellons (@skeeto, #7607 )
to SDL3.
2023-08-05 17:39:30 +03:00
Sam Lantinga
d3bcc3f057
Fixed build errors when OpenGL isn't enabled
2023-08-05 00:25:12 -07:00