Commit Graph

15288 Commits (093160904d49d99c9e50467a3dd04c0f98f292d2)

Author SHA1 Message Date
Ryan C. Gordon 093160904d
SDL_Keymod: Removed SDL_KMOD_RESERVED.
Fixes #9481.
2024-04-17 17:30:10 -04:00
Frank Praznik b1e47704ee audio: Prefer Pipewire if at least version 1.0.0
Checking for the pipewire-pulse service is unreliable when used in containers such as Flatpak, so simply use a minimum version check instead and prefer it over the Pulseaudio backend if at least version 1.0.0.
2024-04-17 17:16:28 -04:00
SDL Wiki Bot 2c183c602d Sync SDL3 wiki -> header 2024-04-17 21:09:29 +00:00
Ryan C. Gordon a18f3d55b7
SDL_iostream.h: Corrected documentation for SDL_ReadIO and SDL_WriteIO.
Fixes #9443.
2024-04-17 17:08:05 -04:00
Mathieu Eyraud cac1434295 Close pipe in Wayland_ShowMessageBox
When closing message box by pressing escape, Zenity does not write to the pipe and fgets() get stuck waiting for EOF.
2024-04-17 15:27:34 -04:00
Frank Praznik a2eb2697a3 x11: Fix mode switching when running under XWayland
XWayland emulates the XRandR interface, so it still needs the actual mode switch call to trigger the mode switching emulation.

There is also no need to wait when using XWayland mode switching emulation, as it is handled via viewport scaling and thus instantaneous.
2024-04-17 11:39:49 -04:00
Frank Praznik bed6c5b81f x11: Wait for mode switches to complete when synchronizing a window
Otherwise, the sync can timeout due to mode switching taking several seconds.
2024-04-17 11:39:49 -04:00
Sam Lantinga e632ed23ad Fixed compilation with C89 (thanks @d-s-a!)
Closes https://github.com/libsdl-org/SDL/pull/9564

(cherry picked from commit 4e29be814e2a67992e7487b2b1814e37ff4c6980)
2024-04-17 07:49:19 -07:00
DevonArtmeier 65a04a772e dialog: Allocate space for terminator when building filter string 2024-04-16 14:09:18 -07:00
Ryan C. Gordon fdcc3e1151
thread: make generic SDL_Condition a no-op if built with SDL_THREADS_DISABLED.
Otherwise, when you call SDL_CreateCondition() in something that can otherwise
survive in a single-threaded build, you'll get an error that seems fatal.

We already do this for mutexes and rwlocks (but not semaphores!)

Fixes #9558.
2024-04-16 15:07:56 -04:00
SDL Wiki Bot bf0bf80df6 Sync SDL3 wiki -> header 2024-04-16 17:30:27 +00:00
Ryan C. Gordon db6b6bd75e
include: Fixed up some sensor documentation.
Fixes #9468.
2024-04-16 13:29:26 -04:00
Sam Lantinga 650d3b44e1 Removed the word "other" since the version has been removed 2024-04-16 08:52:21 -07:00
Ryan C. Gordon 235bfe2631
SDL_log.h: Remove SDL_MAX_LOG_MESSAGE.
The message length limit was removed in 2.0.24, so there's no need for
this define in SDL3 at all.

Fixes #9467.
2024-04-16 00:31:57 -04:00
Ryan C. Gordon 12b371679f
audio: Code defensively to placate static analyzers, don't disabling warnings. 2024-04-15 23:53:56 -04:00
Sam Lantinga bdd47f7770 Fixed warning: no previous extern declaration for non-static variable 'ResamplerFilter'
Fixes https://github.com/libsdl-org/SDL/issues/9556
2024-04-15 16:16:32 -07:00
Sam Lantinga d51b53ef8f Add final Vulkan AV1 ext and VVC support
Fixes https://github.com/libsdl-org/SDL/issues/9464
2024-04-15 16:15:09 -07:00
Sam Lantinga 57a5b26d77 Updated to the latest version of the Vulkan SDK 2024-04-15 16:05:32 -07:00
Brick 5e985b72dc SDL_ConvertAudioSamples: Make sure we got enough data 2024-04-15 11:47:18 -10:00
Brick edaab8ad9f Refactored audio conversion to reduce copying
More of the logic has been moved into SDL_AudioQueue,
allowing data to be converted directly from the input buffer.
2024-04-15 11:47:18 -10:00
Brick ae57b0c9d8 Randomly split the data in audio_resampleLoss
This helps ensure correct resampling across track boundaries
2024-04-15 11:47:18 -10:00
Brick 8f6f9cadc4 Rewrote audio resampler using cubic filter interpolation
This allows using a much smaller (1.5 KB) lookup table, in exchange for a small amount of extra work per frame.

The extra work (a few extra loads/mul/adds) is negligible, and can execute in parallel.
The reduction in cache misses almost certainly outweighs any added cost.

