We are guaranteed that the lock will be held during shutdown, so if we are in InvokeRemoved(), it's because we're shutting down controllers and need to remove them from our internal list.
Fixes https://github.com/libsdl-org/SDL/issues/7016
(cherry picked from commit ac99db9fc8d528a79abb98a5641e0fd94aa20a9e)
(cherry picked from commit ebc2fb411f178c806119b57ae3c18553d7391a13)
Some of them lock up or reset, and the vast majority of devices are not actually game controllers.
Fixes https://github.com/libsdl-org/SDL/issues/6733
(cherry picked from commit 83b29f9ce1fe6caa06769544c3b5f6c10ea97a0f)
While 78f97108f9 reduced the accumulation error, it was still big enough to cause distortions.
Fixes#6196.
(cherry picked from commit 8145212103264b04c20cdb50b430f3c99b44e9b4)
Explicitly include the Wayland protocol headers when statically linking against the Wayland libraries or older system headers might be used instead of the local versions.
(cherry picked from commit 836eb224428aca3bdab2a6bf56d347262e475b15)
The typedef seems to be pulled in coincidentally with newer SDKs, but
older ones need to import the header explicitly.
(cherry picked from commit d2910904fb4062c313636c7595e971f1bf248075)
We don't want the G29 to show up as a gamepad, Steam will create a virtual Xbox controller for it, which breaks racing games.
(cherry picked from commit dce6ed56d72b436f15c044b05097ddebbc166701)
This reverts commit 33a68f575f.
We don't want the G29 to show up as a gamepad, Steam will create a virtual Xbox controller for it, which breaks racing games.
(cherry picked from commit e3d430b83eb7c754c789fb23184feb745c2b99a8)
When changing the window state from non-floating to floating (e.g. leaving fullscreen), libdecor can send bogus content sizes that are +/- the height of the window title bar and start 'walking' the window height in one direction or the other with every transition.
The floating window size is known, so use the cached value instead of the size reported by libdecor when restoring the floating state.
Some applications (and embarrassingly, testime is one of them) call
SDL_StartTextInput() or SDL_SetTextInputRect() every frame. On KDE/KWin
with fcitx5, this causes there to be several preedit events every frame
(particularly given some of the workarounds in Wayland_StartTextInput),
which slows testime down to an unusable crawl.
Instead, make SDL_StartTextInput() a no-op if text input is already
enabled, and cache the input rect, only changing it when the new rect is
actually different.
With these changes, we only get preedit events (and hence
SDL_TEXTEDITING events) when the preedit string actually changes. This
matches the behaviour under XWayland, and works very smoothly.
This needs to check what our deployment target is, not what SDK
is available, since this is a linker symbol and not an enum
value or whatever.
Also removed a copy/paste error that mentioned CoreAudio in
the haptic subsystem.
Fixes#6534.