From 709031bb1d5b1baeeca6f13539dbb9efaf099e82 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Wed, 29 Jul 2020 17:48:56 +0200 Subject: [PATCH] Android: Remove touchscreen check for rumble That a device doesn't have a touchscreen doesn't necessarily mean that it doesn't support rumble (though it is usually the case). setPhoneVibrator already contains a check for whether the device supports rumble, so we can simply remove the touchscreen check. --- .../dolphinemu/activities/EmulationActivity.java | 7 +------ .../main/java/org/dolphinemu/dolphinemu/utils/Rumble.java | 4 +--- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java index bd57471896..decef06b8f 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/activities/EmulationActivity.java @@ -1177,11 +1177,6 @@ public final class EmulationActivity extends AppCompatActivity .commit(); } - public boolean deviceHasTouchScreen() - { - return mDeviceHasTouchScreen; - } - public String getSelectedTitle() { return mSelectedTitle; @@ -1204,7 +1199,7 @@ public final class EmulationActivity extends AppCompatActivity public void initInputPointer() { - if (deviceHasTouchScreen()) + if (mDeviceHasTouchScreen) mEmulationFragment.initInputPointer(); } } diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Rumble.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Rumble.java index 79d2fa9347..aa37a318ef 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Rumble.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/Rumble.java @@ -22,9 +22,7 @@ public class Rumble { clear(); - if (activity.deviceHasTouchScreen() && - PreferenceManager.getDefaultSharedPreferences(activity) - .getBoolean("phoneRumble", true)) + if (PreferenceManager.getDefaultSharedPreferences(activity).getBoolean("phoneRumble", true)) { setPhoneVibrator(true, activity); }