Log

Author Commit Date CI Message
Ozkan Sezer 4c96faee 2020-11-23T20:37:10 remove non-existing tslib support from autofoo and cmake
Sam Lantinga a94fe009 2020-11-21T18:40:27 Moved comment with the code it covers
Sam Lantinga 49f7be6d 2020-11-21T18:37:56 Fixed compile warning C4127: conditional expression is constant
Sam Lantinga 63b52e8e 2020-11-21T18:34:32 Remove SDL dependency in Windows code
Sam Lantinga d4954eb0 2020-11-21T18:26:43 Removed debug code
Sam Lantinga b442e617 2020-11-21T18:15:55 Fixed adding an extra zero byte for feature reports At least with PS4 and PS5 controllers DeviceIoControl() returns the correct value
Sam Lantinga 75721b19 2020-11-21T18:01:23 Allow testing effects on PS4 controllers Note, this will switch the controller into advanced report mode which breaks DirectInput on Windows
Sam Lantinga 2e8e3854 2020-11-21T17:59:15 Fixed compile warning
Sam Lantinga fd894467 2020-11-21T14:13:26 Fixed building on Mac OS X on the command line and with an older macOS SDK
Sam Lantinga 1df593fb 2020-11-21T13:15:33 Fixed bug 5355 - Add GameController Framework support to macOS C.W. Betts This patch adds support to the GameController framework on macOS Big Sur and later, adding support for MFi controllers as well as rumble support for PS4 and Xbox One. There is some code to make sure that the IOKit joystick handler doesn't include two controllers at once. While the GameController framework is present in earlier versions of macOS, there was no public, approved way of checking if a specific IOHIDDevice is a controller that GameController could handle. This was changed in Big Sur.
Sam Lantinga 5e0644c1 2020-11-21T12:55:56 Disable libusb by default, as it breaks on Linux when trying to use it with non-root permissions on some distributions
Sam Lantinga 870841c4 2020-11-21T11:59:01 Reset the LED state after Bluetooth connection has completed on the PS5 controller
Sam Lantinga 120dc280 2020-11-21T11:25:26 Enable HIDAPI by default
Sam Lantinga 6b56b98f 2020-11-21T09:26:11 Fixed is_BLE() return value
Sam Lantinga 65c9f1d2 2020-11-21T09:06:48 Fixed upstream bug: FD 0 is a valid file descriptor https://github.com/libusb/hidapi/issues/199
Sam Lantinga 549010f2 2020-11-20T13:24:49 It takes 2 packets to stop audio haptics and start emulated rumble on the PS5 controller
Ozkan Sezer 082558db 2020-11-20T12:20:02 SDL_os2messagebox.c (_makeDlg): fix crash if title and/or message is NULL. c.f.: bug #5253.
Sam Lantinga bf7d198d 2020-11-19T19:09:42 The HORI Fighting Commander should only show up as an XInput Switch Controller on Windows
Sam Lantinga 6cb7f9e3 2020-11-19T19:09:40 Respect SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS for Nintendo Switch Pro controllers using the HIDAPI driver
Sam Lantinga 99807665 2020-11-19T19:09:38 Respect SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS for the Nintendo Switch Pro controller on Linux
Sam Lantinga 7366693f 2020-11-19T19:09:36 Added support for a few more controllers on Linux
Sam Lantinga ffb4d960 2020-11-19T19:09:34 Disabled Xbox protocol debugging
Sam Lantinga c9b097e6 2020-11-19T13:31:16 Clarify the meaning of the rumble enable bits for the PS5 controller
Sam Lantinga c85623d7 2020-11-19T13:10:14 Re-enable haptic audio after rumble on PS5 controller Also make sure we don't set any other state when we're not intending to, and added more interesting effects which are currently not exposed via API
Sam Lantinga b0b76a61 2020-11-19T07:12:53 Fixed rumble on PS5 controllers connected to Windows over Bluetooth
Sam Lantinga 8c3196da 2020-11-18T21:33:11 Fixed some compiler warnings
Sam Lantinga 45f14375 2020-11-18T20:34:12 Experimenting with requesting the serial number on an Xbox One controller
Sam Lantinga 963d8b3f 2020-11-18T20:34:10 Fixed bits in the initial Xbox One protocol ack
Sam Lantinga cd51a51f 2020-11-18T20:34:08 Updated with a better understanding of the Xbox One controller protocol
Ryan C. Gordon 335cfa10 2020-11-18T11:24:08 x11: Don't crash if a messagebox has a NULL title string. Fixes Bugzilla #5253.
Sam Lantinga 51ea6a6d 2020-11-17T22:09:52 Don't send controller gyro and accelerometer updates if the values haven't changed. This keeps SDL_PollEvent() from returning data continuously when polling controller state.
Sam Lantinga 463d84a8 2020-11-17T10:56:56 Added support for the PS5 controller gyro and accelerometer
Sam Lantinga fcb21aa8 2020-11-17T10:30:20 Added API for sensors on game controllers Added support for the PS4 controller gyro and accelerometer on iOS and HIDAPI drivers Also fixed an issue with the accelerometer on iOS having inverted axes
Sam Lantinga b79e1baa 2020-11-17T10:29:36 Added weak linking to hidapi framework Also added testsensor to the test project
Sam Lantinga 0150455d 2020-11-16T17:42:04 Added SDL_crc32.c to the Windows RT projects
Sam Lantinga d140d887 2020-11-16T17:36:47 Added SDL_JoystickGetSerial() and SDL_GameControllerGetSerial()
Ryan C. Gordon 55e59a4f 2020-11-16T18:48:13 crc32: Fixed include path.
Ozkan Sezer dfc24e05 2020-11-17T02:39:56 fix os/2 build
Sam Lantinga 7bbea0bb 2020-11-16T15:10:02 Fixed build warning
Sam Lantinga 71e32f5e 2020-11-16T15:00:15 Added SDL_crc32()
Sam Lantinga 3d48fc05 2020-11-16T13:21:02 Added notes about the pad lights on the PS5 controller
Sam Lantinga 4514ad57 2020-11-16T13:07:11 Fixed updating LED state when starting application with Bluetooth PS5 controller connected
Sam Lantinga a37e3ae2 2020-11-16T11:21:58 Implemented PS5 effects over Bluetooth
Sam Lantinga c6c116e8 2020-11-16T10:51:13 Implemented setting the LED color on the PS5 controller
Sam Lantinga fe4da420 2020-11-16T10:39:44 Improve LED color calculation, don't set LED unless left thumbstick is moved
Sam Lantinga aa7c3eae 2020-11-16T09:16:01 Fixed size of rumble packet
Sam Lantinga f28c01a4 2020-11-16T09:11:15 Fixed rumble order on PS5
Sam Lantinga eb94c19a 2020-11-16T08:09:15 SDL: fix iOS build
Sam Lantinga 8243bd1d 2020-11-16T08:09:13 SDL: Plumb PS5 rumble to output report
Ozkan Sezer c0f7325b 2020-11-15T17:10:15 SDL_PrivateJoystickForceRecentering: fix wrong loop counter usage. The typo seems to have been added by commit c7782fd6142b
Brian Kubisiak 1ed36d21 2020-11-15T04:10:02 egl: Fix detection in configure script on systems without X11 (bug #5270) In recent versions of EGL headers on Linux, the MESA_EGL_NO_X11_HEADERS macro is deprecated and has been replaced with EGL_NO_X11. As a result, the configure script would fail the compilation check for EGL headers and disable EGL (and by extension, Wayland) support when X11 headers are not installed. Fix this by adding the correct macro to disable X11 support in the headers.
Ozkan Sezer bbbec723 2020-11-14T14:03:40 SDL_config_windows.h: define HAVE_TRUNC[F] for Visual Studio >= 2013
Ozkan Sezer 3e40b87f 2020-11-14T14:03:40 SDL_config_os2.h: undefine HAVE_TRUNC trunc() exists only in OpenWatcom 2.0 fork, and its implementation already is the same as the fallback we have here..
Ryan C. Gordon bee8db3b 2020-11-14T02:16:41 config: Make sure HAVE_TRUNC and HAVE_TRUNCF are defined as appropriate. The configure/cmake scripts were checking for these functions but we didn't have the SDL_config.h.* pieces in place. The other config headers are best guesses.
Sam Lantinga 5c34c973 2020-11-13T19:40:25 Clarify that we're using button indices, not using gamepad button names
Sam Lantinga 9f51fad3 2020-11-13T18:01:29 Added support for the touchpad on PS4 and PS5 controllers
Sam Lantinga 78422fa3 2020-11-13T13:17:07 Added more detail on the PS5 controller state packet and enable full reports over Bluetooth
Sam Lantinga 30371f2d 2020-11-13T13:17:04 Fixed doubled report ID for Bluetooth Classic devices on Linux
Sam Lantinga 8cd4f364 2020-11-12T20:02:31 Mapped the touchpad click as SDL_CONTROLLER_BUTTON_MISC1 on the PS5 controller
Sam Lantinga 8e312a6a 2020-11-12T15:56:33 Fixed detecting Bluetooth XInput controllers on Windows
Sam Lantinga 8b29aadd 2020-11-12T14:34:11 Fixed warning when building on Windows
Sam Lantinga e0018d08 2020-11-12T14:23:56 Fixed Windows build
Sam Lantinga 0500c044 2020-11-12T07:53:05 Fix SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL also applying to HIGH priorities As the name suggests, the hint should only apply to SDL_THREAD_PRIORITY_TIME_CRITICAL The resulting priorities for my current distro result in these values: | High | Time Critical Hint |--------------|----------------- 0 | P=10 N=-10 | P=5 N=-15 1 | P=10 N=-10 | P=-21 N=0
Sam Lantinga 5b0d4329 2020-11-12T07:53:03 Implemented trigger rumble in the HIDAPI Xbox One driver
Sam Lantinga e749c126 2020-11-12T07:53:01 Fixed overflow in trigger rumble calculation
Ozkan Sezer 52486d01 2020-11-12T15:10:00 SDL_keycode.h (SDL_Keymod): remove comma at end of enumerator list
Ozkan Sezer c122e9b9 2020-11-12T14:11:50 linux/SDL_sysjoystick.c (MaybeRemoveDevice): remove SDL_USE_LIBUDEV guards fixes bug #5349.
Ozkan Sezer 94a047f7 2020-11-12T14:11:40 fix xcode project file permissions
Sam Lantinga 83b653d5 2020-11-11T20:09:56 Fixed build warning
Sam Lantinga dc764496 2020-11-11T19:53:10 Backed out change for bug 5335 - enable joystick/haptic/evdev support by default on FreeBSD Building on FreeBSD fails: /buildbot/worker/SDL/sdl-freebsd-amd64/src/src/joystick/linux/SDL_sysjoystick.c:26:2: error: SDL now requires a Linux 2.4+ kernel with /dev/input/event support. #error SDL now requires a Linux 2.4+ kernel with /dev/input/event support. ^ /buildbot/worker/SDL/sdl-freebsd-amd64/src/src/joystick/linux/SDL_sysjoystick.c:35:10: fatal error: 'sys/inotify.h' file not found #include <sys/inotify.h> ^~~~~~~~~~~~~~~
Sam Lantinga 76bd6cd2 2020-11-11T19:45:56 Fixed bug 5326 - Logitech Extreme 3D joystick is listed as gamepad in linux section of SDL_gamecontrollerdb.h Spooky For some reason the Logitech Extreme 3D joystick was added to SDL_gamecontrollerdb.h in the linux section only. This breaks the joystick in linux as it is not a gamepad. I am unable to correctly use or map the Logitech Exteme 3D joystick in games that use SDL2 in linux. Please remove Logitech Extreme 3D from SDL_gamecontrollerdb.h Linux section. It is a joystick not a gamepad.
Sam Lantinga 3160c7d6 2020-11-11T19:43:02 Fixed bug 5327 - When direct input fails to load, but a controlller is plugged in through another api, an access violation happens. Bart van der Werf When directinput fails to load, but a controlller is plugged in, an access violation happens. This is due to IEventHandler_CRawGameControllerVtbl_InvokeAdded calling SDL_DINPUT_JoystickPresent which does not check if dinput is assigned signalling initialization of directinput.
Sam Lantinga 502cfe31 2020-11-11T19:39:46 Fixed bug 5332 - WGI: Fix wrong level of indirection and implicit truncating cast. Joel Linn This fixes two types of MSVC compiler warnings. - One parameter in the function signatures of two WGI event handlers had one level of indirection too much (and did not match Windows SDK headers). The indirection was cast away so it still worked. - size_t was implicitly cast to UINT32 for a number of (constant) string lengths.
Sam Lantinga 1822f97e 2020-11-11T19:37:47 Fixed bug 5346 - Add FreeBSD evdev KBIO keyboard input driver wahil1976 This patch adds the KBIO text input driver for FreeBSD, which allows text input to fully work without text spilling out into the console. It also supports accented input, AltGr keys and Alt Lock combinations. Tested with US accent keys layout and various AltGr layouts.
Sam Lantinga 38ed8a95 2020-11-11T19:31:03 Fixed bug 5335 - enable joystick/haptic/evdev support by default on FreeBSD Alex S ...which allows SDL to talk to webcamd/iichid. (Webcamd actually bundles quite a few gamepad drivers.) Note that this does _not_ disable usbhid, both joystick backends will be compiled.
Sam Lantinga 320a7587 2020-11-11T19:26:59 Fixed compiler warnings
Simon McVittie 65847539 2020-11-11T19:15:43 test: Add a unit test for input device classification heuristics This uses pre-recorded evdev capabilities, so that we can check for regressions without the devices having to be physically present. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie b0eba1c5 2020-11-11T19:15:32 joystick: Use inotify to detect joystick unplug if not using udev This improves SDL's ability to detect joystick hotplug in a container environment. We cannot reliably receive events from udev in a container, because they are delivered as netlink events, which are authenticated by their uid being 0. However, in a user namespace created by an unprivileged user (for example bubblewrap, as used by Flatpak and Steam's pressure-vessel-wrap), the kernel does not allow us to map uid 0, and the netlink events appear to be from the kernel's overflowuid (typically 65534/nobody), meaning libudev cannot distinguish between genuine uevents from udevd and an attack by a malicious local user. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie aae53d59 2020-11-11T19:15:09 evdev: Detect whether input devices are accelerometers Anything with X, Y and Z axes but no buttons is probably an accelerometer (this is the assumption made in udev). Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie fdd945f2 2020-11-11T19:14:52 joystick: Use a better heuristic to guess what is a joystick Previously we only checked for at least one button or key and at least the X and Y absolute axes, but this has both false positives and false negatives. Graphics tablets, trackpads and touchscreens all have buttons and absolute X and Y axes, but we don't want to detect those as joysticks. On normal Linux systems ordinary users do not have access to these device nodes, but members of the 'input' group do. Conversely, some game controllers only have digital buttons and no analogue axes (the Nintendo Wiimote is an example), and some have axes and no buttons (steering wheels or flight simulator rudders might not have buttons). Use the more elaborate heuristic factored out from SDL's udev code path to handle these cases. In an ideal world we could use exactly the same heuristic as udev's input_id builtin, but that isn't under a suitable license for inclusion in SDL, so we have to use a parallel implementation of something vaguely similar. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 8db3171b 2020-11-11T19:14:34 udev: Factor out SDL_EVDEV_GuessDeviceClass This works on capability bitfields that can either come from udev or from ioctls, so it is equally applicable to both udev and non-udev input device detection. Signed-off-by: Simon McVittie <smcv@collabora.com>
Simon McVittie 13e7d1a9 2020-11-11T19:14:11 joystick: Allow libudev to be disabled at runtime Device enumeration via libudev can fail in a container for two reasons: * the netlink protocol between udevd and libudev is considered private, so there is no API guarantee that the version of libudev in a container will understand netlink messages from a dissimilar version of udevd on the host system; * the netlink protocol between udevd and libudev relies for security on being able to check the uid of each message, but in a container with a user namespace where host uid 0 is not mapped, the libudev client cannot distinguish between messages from host uid 0 and messages from a different, malicious user on the host To make this easier to experiment with, always compile the fallback code path even if libudev is disabled. libudev remains the default if enabled at compile time, but the fallback code path can be forced. Signed-off-by: Simon McVittie <smcv@collabora.com>
Sam Lantinga 1e2caac5 2020-11-11T18:57:37 Added SDL_JoystickRumbleTriggers() and SDL_GameControllerRumbleTriggers()
Sam Lantinga b6238c87 2020-11-11T14:48:23 Don't try to build the RAWINPUT driver if HIDAPI is disabled
Sam Lantinga d1e10c31 2020-11-11T14:38:14 Removed debug output
Sam Lantinga 07eae7d6 2020-11-11T08:47:18 Fix process randomly getting killed when SDL_THREAD_PRIORITY_HIGH/TIME_CRITICAL is set When we request realtime priority from rtkit, we have a rttime limit. If we exceed that limit, the kernel will send SIGKILL to the process to terminate it. This isn't something that most high priority processes will want, only processes that selectively opt into SCHED_RR/FIFO through SDL_HINT_THREAD_PRIORITY_POLICY should be subject to this level of scrutiny. This change: * Switches non-apple posix OSs to use SCHED_OTHER instead of SCHED_RR for SDL_THREAD_PRIORITY_HIGH/SDL_THREAD_PRIORITY_TIME_CRITICAL. * Fixes using a hardcoded RLIMIT_RTTIME, instead queries it from rtkit * Only sets RLIMIT_RTTIME for MakeRealtime rtkit requests * Adds a note regarding the possible SIGKILL with SDL_HINT_THREAD_PRIORITY_POLICY * Introduces SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL to allow apps to acquire realtime scheduling policies on Linux
John "Nielk1" Klein 067630ae 2020-11-11T03:47:08 Fix hidapi for unhandled DS4 headset microphone data corrupting controller state
Ozkan Sezer 59795822 2020-11-11T12:33:55 make SDL_SensorGetDeviceNonPortableType match its prototype.
Ozkan Sezer 53b16679 2020-11-11T12:33:55 SIZE_MAX need not be defined in limits.h it can be in limits.h (windows) or stdint.h.
Sam Lantinga e12457d8 2020-11-10T12:26:30 Added support for the Xbox Series X controller to the HIDAPI driver
Ryan C. Gordon 7b5a0a9f 2020-11-10T13:12:10 uikit: Don't implement main() twice for iOS static libs. I think this was a leftover from before the two Xcode projects were merged.
Ryan C. Gordon 940419b0 2020-11-10T13:09:59 uikit: Fixed a typo in a comment.
Sam Lantinga c3dea231 2020-11-09T22:39:33 Added support for reading the paddles on a Xbox Elite Series 2 controller in Bluetooth mode
Dylan Fan 02de8200 2020-11-09T20:36:35 Add Zhaoxin processor support CPU Vendor ID "Shanghai" and "CentaurHauls" belongs to Zhaoxin. Background: Shanghai Zhaoxin Semiconductor Co., Ltd ("Zhaoxin") , established in 2013, headquartered in Zhangjiang, Shanghai, China. Zhaoxin aims at providing general-purpose x86 processors. Related Zhaoxin Linux Kernel patch can be found at https://lore.kernel.org/lkml/01042674b2f741b2aed1f797359bdffb@zhaoxin.com Best regards.
Sam Lantinga fb4a406a 2020-11-09T18:45:22 Don't put 'm' in the GUID for Xbox and PS4 controllers on iOS
Sam Lantinga f656d845 2020-11-09T10:29:10 Fixed typo in the documentation
Sam Lantinga f8b8bd0b 2020-11-09T10:12:02 ControllerList: recategorize controller as swtich pro and not switch input-only controller
Sam Lantinga f76ca057 2020-11-09T10:11:59 ControllerList: add unknown xbox controller from minidumps
Sam Lantinga 94924f01 2020-11-09T10:11:55 Fix failing to set high priority for threads on Linux desktop. Debugging inside rtkit showed we were failing the RLIMIT_RTTIME check, now that we're asking for realtime and not just high-priority due to a change in SDL. Between that and the DBus code in SDL being wrong in previous changelist I'm not sure how this could have ever worked.
Sam Lantinga abf9dfd5 2020-11-09T10:11:38 Fix MakeThreadRealtime DBus method call on Linux, type mismatch due to copy paste. Nov 02 20:34:15 redcore rtkit-daemon[2825]: Failed to parse MakeThreadRealtime() method call: Argument 1 is specified to be of type "uint32", but is actually of type "int32" Nov 02 20:34:15 redcore rtkit-daemon[2825]: Failed to parse MakeThreadRealtime() method call: Argument 1 is specified to be of type "uint32", but is actually of type "int32" Docs: http://git.0pointer.net/rtkit.git/tree/README CLIENTS: To be able to make use of realtime scheduling clients may request so with a small D-Bus interface that is accessible on the interface org.freedesktop.RealtimeKit1 as object /org/freedesktop/RealtimeKit1 on the service org.freedesktop.RealtimeKit1: void MakeThreadRealtime(u64 thread_id, u32 priority); void MakeThreadHighPriority(u64 thread_id, s32 priority);