Commit Graph
359 Commits
Author SHA1 Message Date
Cameron Gutman abde6021e8 Fix crashes and ANRs in controller LED handling 2026-09-01 21:15:51 -05:00
Cameron Gutman ad8614907c Suppress Lint warnings for using newer constants 2026-09-01 21:15:38 -05:00
Cameron Gutman 8974dcda6e Add support for newer keycodes from Android 15 and 16 2026-09-01 21:08:42 -05:00
Cameron Gutman 8d720748c1 Fix Lint error 2026-09-01 20:56:50 -05:00
Etienne Haarsma 280454fdb0 Added Xbox Series S/X controller to Xbox One controller driver (#1478) 2026-09-01 01:22:57 -05:00
T2Fat2Fly 3c6a0d12f5 Fix rumble not working due to deprecated API call (#1454) 2026-09-01 01:20:34 -05:00
vhenzor 583f662a87 Add Vendor 8BitDo to XboxOneController (#1461)
Some new 8BitDo controller or adapter are now detected as XboxOne controller instead of Xbox360 controller in XInput mode like the 8BitDo Ultimate-3-mode (https://www.8bitdo.com/ultimate-3-mode-controller-xbox/).

Like commit #1333 (https://github.com/moonlight-stream/moonlight-android/pull/1333/commits), adding 8BitDo's Vendor ID to SUPPORTED_VENDORS improve compatibility and enable rumble for supported controller.
2026-09-01 01:19:35 -05:00
Matheus VargemandReenigneArcher 85ed72802f feat: Add Guide menu to on-screen virtual controller (#1265)
* Add `Guide Button` to OSC controller

In order to allow the `Guide Button` to be pressed without a physical gamepad, add the button to the On-screen virtual controller

Co-authored-by: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com>
2024-07-27 16:21:17 -05:00
Cameron Gutman 17df15293f Drop support for Jelly Bean and KitKat
NDK support for these is already gone
2024-03-17 17:43:42 -05:00
komurlu 6551076613 Add Vendor 8BitDo to Xbox360Controller (#1333)
8BitDo Ultimate Bluetooth Controller was not being recognized in XInput mode when using the dongle.
Adding 8BitDo's Vendor ID to SUPPORTED_VENDORS seems to fix it.
2024-02-27 22:49:33 -06:00
Alek Lefebvre dbf1b88a3d Adjust emulated rumble strength (#1288) 2024-01-19 19:12:21 -06:00
joaomacp 3aab9eb13b Analog stick for scrolling in mouse emulation mode 2024-01-15 15:45:00 -06:00
Guillaume Zin 4330a223c6 Handle start+select as home button on Thrustmaster Score A gamepad (#1299) 2023-12-31 14:13:22 -06:00
Cameron Gutman e63dc9a93b Suppress bogus UnspecifiedRegisterReceiverFlag warning 2023-12-29 23:55:30 -06:00
Cameron Gutman c356862ac1 Avoid unnecessary reinitialization of PS4/PS5 gamepads during stream exit
onInputDeviceChanged() is triggered by starting/stopping pointer capture, so we should
unregister our callbacks before that happens to avoid triggering several gamepad context
reinitializations right as the stream is exiting
2023-10-29 16:45:07 -05:00
Cameron Gutman ebfe843299 Don't process incoming input device requests from the host after we've stopped 2023-10-26 00:05:24 -05:00
Cameron Gutman 827d2362b7 Don't create LightsSessions for devices without an RGB LED 2023-10-25 23:53:35 -05:00
Cameron Gutman ff5d9f72aa Fix ANRs trying to get battery state during controller arrival 2023-10-25 23:13:11 -05:00
Cameron Gutman d430d83ba8 Add clickpad button emulation combo (Select+L1) 2023-10-16 23:56:56 -05:00
Cameron Gutman dc1045b69e Don't lie to our own clickpad heuristics when overriding the controller type 2023-10-16 23:38:12 -05:00
Cameron Gutman 9915007f30 Check for a null UsbManager object
Apparently this can happen on some (broken?) devices
2023-10-12 00:22:28 -05:00
Cameron Gutman 0168a55596 Propagate the controller number to the standalone DS4 touchpad device 2023-10-07 23:26:26 -05:00
Cameron Gutman 229eff49fb Consume unhandled gamepad mouse events to prevent duplicate mouse actions 2023-10-07 23:04:36 -05:00
Cameron Gutman 0e3b472f78 Fix DS4 clickpad button on devices that expose the touchpad as a mouse 2023-10-07 22:58:07 -05:00
Cameron Gutman 5f29b30d34 Fix DS4 clickpad button on Nvidia Shield (again) 2023-10-07 22:53:19 -05:00
Cameron Gutman 5dd80edde4 Wait 1 second after input device reconfiguration to enable motion sensors 2023-10-07 21:07:02 -05:00
Cameron Gutman 30822c1ba5 Only check for motion sensors on Sony or Nintendo gamepads on Android 12
This works around a bug in Android 12 that leads to random crashes when input devices change.
2023-10-07 19:07:15 -05:00
Cameron Gutman d250f4dc60 Move battery updates to a background HandlerThread
They can cause long Binder transactions that lead to ANRs.
2023-10-07 00:49:03 -05:00
Cameron Gutman bc27492206 Split ControllerHandler teardown into stop() and destroy() functions 2023-10-07 00:35:36 -05:00
Cameron Gutman 081cca48fb Implement cursor visibility and quit key shortcuts
Fixes #1255
2023-09-23 02:20:26 -04:00
Cameron Gutman d32c4f86a7 Fix unguarded use of Lollipop API 2023-09-16 22:53:13 -05:00
Cameron Gutman cafc4450b2 Override controller type when motion sensor emulation is enabled
Without this, the host will still select an Xbox controller even if it can't support motion sensors.
2023-09-16 22:48:38 -05:00
Cameron Gutman 4d3e883e49 Correct sensors for device orientation 2023-09-16 22:26:11 -05:00
Cameron Gutman 8f9a687872 Add device sensor fallback option
Correction for device orientation is not implemented yet
2023-09-16 20:25:54 -05:00
Cameron Gutman 08d509d831 Use the device vibrator for devices with built-in gamepads 2023-09-16 19:14:22 -05:00
Cameron Gutman b06dec8449 Fix detection of G Cloud gamepad as an internal controller 2023-09-16 19:09:40 -05:00
Cameron Gutman e92fdeef47 Fix RGB LED capability flag on Android 12 and 13 2023-08-03 23:02:11 -05:00
Cameron Gutman 2636d79b86 Fix handling of ACTION_CANCEL for multi-pointer gestures 2023-08-03 02:29:55 -05:00
Cameron Gutman c9c1ef91fd Fix mishandling ACTION_MOVE events for native pen/touch events 2023-07-27 23:15:26 -05:00
Cameron Gutman 0e29e13d03 Use private API to detect clickpads on Android O and earlier 2023-07-22 14:34:27 -05:00
Cameron Gutman 16086a6d3f Send the touchpad button on the gamepad even when using the touchpad for mouse control 2023-07-12 01:16:33 -05:00
Cameron Gutman 18b6aae381 Disable gamepad sensors while in PiP mode 2023-07-12 01:07:14 -05:00
Cameron Gutman 642c353164 Fix handling of onInputDeviceChanged when using sensors and lights
DS4 triggers this path when we release our pointer capture on activity pause
2023-07-12 00:32:28 -05:00
Cameron Gutman e6876926a4 Add options to control gamepad touchpad and motion and reorganize input settings 2023-07-09 14:46:46 -05:00
Cameron Gutman 83916fa43e Map the Menu key for keyboards 2023-07-08 23:21:19 -05:00
Cameron Gutman 4dc6143440 Override the stock DS4 touchpad button mapping for Shield devices
Nvidia's stock mapping treats the clickpad as a second select button.
2023-07-05 23:00:54 -05:00
Cameron Gutman f1503aa56c Implement battery reporting for Shield controllers 2023-07-05 18:57:01 -05:00
Cameron Gutman d6bbfa1af1 Fix unmapped paddle and share button presses 2023-07-02 20:32:57 -05:00
Cameron Gutman 4e1b778f31 Import some SDL code and use it for controller classification
Imported as of 4aee17b039981f2bb79892f3d3e3e17bd6b66530
2023-07-02 20:20:55 -05:00
Cameron Gutman d4079940b4 Implement controller LED and battery state extensions 2023-07-02 19:03:31 -05:00