- check libiconv with a linkage test with iconv.h included
- check libc iconv with a linkage test with iconv.h included
and LIBICONV_PLUG defined (in case libiconv header is in
include path)
- add new configuration option to prefer iconv from libiconv,
if available, over the libc version, defaults to disabled:
SDL_LIBICONV for cmake, --enable-libiconv for autotools.
- change FreeBSD specific LIBICONV_PLUG define in SDL_iconv.c
to configuration result.
Automatically map controllers as gamepads when using the GCController framework and prefer the physicalInputProfile when possible.
Testing with macOS 13.4.1, macOS 14.1.1, iOS 15.7.4, tvOS 17.1:
* iBuffalo Classic USB Gamepad (macOS only)
* Logitech F310 (macOS only)
* Apple TV remote (tvOS only)
* Nimbus MFi controller
* PS4 DualShock controller
* PS5 DualSense controller
* Xbox Series X controller
* Xbox Elite Series 2 controller
* Nintendo Switch Pro controller
* Nintendo Switch Joy-Con controllers
(cherry picked from commit 0fe5713964287b17e05eb09dd4f83d8580dba254)
Author: Sam Lantinga <slouken@libsdl.org>
Date: Tue Nov 14 12:58:33 2023 -0800
The 8BitDo Zero 2 only sends reports when state changes, so trips the disconnected Bluetooth controller detection. The expected use case is that most people will have official PS4 controllers in enhanced report mode, so disconnected Bluetooth controller detection will still work for those.
Fixes https://github.com/libsdl-org/SDL/issues/8556
(cherry picked from commit 75df4cc5c2cd6b098f49855437c5262263489eab)
I handle command+C and command+V shortcuts for copy/paste from clipboard using
SDL_GetClipboardText/SDL_SetClipboardText. But on iOS command+V shortcut is
also handled by system, so that I also get textinput event with that clipboard
text. And thus the application gets this clipboard text twice (from
SDL_GetClipboardText and from textinput event).
I assume that intended behavior is that command+V shouldn't generate textinput
events. At least as far as I know ctrl+V on other platforms does nothing. This
commit disables paste action for UITextField, so that textinput event isn't
generated anymore.
(cherry picked from commit eddaf870f5b57bbdb7f1cf08bacc4f997806d9a7)
This can be used to work around issues where the Apple GCController driver doesn't work for some controllers but there's no way to know which GCController maps to which IOKit device.
(cherry picked from commit 708f18d49ef6975769865d247e2ce4da6ce8da76)
This reverts commit ad0af488837e44cbea0f0eab3b2f73b50a74bff4.
It turns out the ROG PUGIO II actually enumerates as a gamepad, so this change didn't have any effect anyway. We're getting lots of reports of people's racing pedals and similar devices no longer showing up, so we'll revert this again.
Fixes https://github.com/libsdl-org/SDL/issues/8227
Fixes https://github.com/libsdl-org/SDL/issues/8484
(cherry picked from commit 2c1fbe1967457c6b95323a5ea4136849c66bc307)
This mouse actually enumerates as a gamepad with 2 axes, 8 buttons and a hat.
We'll ignore it like the other ROG mice, unless someone specifically wants to use it as a gamepad.
(cherry picked from commit edd044e90187528656327584b6e2337bbceacd57)
Rework the code to clearly prefer 64-bit sysctls first, then
legacy sysctls, and eliminate a second ifdef.
Signed-off-by: Nia Alarie <nia@NetBSD.org>
(cherry picked from commit 69cae07cc1c216e35ddf3df98048378ad7aeaf92)
`driverdata->width` and `driverdata->height` represent the width and height in logical pixels on scaled outputs with xdg_output. However, to correctly calculate the display's DPI value, we need to use its native resolution.
For example, on a 27" 4K screen with 175% scaling, we have `width` == 2192 and `height` == 1233, resulting in a bogus value of 92dpi, whereas 162dpi are correct for 3840x2160 pixels at 27 inches.
Tested on GNOME mutter 45.1.
This makes sure you can hit Ctrl-C if you don't have permission to access the raw keyboard device.
Fixes https://github.com/libsdl-org/SDL/issues/4812
(cherry picked from commit ce9e1bd32485ae8a024d8147e3aa3a36f0cb0a19)
At the point we're calling SDL_IsJoystickXboxSeriesX(), we don't know for sure that the controller is an Xbox controller.
Fixes https://github.com/libsdl-org/SDL/issues/8174
(cherry picked from commit 15bc12165ab56e6fbf93b8f3d18f2a0bb5854d8c)