mirror of
https://github.com/izzy2lost/WeeU.git
synced 2026-07-06 00:19:59 -07:00
Fix crash in input settings fragment
This commit is contained in:
@@ -23,10 +23,10 @@ public class InputSettingsFragment extends Fragment {
|
||||
GenericRecyclerViewAdapter genericRecyclerViewAdapter = new GenericRecyclerViewAdapter();
|
||||
for (int index = 0; index < NativeLibrary.MAX_CONTROLLERS; index++) {
|
||||
int controllerIndex = index;
|
||||
String controllerType = getString(NativeLibrary.controllerTypeToResourceNameId(NativeLibrary.getControllerType(controllerIndex)));
|
||||
int controllerType = NativeLibrary.isControllerDisabled(controllerIndex) ? NativeLibrary.EMULATED_CONTROLLER_TYPE_DISABLED : NativeLibrary.getControllerType(controllerIndex);
|
||||
ButtonRecyclerViewItem buttonRecyclerViewItem = new ButtonRecyclerViewItem(
|
||||
getString(R.string.controller_numbered, controllerIndex + 1),
|
||||
getString(R.string.emulated_controller_with_type, controllerType),
|
||||
getString(R.string.emulated_controller_with_type, getString(NativeLibrary.controllerTypeToResourceNameId(controllerType))),
|
||||
() -> {
|
||||
Bundle bundle = new Bundle();
|
||||
bundle.putInt(ControllerInputsFragment.CONTROLLER_INDEX, controllerIndex);
|
||||
|
||||
Reference in New Issue
Block a user