Log

Author Commit Date CI Message
Sam Lantinga c9723c40 2020-12-07T09:38:21 Fixed potential hang in joystick close if the rumble thread is blocked for some reason It's still possible to hang when shutting down, if the rumble thread is still hung, but it won't block indefinitely at runtime.
Sam Lantinga 3c68051e 2020-12-04T15:47:28 Allow background input when testing game controllers
Sam Lantinga 09909d02 2020-12-03T19:44:47 Fixed handling of BACK button on newer Xbox One S controllers
Sam Lantinga 54e5136b 2020-12-03T18:17:04 Refactored Xbox One Bluetooth protocol and verified Xbox One S, Xbox Series X, and Xbox One Elite Series 2 controllers
Sam Lantinga 1031231b 2020-12-03T18:17:03 Fixed duplicating a device between XInput and HIDAPI
Sam Lantinga 59f28b7f 2020-12-03T18:17:01 Fixed whitespace
Sam Lantinga f487d63a 2020-12-03T18:16:56 Fixed crash when printing NULL wide character string
Sylvain Becker 754286c6 2020-12-02T13:45:24 SDL Renderer: specify the correct flag when recreating the window
Sylvain Becker 035f8f23 2020-12-02T13:37:59 SDL_RecreateWindow: allow clearing VULKAN when recreating the window
Sylvain Becker 93fbab0f 2020-12-02T11:04:53 SDL_ReCreateWindow: allow to unload METAL window and switch back to OpenGL. On older mac, where METAL Renderer METAL fails to create, it allows to switch back to OpenGL SDL_Renderer by re-creating the window (METAL flags was previously persistent).
Sam Lantinga 7854f43b 2020-12-01T14:43:15 Disable SDL_JOYSTICK_HIDAPI on iOS and tvOS by default It's only needed for Steam Controller support, and introduces a Bluetooth framework dependency which requires additional permissions on the App Store.
Sam Lantinga ebf315e0 2020-12-01T14:01:12 Fixed bug 5369 - iOS static library build copies public headers files into xcode archive Dominik Reichardt Trying to integrate the latest SDL2 changes into our iOS project of Exult I've stumbled over the fact that when I added the static iOS library the public header files were copied to the archive of our project when you let Xcode build the archive. This makes the archive invalid for upload to the AppStore Connect. To fix this you need to delete the public headers from the build phase: Open the xcode project, select the target "Static Library-ios", got to build phases, and in "headers" delete all the headers in the "public" group. This is safe to do as this actually just copies the public headers for some odd counterintuitive reason. I think this needs to be done for all the library build targets but likely not for the framework targets.
Sam Lantinga 4b35a18d 2020-12-01T13:50:42 Fixed bug 5366 - cmake build doesn't detect Metal on macOS Tom Seddon This is as of commit 50d804ea729accf9e3a9ce83238d0a2976a17545 from https://github.com/SDL-mirror/SDL, which is HEAD as I write (apologies, not confident with Mercurial) # Config macOS: 10.14.6 (18G6042) cmake --version: cmake version 3.16.20200101-g23e782c clang --version: Apple clang version 11.0.0 (clang-1100.0.33.17) Xcode version: Version 11.3.1 (11C504) # Repro steps Run the following commands in the shell. cd /tmp/ git clone https://github.com/SDL-mirror/SDL mkdir build.SDL cd build.SDL cmake -G ../SDL/ Examine cmake output. # Expected result Metal is detected. # Actual result It appears that Metal is not detected! Note this line in the summary: -- RENDER_METAL (Wanted: 0): OFF # Fix Change check_c_source_compiles to check_objc_source_compiles. The cmake script tries to add -ObjC to the clang command line, but, for whatever reason, this doesn't seem to work. Change the test source to have an empty main. The "return 0;" line seems to confuse cmake somehow, causing it to crap out with an error about HAVE_FRAMEWORK_METAL being an unknown argument. (Maybe I'm just dense, but it's not obvious to me what the problem is here.) With these two changes: -- RENDER_METAL (Wanted: ON): ON Patch attached.
Sam Lantinga 798b2288 2020-12-01T13:46:34 Fixed bug 5367 - SDL_OpenUrl disabled on iOS due to unified Xcode project file Dominik Reichardt When you unified the Xcode project file you forgot to add the iOS file (/src/misc/ios/SDL_sysurl.m) to the project file, so the dummy in that folder takes over and the call does not work. Relevant commits: http://hg.libsdl.org/SDL/rev/c86bbf75f55e (SDL_OpenUrl enabled for macOS/iOS) http://hg.libsdl.org/SDL/rev/282c3dc1cf65 (and following: unified Xcode project files) Adding an ios group in the misc group of the project file and then adding /src/misc/ios/SDL_sysurl.m to it fixes the problem.
Sam Lantinga c78ca2d1 2020-12-01T13:38:42 Fixed bug 5371 - Rawinput: Fix truncating cast of string length. Joel Linn Fixes an implicit truncation of a string length on 64bit systems.
Sam Lantinga a3ccf9ad 2020-12-01T13:36:41 Fixed bug 5373 - [PATCH] Rawinput: Get correlated XInput battery info Joel Linn Currently the rawinput driver always reports a device as "wired". This changes that to "unknown" and updates it once the device is correlated with xinput.
Sam Lantinga e3966e25 2020-11-30T13:04:30 Use the correct internal API for updating the battery level for PS5 controllers
Sam Lantinga f4ed07de 2020-11-30T13:02:34 We don't know whether the PS5 controller is Bluetooth or not when we open it
Sam Lantinga 04f0fd13 2020-11-27T18:57:42 Remember to close the game controller when we're done with it
Sam Lantinga 1f2f536b 2020-11-27T18:57:40 Fixed XInput correlation for raw input controllers after hotplug events
Sam Lantinga 012471e9 2020-11-27T18:57:38 Open and test all connected controllers
Sam Lantinga 1c865c46 2020-11-27T18:57:36 Load the raw input device list at init time so it's available when DirectInput is doing device detection
Sam Lantinga a0c5bfa3 2020-11-27T13:08:40 Moved raw input event processing from the main thread to the joystick thread This allows fast joystick event delivery regardless of what the main thread is doing.
Sam Lantinga 4fbefbe2 2020-11-27T11:33:53 Sort the raw input axes by usage, so X comes before Y, etc.
Sam Lantinga 4ddac485 2020-11-27T11:33:51 Backed out minor optimization that prevented correlation_id from being set
Sam Lantinga 8973a258 2020-11-27T10:44:56 Enable dispatching of WM_INPUT_DEVICE_CHANGE events directly, in case the application hasn't created a window with the normal message loop
Sam Lantinga e8adc648 2020-11-27T10:44:55 Enable dispatching of WM_INPUT events directly, in case the application hasn't created a window with the normal message loop
Sam Lantinga 0252235e 2020-11-27T10:44:53 Recheck devices if another API queries raw input for a new device
Sam Lantinga a7dede7e 2020-11-27T10:44:51 Re-enable axis correlation for raw input controllers, for twin stick shooters that don't need face buttons
Sam Lantinga ce77966d 2020-11-27T10:44:49 Fixed RAWINPUT_IsDevicePresent() not returning TRUE for Xbox One controllers
Sam Lantinga 8a449de2 2020-11-27T10:44:47 Fixed Xbox 360 wireless controller being picked up by WGI when it's being managed by RAWINPUT
Sam Lantinga 37c9e4af 2020-11-27T06:03:15 Fixed processing WM_INPUT_DEVICE_CHANGE at startup
Sam Lantinga 248fc75b 2020-11-27T05:53:56 Correlate just based on buttons, joystick axes are not as precise and could potentially cause incorrect uncorrelation. It's okay if the triggers aren't precise until someone presses a button on their controller.
Sam Lantinga e7e615de 2020-11-27T05:53:54 Removed extraneous windows message pumping Most of the raw input events are dispatched in the main windows message loop. We only dispatch device change messages separately when we need them to be completely up to date.
Sam Lantinga 2931eccd 2020-11-27T05:53:52 Fixed detecting Bluetooth raw input devices, which have device names longer than 128 characters
Sam Lantinga 849ce803 2020-11-27T05:53:50 Renamed SDL_JOYSTICK_RAWINPUT_GAMING_INPUT to SDL_JOYSTICK_RAWINPUT_WGI
Sam Lantinga 219a28dd 2020-11-27T03:45:05 Fixed D-pad uncorrelating raw input controllers (thanks Jimbly!)
Sylvain Becker 2c079a2f 2020-11-27T09:42:14 SDL_FillRects: prevent empty SDL_surface from raising an error message It's legitimate to have a surface with 0 width or height (null 'pixels' pointer). But calling SDL_FillRects would wrongly set the error "You must lock the surface".
Ozkan Sezer 3fbff2a4 2020-11-26T10:47:33 SDL_rawinputjoystick.c: fix ambiguous 'else' warning src/joystick/windows/SDL_rawinputjoystick.c: In function 'RAWINPUT_HandleStatePacket': src/joystick/windows/SDL_rawinputjoystick.c:1343:9: warning: suggest explicit braces to avoid ambiguous 'else'
Sam Lantinga 845b9033 2020-11-25T16:46:42 Implemented trigger rumble for raw input controllers
Sam Lantinga 517be808 2020-11-25T16:05:19 Implemented battery status for Bluetooth Xbox One controllers Also switched the rumble loop count to 0xEB (one hour) to match Windows driver
Sam Lantinga 24cc0012 2020-11-25T16:05:15 Some controllers don't always reset their triggers to zero when they are released (e.g. Xbox One S in Bluetooth mode), so only trigger rumble if the trigger is pulled halfway or more.
Sam Lantinga 6a7f29cd 2020-11-25T11:31:17 Fixed compiling on tvOS
Sam Lantinga 9ec2cf56 2020-11-25T10:31:59 Fixed building with Windows.Gaming.Input enabled
Sam Lantinga 3c07dd12 2020-11-25T10:28:48 Strip an extra '.' off of the HORI manufacturer name
Ozkan Sezer e5783e11 2020-11-25T14:51:56 cmake: add missing checks for wcscasecmp, _wcsicmp, wcsncasecmp, _wcsnicmp
Ozkan Sezer 7c18088f 2020-11-25T14:51:56 SDL_config_os2.h: define HAVE__WCSICMP and HAVE__WCSNICMP
Sam Lantinga 159d1b3d 2020-11-25T01:35:45 Don't set the serial number after the controller is opened We'll use the USB value instead so it's available as soon as it's opened.
Sam Lantinga 7d92b14f 2020-11-25T01:18:18 Simplified Xbox One controller initialization state, and don't query for the serial number.
Sam Lantinga 9fc4a4c9 2020-11-24T22:25:26 Revamped Xbox One HIDAPI init sequence Added support for querying the controller serial number on newer firmware
Sam Lantinga e16afa79 2020-11-24T16:38:49 Automatically switch to testing a new controller when it's plugged in
Sam Lantinga 46a84478 2020-11-24T12:43:01 Added SDL_wcscasecmp() and SDL_wcsncasecmp()
Sam Lantinga e4b7d9a2 2020-11-24T07:56:59 Removed usage of TARGET_OS_OSX for building with older SDKs
Sam Lantinga 16d789fb 2020-11-24T07:30:39 Disable compiler warning when using -fobjc-weak building C code
Sam Lantinga a5cde4cb 2020-11-24T07:29:55 Fixed trying to use @available() on older SDK
Sam Lantinga b4338dda 2020-11-24T07:22:29 Enable -fobjc-weak when building MFI controller code
Sam Lantinga 97782e6c 2020-11-24T07:11:49 Don't try to call IOS_SupportedHIDDevice() if it's not defined
Sam Lantinga a063b9fb 2020-11-24T07:06:31 Fixed compiler warning
Sam Lantinga c63bbb06 2020-11-24T06:55:33 Including SDL_config_iphoneos.h enables MFI controller code
Sam Lantinga eba069ea 2020-11-24T06:53:48 It looks like the Objective C support needed to build MFI controller code is in 10.8
Sam Lantinga 7a05dbf4 2020-11-24T06:42:53 Fixed building on FreeBSD Alex S Looks like we have a collision with https://hg.libsdl.org/SDL/rev/cd774daff9f6. (Again, the headers in the base system are intended for drivers and should not be used for compiling non-base applications. At least that's the policy for now: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=240964#c19.)
Sam Lantinga feab9d42 2020-11-24T06:40:13 5363 - Memory leak of joystick->sensors in SDL_JoystickClose Mathieu Eyraud Joystick->sensors is never freed.
Ozkan Sezer 711d4090 2020-11-24T14:10:30 CMakeLists.txt: add src/joystick/iphoneos/*.m to Darwin joystick sources .. so that there won't be missing symbols. TODO: add checks for SDL_JOYSTICK_MFI ???
Ozkan Sezer 23ad4f4b 2020-11-24T14:10:30 configure.ac: check GameController framework support when targeting Darwin disables SDL_JOYSTICK_MFI for i386 or if MAC_OS_X_VERSION_MIN_REQUIRED < 1090 --disable-joystick-mfi disables it unconditionally.
Sam Lantinga 34bea84a 2020-11-23T23:03:55 Fixed bug 5335 - Patch: enable joystick/haptic/evdev support by default on FreeBSD Alex S Ah, that's not quite enough. You need to: 1. rename src/joystick/bsd/SDL_sysjoystick.c to something; 2. regenerate configure.
Sam Lantinga 1e943e2a 2020-11-23T22:59:22 Fixed building with an older SDK and macOS target
Sam Lantinga 1fc5ca64 2020-11-23T22:24:54 Fixed building with an older SDK and macOS target
Sam Lantinga 4121ab62 2020-11-23T21:25:07 Fixed bug 5354 - DirectFB: Add Vulkan support Nicolas Caramelli This patch adds Vulkan support for the DirectFB video driver. A screenshot with SDL tests running on DirectFB is available on the HiGFXback project: https://github.com/caramelli/higfxback/wiki/DirectFB#sdl
Sam Lantinga e44bf8a0 2020-11-23T21:18:37 Fixed bug 5359 - Incorrect sensor data from DualShock4 multiply gyro values by sensitivity When the hardware calibration fails, values read from sensors need to be multiplied by default sensitivity (16 for gyro, 1 for accelerometer).
Sam Lantinga c8c818d7 2020-11-23T21:14:37 Fixed bug 5360 - non-libudev joystick detection doesn't see controllers that were already connected Simon McVittie When watching for hotplug events we can poll the inotify fd, but we still need to scan /dev/input once per process, otherwise we'll fail to detect devices that were already connected.
Simon McVittie 8e2746cf 2020-11-23T21:10:48 joystick: Don't use udev in Flatpak or pressure-vessel container Flatpak[1] and pressure-vessel[2] are known to use user namespaces, therefore udev event notification via netlink won't work reliably. Both frameworks provide a filesystem API that libraries can use to detect them. Do that, and automatically fall back from udev-based device discovery to the inotify-based fallback introduced in Bug #5337. [1] <https://flatpak.org/> [2] <https://gitlab.steamos.cloud/steamrt/steam-runtime-tools/-/tree/master/pressure-vessel> Signed-off-by: Simon McVittie <smcv@collabora.com>
Sam Lantinga e9869e07 2020-11-23T21:08:19 Fixed bug 5335 - enable joystick/haptic/evdev support by default on FreeBSD Alex S Evdev headers aren't actually included in the base system (well, it has a private copy), they are available through the devel/evdev-proto port instead. We also have devel/libinotify and devel/libudev-devd shims, I didn't verify whether they work with SDL.
Sam Lantinga 38ab8bf7 2020-11-23T21:03:43 Fixed bug 5362 - Mac OS ARM doesn't build Metal/Vulkan back-end/renderers C.W. Betts As it is, SDL2's built-in config on macOS for Metal excludes Apple Silicon. This is due to thinking that the 64-bit Mac platform would always be x86_64. My patch fixes this by using the catch-all of 64-bit platforms.
Sam Lantinga 62e39b5f 2020-11-23T20:57:14 Fixed building with an older SDK and macOS target
Sam Lantinga 268aa456 2020-11-23T20:26:28 Fixed compiling with SDL_JOYSTICK_RAWINPUT disabled
Ryan C. Gordon eaa53a19 2020-11-23T22:16:07 joystick: On Linux, don't try to close an invalid inotify file descriptor.
Ryan C. Gordon 5c957747 2020-11-23T22:14:22 joystick: Fix up Linux joystick code to (mostly) compile on FreeBSD.
Sam Lantinga 179bd665 2020-11-23T18:27:43 Don't enable PS5 controller support if DS4Windows is running - they conflict.
Sam Lantinga 5b3616c3 2020-11-23T18:24:05 Generalized the raw input controller driver and moved XInput/WGI detection into it for XInput devices This fixes bad report parsing for various newer Xbox controllers, and this driver is now preferred over XInput, since it handles more than 4 controllers.
Ryan C. Gordon 0ff5d55a 2020-11-23T21:07:28 x11: Don't try to grab the pointer on an unmapped window (thanks, Lee!) Fixes Bugzilla #5352.
Sam Lantinga 04b45b55 2020-11-23T14:28:30 Allow testing a specific controller
Sam Lantinga ff4bc138 2020-11-23T14:28:16 Fixed mapping controllers after adding the touchpad button
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