The table is generated at runtime, and takes less than 0.02ms on my computer.
2024-04-15 11:47:18 -10:00
Brick 46cecc42a2 Slightly optimized and fixed float SDL_MixAudioFormat 2024-04-15 11:47:18 -10:00
Brick 33f28d6143 Refactored ConvertAudio, added SIMD endian-swapping 2024-04-15 11:47:18 -10:00
Brick e9e9424b9a Implemented NEON audio type conversion
Compiler support for loading/storing multiple registers at once (i.e vld1q_f32_x4) seems very poor, so avoiding them for now.

Also switched to aligned stores with SSE. Although both SSE and NEON support unaligned stores, there is more likely to be a penalty to them, i.e when crossing a cache line. So might as align them.
2024-04-15 11:47:18 -10:00
Brick 7f96217c63 Add testautomation to android artifacts 2024-04-15 11:47:18 -10:00
Brick 9c2e4f52e6 Fixed misuse of entry->size in SDL_TrackAllocation
entry->size is the size of the allocation, not the number of stack frames
2024-04-15 11:47:18 -10:00
Brick f18cf7cffb Avoid changing dst_spec in testaudiostreamdynamicresample skip_audio
This is no longer allowed on bound streams
2024-04-15 11:47:18 -10:00
Brick 449b0229eb Fix SDL_SetAudioStreamFormat incorrectly blocking changes on bound streams
We want to avoid changes to the end used by the device, so src for capture and dst for output
2024-04-15 11:47:18 -10:00
Sam Lantinga d69e6714a8 Document that tooltip windows don't get mouse or keyboard focus 2024-04-15 14:38:00 -07:00
Sam Lantinga bfde7294f5 Added a note that the joystick should be initialized on the main thread on Windows
Fixes https://github.com/libsdl-org/SDL/issues/9533
2024-04-15 14:19:44 -07:00
SDL Wiki Bot 7000a112a3 Sync SDL3 wiki -> header 2024-04-15 21:13:12 +00:00
Sam Lantinga 70ce808c09 Changed SDL_KeyCode values to defines
This clears up confusion about whether to use SDL_KeyCode or SDL_Keycode and makes it clear that the values aren't the full set of possible keycodes.

Fixes https://github.com/libsdl-org/SDL/issues/9493
2024-04-15 11:08:51 -10:00
Sam Lantinga 2fa4937e1a Removed obsolete padding 2024-04-15 13:55:01 -07:00
Sam Lantinga dc13c08375 Use single line comment format 2024-04-15 13:42:28 -07:00
SDL Wiki Bot 35c08c828b Sync SDL3 wiki -> header 2024-04-15 19:23:27 +00:00
Sam Lantinga 1862a62b5d Replaced SDL_GetNumTouchFingers() and SDL_GetTouchFinger() with SDL_GetTouchFingers()
Fixes https://github.com/libsdl-org/SDL/issues/9484
2024-04-15 09:22:41 -10:00
SDL Wiki Bot cdcd346575 Sync SDL3 wiki -> header 2024-04-15 19:13:11 +00:00
Anonymous Maarten aab7caebf0
cmake: pass macho version information separately from so version 2024-04-15 18:36:27 +00:00
Frank Praznik a845c7027e x11: Fix pointer warp on XWayland
XWayland seems to require that the pointer be hidden when it is warped, so hide and show the pointer when warping, if required.

Note that XWayland still only allows warping within the window, so attempts to warp to global coordinates outside the window won't work.
2024-04-15 14:27:13 -04:00
Sam Lantinga a00669db18 Fixed warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data 2024-04-15 10:29:45 -07:00
Sam Lantinga 43a59ffe45 Fixed crashes when a window has NULL driverdata 2024-04-15 10:15:10 -07:00
SDL Wiki Bot 69ee186a1e Sync SDL3 wiki -> header 2024-04-15 16:56:12 +00:00
Ryan C. Gordon 9f6f4dfcb9
events: Fixed crash in SDL_SetEventEnabled.
This could happen if `enabled` was non-zero but not set to SDL_TRUE.

Static analysis tried to warn us!!

The added SDL_assert is meant to sanity check this, not pacify the analyzer;
this passes Clang's static analysis now, with or without the assert.

Fixes #9544.
2024-04-15 12:44:04 -04:00
Sam Lantinga 8a45c38f48 Removed unnecessary exclamation marks 2024-04-15 09:42:10 -07:00
Cameron Cawley 9b8e5a705e 3DS: Improve framebuffer support 2024-04-15 06:37:16 -10:00
Cameron Cawley 723cbf4b8e testmouse: Create the window on the touch screen when building for the 3DS 2024-04-15 06:37:16 -10:00
Cameron Cawley 8bc8047b6f 3DS: Ensure that touchscreen events are associated with a window 2024-04-15 06:37:16 -10:00
Sam Lantinga e161795071 Fixed build
Also removed the assert, since we assume window->driverdata is valid everywhere else.
2024-04-15 09:35:41 -07:00
Semphris 0429f5d6a3 Replace if() with SDL_assert()
If the if statement was not fulfilled, the pointers passed would be silently left unfilled.
2024-04-15 06:02:58 -10:00