Android: Default to digital controller type for mapping port 1
This commit is contained in:
parent
fb48e8f093
commit
f5188c7fef
|
@ -163,7 +163,8 @@ public class ControllerMappingActivity extends AppCompatActivity {
|
||||||
@Override
|
@Override
|
||||||
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {
|
||||||
final SharedPreferences sp = getPreferenceManager().getSharedPreferences();
|
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[] controllerButtons = AndroidHostInterface.getControllerButtonNames(controllerType);
|
||||||
String[] axisButtons = AndroidHostInterface.getControllerAxisNames(controllerType);
|
String[] axisButtons = AndroidHostInterface.getControllerAxisNames(controllerType);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue