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

Fix rumble not working due to deprecated API call #1454

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

T2Fat2Fly
Copy link

The constant VIBRATOR_SERVICE is marked as deprecated in API level 31. According to this post on Stack Overflow, the correct way to get the system default Vibrator instance is to retrieve it from the VibratorManager service, which the original code already has but isn't used to retrieve the Vibrator instance.

My Redmi K40 was affected by this, and there was no on-device rumble even if no external controller is connected. By applying the patched code, the rumble works as expected. As the original usage is deprecated, I'd expect this patch would help Moonlight work better on more newer devices and systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant