Don't do it in POST_BUILD to avoid multiple parallel builds
stepping on each others toes.
Also don't use copy_if_different, but unconditionally copy it.
The build system should take care of dependencies.
SDL2 backport of fea6e7afb1c13326f463aef47ecd26396d1e3a2f
Mesa and Nvidia handle it differently, and one or the other may fix their
implementation in the future, so test which way it works at runtime.
Reference Issue #8004.
(cherry picked from commit 74a25425646d64edeff508ec8e99622a41576905)
- 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)