diff --git a/android/native/jni/input_android.c b/android/native/jni/input_android.c index 0a8b0f6d89..b3a3d6cb24 100644 --- a/android/native/jni/input_android.c +++ b/android/native/jni/input_android.c @@ -337,6 +337,7 @@ static void android_input_poll(void *data) int32_t handled = 0; uint64_t input_state = keycode_lut[keycode]; + int id = AInputEvent_getDeviceId(event); int type = AInputEvent_getType(event); int i = state_device_ids[id]; @@ -344,6 +345,10 @@ static void android_input_poll(void *data) if(i == -1) i = state_device_ids[id] = pads_connected++; +#ifdef RARCH_INPUT_DEBUG + RARCH_LOG("Keycode RetroPad %d : %d.\n", i, keycode); +#endif + if(type == AINPUT_EVENT_TYPE_MOTION) handled = handle_touch(event, i); else if(input_state < (1 << RARCH_FIRST_META_KEY)) @@ -387,12 +392,6 @@ static int16_t android_input_state(void *data, const struct retro_keybind **bind { case RETRO_DEVICE_JOYPAD: retval = (state[player] & button) ? 1 : 0; -#ifdef RARCH_INPUT_DEBUG - if(retval != 0) - { - RARCH_LOG("state: %d, player: %d.\n", retval, player); - } -#endif break; } }