WIN_AddDisplay asserted that the returned index is the expected next
one in the list. This can be an unexpected number when displays are
add and removed in a batch (eg, Remote Desktop disconnect and reconnect).
Instead always just make use of the next index, even if it is not the
expected next index value. This fixes issue #9105
There are low-latency fixes in SDL3 that really need to be backported to SDL2
before AAudio will be nicer across a range of devices, so OpenSL ES is safer
in SDL2 at the moment. At least, we suspect as such.
Fixes#11457.
(cherry picked from commit 17b9ed7d82)
This reverts commit 1e016fd5ea.
In order to use low latency mode, you need to set low latency callbacks. This has always been recommended and is apparently required on Android 15. SDL3 has these implemented correctly but SDL2 does not, so we should revert this for now.
Fixes https://github.com/libsdl-org/SDL/issues/11376
(cherry picked from commit d2b9ecd281)
Viewports decouple the buffer from the window size and avoids the window geometry hacks used to prevent problems if a buffer with an old size in the pipeline ends up being committed.
Fixes an invalid geometry warning and incorrect overview size for fullscreen windows on GNOME, and avoids flicker when entering/exiting fullscreen or moving the window between scaled and non-scaled displays.
(cherry picked from commit 849c905d8c)
This reverts commit 120b8d4189.
The issue this was patching over in Vanilla-Conquer was the lack of an exposure event when showing a window, which has since been remedied.
Attaching EGL window objects can also cause protocol violations now that the explicit sync protocol is in use, if SDL creates one and then the client tries to attach one itself, so they really shouldn't be created unless the client specifically requested it.
(cherry picked from commit 643437f5b0)
UpdateDevice() can be called at an arbitrary rate, so we need to
pace ourselves to avoid filling up the rumble queue with these.
(cherry picked from commit 6ec8b1a173)
(cherry picked from commit 656b599828)
Modern kernels (v5.8+) allow non-root usage of drmDropMaster(), so
we can hold on to our fd after dropping master on it. This fixes
populating drm_fd in the KMSDRM SysWMinfo when using Vulkan.
Also add a missing error check for open() while we're here.
(cherry picked from commit dab4f856c1)
This used a tiny stack, which apparently upsets Blender for various
technical reasons. Instead, just use the default stack size, which should
give it plenty of space to work.
If the thread failed to create, we would then wait on a semaphore that would
never trigger, so don't do that anymore!
Fixes#10806.
(cherry-picked from commit b7dc30ca24)
(cherry picked from commit 58f2586b44)
On most Unix platforms supported by SDL, the canonical name used to load
a library at runtime includes its ABI major version, and the name
without a version is not guaranteed to exist on non-developer systems.
libX11-xcb.so.1 is correct on Linux, and probably on other Unix
platforms like FreeBSD.
A notable exception is OpenBSD, which apparently does not use
ABI-suffixed names, so continue to use libX11-xcb.so there.
Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit 7713a7eec7)
(cherry picked from commit 54757c29dd)