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

Android: Add controller rumble support #7443

Merged
merged 1 commit into from Oct 28, 2018

Conversation

zackhow
Copy link
Member

@zackhow zackhow commented Oct 2, 2018

Android can be funky with controller vibration. Of the three controlers I have that contain a
vibrator(PS3, Xbox360, 2017 Shield controller), only the Xbox360 controller registered as having
a vibrator. So YYMV depending on the driver support of the device.

if (vibrator != null && vibrator.hasVibrator())
{
setting.setValue(device.getName());
editor.putString(setting.getKey(), String.valueOf(device.getName()));

This comment was marked as off-topic.

This comment was marked as off-topic.

{
setting.setValue(device.getName());
editor.putString(setting.getKey(), String.valueOf(device.getName()));
editor.putString(setting.getKey() + "desc", String.valueOf(device.getDescriptor()));

This comment was marked as off-topic.

This comment was marked as off-topic.

@@ -49,7 +53,11 @@ public boolean onKeyEvent(int keyCode, KeyEvent event)
case KeyEvent.ACTION_UP:
if (!ControllerMappingHelper.shouldKeyBeIgnored(event.getDevice(), keyCode))
{
saveKeyInput(event);
// Special case for Rumble
if (setting.getKey().contains(SettingsFile.KEY_EMU_RUMBLE))

This comment was marked as off-topic.

This comment was marked as off-topic.

Android can be funky with controller vibration. Of the three controlers I have that contain a
vibrator(PS3, Xbox360, 2017 Shield controller), only the Xbox360 controller registered as having
a vibrator. So YYMV depending on the driver support of the device.
@delroth delroth merged commit eb35514 into dolphin-emu:master Oct 28, 2018
@zackhow zackhow deleted the device-rumble branch November 2, 2018 23:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants