Commit graph

482 commits

Author SHA1 Message Date
Sam Lantinga
8549aae829 Make initializeDeviceListener() and shutdownDeviceListener() public 2026-06-04 09:26:33 -07:00
Sam Lantinga
36c5809b09 Added SDLControllerManager::shutdownDeviceListener() 2026-06-04 09:19:53 -07:00
Sam Lantinga
e5bbef0dbc Fixed detecting PS4 controllers on Android 2026-06-04 09:19:28 -07:00
Sylvain Becker
fc3a96e47a
Android: remove pollInputDevice() in favor of InputDeviceListener (#15659) 2026-06-03 20:38:04 -07:00
Sam Lantinga
42fc082b5e Fixed java.lang.NullPointerException
From @AntTheAlchemist:
This is an interesting one, on a Xiaomi MiTV. Caused by a camera device, full stack:
android.app.LoadedApk$ReceiverDispatcher$Args.lambda$getRunnable$0$LoadedApk$ReceiverDispatcher$Args -> org.libsdl.app.HIDDeviceManager$1.onReceive -> handleUsbDeviceAttached -> connectHIDDeviceUSB -> getSerialNumber -> android.hardware.usb.UsbDevice.getSerialNumber -> android.hardware.usb.IUsbSerialReader$Stub.onTransact -> com.android.server.usb.UsbSerialReader.getSerial -> UsbUserPermissionManager.checkPermission -> hasPermission -> isCameraDevicePresent
2026-06-02 16:51:58 -07:00
Sam Lantinga
75270a4264 Handle java.util.ConcurrentModificationException while unregistering sensor listeners
We're still seeing this frequently when unregistering PlayStation controller sensors. We don't know what else is modifying the sensor list, but if we end up getting this exception we'll retry after a short sleep.
2026-06-02 16:51:58 -07:00
NY00123
ed2c8036a7 Android: Remove unused accelerometer-related code and definitions
That also covers removal of the call `SDLActivity.onNativeAccel`,
plus a change of comment under SDL_android.c.

Definitions were previously used while an accelerometer could be listed as a joystick.
2026-05-29 13:14:09 -07:00
Sam Lantinga
7103ed4167 Fixed Steam Controller rumble on Android (thanks @Packetdancer!) 2026-05-28 11:39:58 -07:00
Sam Lantinga
f6ffa69890 Add support for new Steam Controller input report on mobile devices 2026-05-28 11:39:58 -07:00
Rachel Blackman
ac177763aa
Ensure we release exclusive USB access to controllers when backgrounded. #15694 2026-05-26 17:40:52 -07:00
NY00123
199d509820 Android: Skip duplicated joystick axes during poll
Resolves https://github.com/libsdl-org/SDL/issues/15414
2026-05-26 15:54:33 -07:00
Sam Lantinga
3545bad589 Process repeated joystick key events on Android
This prevents them from being interpreted as keyboard keys by the Java code, and if internally we are treating them as keyboard keys, they'll be repeated properly.

Fixes https://github.com/libsdl-org/SDL/issues/15664
2026-05-21 06:53:17 -07:00
Sam Lantinga
47c8dcc968 android: handle sensor registration synchronized in one place 2026-05-20 15:55:24 -07:00
Sam Lantinga
8c89a076a7 Fixed deadlock introduced by 7222c04fbf
It turns out this change causes a deadlock:
The main UI thread calls synchronized handleMotionEvent() which then calls SDL_LockJoysticks()
The main app thread calls SDL_LockJoysticks() and then synchronized pollInputDevices()
2026-05-17 12:22:12 -07:00
Sam Lantinga
b19ecb4032 Reapply "Change controller sensor state on the main UI thread on Android"
This reverts commit 02975994c1.

Accidentally reverted the wrong commit
2026-05-17 12:15:48 -07:00
Sam Lantinga
02975994c1 Revert "Change controller sensor state on the main UI thread on Android"
This reverts commit c362f1341f.

It turns out this change causes a deadlock:
The main UI thread calls synchronized handleMotionEvent() which then calls SDL_LockJoysticks()
The main app thread calls SDL_LockJoysticks() and then synchronized pollInputDevices()
2026-05-17 12:04:11 -07:00
Sam Lantinga
a95ce7e734 Detect the GameSir Super Nova in Xbox 360 mode 2026-05-15 10:13:15 -07:00
Anthony
bd146867e4 Update showFileDialog in proguard-rules.pro
to match changes in 439ffd1
2026-05-15 08:59:35 -07:00
crudelios
439ffd13eb Android: Add support for folder dialogs 2026-05-14 11:50:52 -07:00
Cameron Cawley
e50faf4e6a Support the full set of standard CSS cursors 2026-05-13 20:24:44 -07:00
Sam Lantinga
c362f1341f Change controller sensor state on the main UI thread on Android
Fixes https://github.com/libsdl-org/SDL/issues/15565
2026-05-13 07:39:02 -07:00
Sam Lantinga
7222c04fbf Synchronize controller access on the Java side on Android 2026-05-13 07:39:02 -07:00
Rachel Blackman
418960bb4e Handle the Amazon Fire TV's weird Bluetooth behavior 2026-05-12 17:40:37 -07:00
Rachel Blackman
e4a327709d
Correctly support OG Steam Controller when connected via USB on Android (#15561) 2026-05-11 15:19:57 -07:00
Anthony
c94b1435c7 Add joystickSetSensorsEnabled to proguard-rules.pro 2026-05-11 06:38:19 -07:00
Nintorch
3c1636a958 Fix JoyCon mappings on Android 2026-05-04 11:49:25 -07:00
Nintorch
c699512adc Add support for joystick motion sensors on Android 2026-05-03 15:11:31 -07:00
Sam Lantinga
47d14491a6 Fixed keyboard being hidden while being shown on Android 2026-04-25 17:10:54 -07:00
MAJigsaw77
7f12b975bb Use singleTop launchMode for SDLActivity on Android 2026-04-11 20:04:46 +02:00
Sylvain
ccf688c921 Android: fix lint warning "unneed cast to Activity" 2026-04-10 07:08:07 -07:00
Sam Lantinga
fc2f4fcc22 Send SDL_EVENT_SCREEN_KEYBOARD_HIDDEN when the keyboard is hidden on Android 2026-04-04 10:07:58 -07:00
Sam Lantinga
815fd4bf45 Removed spurious whitespace 2026-03-28 22:22:39 -07:00
Tobiasz Laskowski
01bd8b3780 Fix backspace on android with api 30+ 2026-03-03 17:12:01 -08:00
Sam Lantinga
2385dc6297 Added support for the Flydigi Vader 5 Pro in Xbox 360 mode 2026-02-24 10:18:17 -08:00
Sam Lantinga
1dcc6e2135 Fixed detection of the "Android TV Box" as a TV 2026-02-16 12:34:54 -08:00
Rachel Blackman
46e553a44c
Add support for new Steam Controller on Android (#15044) 2026-02-12 17:39:15 -08:00
Sylvain
a35bcad0be Android: prevent SDLActivity and Main Thread to access mJoystick at the
same time. same for mHapticHandler
2026-02-10 07:53:29 -08:00
Sam Lantinga
cd7fc90c87 Added support for the third stylus button on Android 2026-02-05 10:24:04 -08:00
Kadir
cbcc565ca9 Add ProGuard rule for joystickSetLED method in SDLControllerManager 2026-01-02 07:30:36 -08:00
Anonymous Maarten
fc4f45f0e3 Updated to version 3.5.0 for development 2026-01-01 17:30:41 +01:00
Sam Lantinga
d15ecb21be Updated to version 3.4.1 for development 2025-12-31 18:18:45 -08:00
Sam Lantinga
a962f40bbb Updated to version 3.4.0 for release 2025-12-31 16:43:54 -08:00
MAJigsaw77
cb04dcd6f8 android: Add RGB LED support for joysticks. 2025-12-29 10:32:02 -08:00
Sam Lantinga
d583fc88be Updated to version 3.3.7 for development 2025-12-16 09:38:05 -08:00
Sam Lantinga
ef0a604d44 Updated to version 3.3.6 for preview release 2025-12-16 08:54:04 -08:00
Sam Lantinga
7773157fae Updated to version 3.3.5 for development 2025-12-07 09:30:04 -08:00
Sam Lantinga
f173fd28f0 Updated to version 3.3.4 for preview release 2025-12-06 14:57:22 -08:00
Sam Lantinga
be781fc8f5 Updated to version 3.3.3 for development 2025-10-23 22:41:03 -07:00
Sam Lantinga
b31c4b70b3 Updated version and documentation for 3.3.2 preview release 2025-10-23 15:20:26 -07:00
Susko3
e2bbbdc515 Implement SDL_GetPenDeviceType() for Android 2025-10-13 18:43:16 -04:00