[Custom controls edit] Try to fix inverted special keycode

This commit is contained in:
khanhduytran0 2020-11-21 15:28:59 +07:00
parent 0585f29567
commit b13fb2bc32

View File

@ -111,7 +111,7 @@ public class ActionPopupWindow extends PinnedPopupWindow implements OnClickListe
adapter.setDropDownViewResource(android.R.layout.simple_list_item_single_choice); adapter.setDropDownViewResource(android.R.layout.simple_list_item_single_choice);
spinnerKeycode.setAdapter(adapter); spinnerKeycode.setAdapter(adapter);
if (properties.keycode < 0) { if (properties.keycode < 0) {
spinnerKeycode.setSelection(properties.keycode + specialArr.length); spinnerKeycode.setSelection(0 - properties.keycode);
} else { } else {
spinnerKeycode.setSelection(AndroidLWJGLKeycode.getIndexByLWJGLKey(properties.keycode) + specialArr.length); spinnerKeycode.setSelection(AndroidLWJGLKeycode.getIndexByLWJGLKey(properties.keycode) + specialArr.length);
} }