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 8577158706..334ecb671c 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 @@ -1,5 +1,6 @@ package org.dolphinemu.dolphinemu.activities; +import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.content.SharedPreferences; @@ -237,6 +238,14 @@ public final class EmulationActivity extends AppCompatActivity activity.startActivity(launcher); } + public static void clearWiimoteNewIniLinkedPreferences(Context context) + { + SharedPreferences.Editor editor = PreferenceManager.getDefaultSharedPreferences(context).edit(); + editor.remove("wiiController"); + editor.remove("motionControlsEnabled"); + editor.apply(); + } + @Override protected void onCreate(Bundle savedInstanceState) { diff --git a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java index 7742ac90ae..45b3c69155 100644 --- a/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java +++ b/Source/Android/app/src/main/java/org/dolphinemu/dolphinemu/utils/DirectoryInitialization.java @@ -15,6 +15,7 @@ import android.preference.PreferenceManager; import androidx.localbroadcastmanager.content.LocalBroadcastManager; import org.dolphinemu.dolphinemu.NativeLibrary; +import org.dolphinemu.dolphinemu.activities.EmulationActivity; import java.io.File; import java.io.FileInputStream; @@ -152,6 +153,7 @@ public final class DirectoryInitialization SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); if (prefs.getInt("WiimoteNewVersion", 0) != WiimoteNewVersion) { + EmulationActivity.clearWiimoteNewIniLinkedPreferences(context); copyAsset("WiimoteNew.ini", new File(configDirectory, "WiimoteNew.ini"), true, context); SharedPreferences.Editor sPrefsEditor = prefs.edit(); sPrefsEditor.putInt("WiimoteNewVersion", WiimoteNewVersion);