If wireplumber is not running or if there is no audio device,
PIPEWIRE_OpenDevice could remain stuck indefinityely on PIPEWIRE_pw_thread_loop_wait
because priv->stream_init_status is never equal to PW_READY_FLAG_ALL_PREOPEN_BITS.
Use PIPEWIRE_pw_thread_loop_timed_wait instead with a 2 seconds timeout and bail
out with an error on timeout.
A 2 seconds timeout seems plenty enough: in my observations, when there is an audio device,
the wait for the device to be ready is just a few milliseconds.
Related: 65091012b4
After the aforementioned commit, pinching in any iOS app using SDL
crashes with
*** Terminating app due to uncaught exception 'NSRangeException', reason: '-[UIPinchGestureRecognizer locationOfTouch:inView:]: index (1) beyond bounds (1).'
*** First throw call stack:
(0x19d31a23c 0x199de9224 0x19d37fec4 0x1a3f99bf0 0x1a3fa3c68 0x103277370 0x1a33b8b7c 0x1a33b848c 0x1a33b8238 0x1a2efc9a4 0x1a2ec1310 0x1a8ab8754 0x1a8af6c1c 0x1a8abc324 0x1a8ac79f4 0x1a2f010e8 0x1a2ee9550 0x1a2efd638 0x1a2eea040 0x1a2f0318c 0x1a2eecd48 0x1a2f062a8 0x1a2f03834 0x2b210f56c 0x19d2a5358 0x19d2a52cc 0x19d26a5a8 0x19d2341a0 0x19d23354c 0x1032bcdd8 0x1032ee2a0 0x1032ee3fc 0x1032ee360 0x102280644 0x10228042c 0x1033cd0cc 0x1032a8198 0x19a61f5dc 0x19d273960 0x19d273658 0x19d2731cc 0x19d234584 0x19d23354c 0x24299f498 0x1a2f2c244 0x1a2e97158 0x1032a5780 0x102280030 0x199e41c1c)
libc++abi: terminating due to uncaught exception of type NSException
As it turns out, `UIPinchGestureRecognizer` does not guarantee the
presence of two touches throughout the entire duration of the pinch.
When the user is releasing the touches that constitute the pinch
gesture, more often than not they will release one touch before the
other. When this happens, `UIPinchGestureRecognizer` *does not terminate
the pinch*, but continues updating it, only with one touch remaining in
the gesture. The gesture is only marked concluded when the user releases
*both* touches.
To prevent the crash, check that the second touch is actually available
via the `numberOfTouches` property. If it is not, avoid emitting
`SDL_EVENT_PINCH_UPDATE` events to prevent sending unexpected payloads
downstream; there is no second touch to use anymore to calculate
`(focus|span)_(x|y)`.
Both `SDL3/SDL.h` and `SDL3/SDL_events.h` attempt to `#include
<SDL3/SDL_notification.h>` and that header was not added to Xcode,
leading to compilation failures.
In some cases, conflicts can occur at the platform or driver level if a window initially configured for OpenGL is then used with a Vulkan-based renderer. Try to reconfigure or recreate the window in the unlikely event that it has the OpenGL flag set when initializing the Vulkan or GPU renderer to remove any platform or driver-specific OpenGL objects and properties.
This change also makes it so relative mode doesn't kick in until the mouse enters the window client area. This prevents relative mode from kicking in while clicking and dragging on the title bar, etc.
This adds support for:
* System theme
* Sandbox detection
* Device form factor detection
Many things aren't properly supported yet, but changes and upgrades will happen on the Ubuntu Touch side, so SDL should automatically support more Ubuntu Touch features as time goes.
The immersive-fullscreen code hid the status and navigation bars with the
deprecated View.setSystemUiVisibility() flags plus FLAG_FULLSCREEN. On
Android 15+ (API 35), edge-to-edge is enforced for apps targeting SDK 35+
and those flags are ignored, so the bars never hide (e.g. on a Samsung
S25). Android 14 and below still honour them, which is why older devices
were unaffected.
Hide/show the system bars with WindowInsetsController on API 30+ (using
BEHAVIOR_SHOW_TRANSIENT_BARS_BY_SWIPE for sticky-immersive), keeping the
legacy setSystemUiVisibility() path for API < 30. The minimum supported
version is unchanged.
(cherry picked from commit a442367706)
This doesn't _suppress_ the warnings, it annotates our memory access pattern
so ThreadSanitizer knows that threads aren't in conflict, since TSan doesn't
know about io_uring's mechanisms.
Fixes#15083.
External window surfaces can't be destroyed and recreated, so try our best to reconfigure them when switching between GL profiles, or between GL and Vulkan.
- Addresses issue #15115
- mach_absolute_time can be misused for fingerprinting. This is bad.
- Apple docs prefer clock_gettime_nsec_np(CLOCK_UPTIME_RAW) in time.h
- Since HAVE_NANOSLEEP is defined, time.h is included