Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input extensions for controller touchpad, battery, RGB LEDs, and motion events #1435

Merged
merged 7 commits into from
Jul 11, 2023

Conversation

cgutman
Copy link
Collaborator

@cgutman cgutman commented Jul 9, 2023

Description

This PR introduces support for many new controller features included in recent protocol extensions, including:

  • Touchpad input (2-point multi-touch)
  • Battery status events
  • Accelerometer and gyroscope support
  • Controller RGB LED control

The core plumbing work is done in this PR along with a Windows implementation of these features using ViGEmBus. @ABeltramo mentioned he wanted to take a stab at the Linux implementation.

This PR also fixes a bug that prevented rumble from working correctly for all gamepads when multiple clients are streaming at once.

Screenshot

Issues Fixed or Closed

Resolves #1200
Resolves #979

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@cgutman cgutman force-pushed the controller_extensions branch from 1a6cbfa to 20103b1 Compare July 9, 2023 04:14
@cgutman cgutman marked this pull request as ready for review July 9, 2023 04:15
@cgutman cgutman force-pushed the controller_extensions branch 2 times, most recently from 0490043 to 0b6edeb Compare July 9, 2023 22:54
@cgutman cgutman force-pushed the controller_extensions branch from 0b6edeb to eb735c5 Compare July 11, 2023 01:00
@cgutman cgutman force-pushed the controller_extensions branch from eb735c5 to cf173a0 Compare July 11, 2023 01:00
@cgutman cgutman added the protocol update This PR includes an update to the streaming protocol label Jul 11, 2023
@cgutman cgutman force-pushed the controller_extensions branch from cf173a0 to 6ca37b4 Compare July 11, 2023 02:23
cgutman added 5 commits July 10, 2023 21:25
We may get activeGamepadMask changes out of order between different
controller channels, so only check the bit of the mask corresponding to the
controller number specified in the event itself.

This also fixes the "ControllerNumber not allocated" warning each time a
gamepad is removed.
We need to use the client-relative index rather than the global index
when sending feedback to the client.
@cgutman cgutman force-pushed the controller_extensions branch from 6ca37b4 to cb7c3a7 Compare July 11, 2023 02:25
@cgutman
Copy link
Collaborator Author

cgutman commented Jul 11, 2023

I'm going to merge this after CI completes to let it bake in nightly. I've done integration testing for all the new features with Moonlight Qt and Moonlight Android with Sunshine on Windows and also verified that no gamepad regressions were introduced on Linux.

@cgutman cgutman merged commit 50f353d into LizardByte:nightly Jul 11, 2023
@cgutman cgutman mentioned this pull request Jul 31, 2023
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
protocol update This PR includes an update to the streaming protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant