Android: Default to digital controller type for mapping port 1

This commit is contained in:
Connor McLaughlin 2021-01-20 15:04:17 +10:00
parent fb48e8f093
commit f5188c7fef
1 changed files with 2 additions and 1 deletions

View File

@ -163,7 +163,8 @@ public class ControllerMappingActivity extends AppCompatActivity {
@Override
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
final SharedPreferences sp = getPreferenceManager().getSharedPreferences();
String controllerType = sp.getString(String.format("Controller%d/Type", controllerIndex), "None");
final String defaultControllerType = controllerIndex == 0 ? "DigitalController" : "None";
String controllerType = sp.getString(String.format("Controller%d/Type", controllerIndex), defaultControllerType);
String[] controllerButtons = AndroidHostInterface.getControllerButtonNames(controllerType);
String[] axisButtons = AndroidHostInterface.getControllerAxisNames(controllerType);