Skip to content
Permalink
Browse files
Merge pull request #10562 from JosJuice/android-double-tap-get
Android: Fix displaying the current value of double tap setting
  • Loading branch information
lioncash committed Apr 9, 2022
2 parents dcf27b9 + 4120870 commit d4e4b56
Showing 1 changed file with 9 additions and 4 deletions.
@@ -879,13 +879,18 @@ public void chooseDoubleTapButton()
int buttonList = currentController == InputOverlay.OVERLAY_WIIMOTE_CLASSIC ?
R.array.doubleTapWithClassic : R.array.doubleTap;

if (currentController != InputOverlay.OVERLAY_WIIMOTE_CLASSIC &&
currentValue == InputOverlay.OVERLAY_WIIMOTE_CLASSIC)
int checkedItem = -1;
int itemCount = getResources().getStringArray(buttonList).length;
for (int i = 0; i < itemCount; i++)
{
currentValue = InputOverlay.OVERLAY_WIIMOTE;
if (InputOverlayPointer.DOUBLE_TAP_OPTIONS.get(i) == currentValue)
{
checkedItem = i;
break;
}
}

builder.setSingleChoiceItems(buttonList, currentValue,
builder.setSingleChoiceItems(buttonList, checkedItem,
(DialogInterface dialog, int which) -> IntSetting.MAIN_DOUBLE_TAP_BUTTON
.setInt(mSettings, InputOverlayPointer.DOUBLE_TAP_OPTIONS.get(which)));

0 comments on commit d4e4b56

Please sign in to comment.