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)
We make sure we initialize XInput first, so that anything checking whether it's enabled gets a valid result based on whether we were able to load it or not.
(cherry picked from commit 8f46cb771c)
(cherry picked from commit f5ed158d1f)
Send the fake warp coordinates when emulating warps with relative mode to ensure that it appears that the cursor is always reset to where the application expects it to be.
Fixes cases where games can continue moving the camera if the mouse is lifted during motion.
(cherry picked from commit 8fcbf972c6)
Cursor visibility in the SDL input layer only reflects whether ShowCursor/HideCursor was called. In the case of relative mode, the cursor can be hidden, but the SDL_Mouse visibility flag will be true.
Track cursor visibility separately in the X11 driver. Fixes the cursor becoming visible when using the warping relative mode with XWayland.
(cherry picked from commit b0713a7d30)
(cherry picked from commit 5b57573439)
- Begining of device ID with 0 violates the SDL's specification that means the 0 is an error, invalid, failure, etc. But on Vita here it's an actual device...
- Replacing 0 and 1 with 1 and 2 to resolve this violation.
(cherry picked from commit dd6c663918)
* Removed window movement to left top corner that breaks secondary screens on KMSDRM
(cherry picked from commit ce98550cbb)
(cherry picked from commit 586a2dc721)
The structure of the existing loop makes the inner loop of the previous commit unnecessary.
Manual backport of 558630d59c
(cherry picked from commit 62f35ab1b6)
This prevents continuing a rumble after the first one fails, and fixes a long standing crash issue if rumble is started immediately before the controller is disconnected.
Thanks to @AntTheAlchemist for the key bug report that showed what was happening here.
Fixes https://github.com/libsdl-org/SDL/issues/10422
(cherry picked from commit 0a924b185d)
(cherry picked from commit 7fdf794377)