When cross-compiling, pkg.m4 will set the PKG_CONFIG variable
to a suitable pkg-config executable, which might be a
host-architecture-prefixed name like aarch64-linux-gnu-pkg-config. This
ensures that we will use a suitable search path that is suitable for
the host architecture (the machine we are compiling for) rather than
the build architecture (the machine we are compiling on) to find
dependency libraries like SDL. When using pkg-config as a substitute
for sdl2-config, we will similarly need to use the
host-architecture-prefixed pkg-config.
Setting the PKG_CONFIG environment variable is also the canonical way to
request that a different pkg-config implementation be used, if that
becomes necessary for some reason.
Co-authored-by: Helmut Grohne <helmut@subdivi.de>
Bug-Debian: https://bugs.debian.org/1059749
Signed-off-by: Simon McVittie <smcv@collabora.com>
The udev container issue is mostly to do with device notifications
and netlink. The device classification stuff just pokes file in /sys
and /run/udev. Doesn't hurt to try it first for classifying joysticks
and then fall to the guess heuristics if it fails.
This allows the most information possible for the CRC string, which is used to differentiate controllers with the same VID/PID.
Fixes https://github.com/libsdl-org/SDL/issues/8724
(cherry picked from commit 1f1ee6f77c492e17a9691c367110c11529fab3fb)
Added support for getting the real controller info, as well as the function SDL_GameControllerGetSteamHandle() to get the Steam Input API handle, from the virtual gamepads provided by Steam.
Also added an event SDL_CONTROLLERSTEAMHANDLEUPDATED which is triggered when a controller's API handle changes, e.g. the controllers were reassigned slots in the Steam UI.
(cherry picked from commit c981a597dc7c69e7532796b3a206071807479d35)
XInputGetCapabilitiesEx (ordinal 108) is available in XInput 1.4 that is shipped with Windows 8 and newer.
(cherry picked from commit 08a7ca4d53ef0d504ec780936fd65616fe3a9f09)
Compositors may switch from mouse to touch mode when a touch event is received, causing a pointer leave event and subsequent loss of mouse focus.
Don't relinquish mouse focus on surfaces with active touch events. If there are active touch events when pointer focus is lost, the keyboard focus is used as a fallback for relinquishing mouse focus: if, in this case, the keyboard focus is then lost and there are no active touches, mouse focus is lost, and if all touches are raised and there is no keyboard or pointer focus, then the window loses mouse focus.
(cherry picked from commit 21879faf4815a6acdb29e290d51a15bbe4dae03e)
Changes to the SDL3 video system required some changes to the test suite since the video system always reports the true window size and position.
While SDL2 doesn't directly require these changes, they are needed for SDL2-Compat and committed here to keep the two test suites in sync.