(Android) fix touch input for multi-touch

This commit is contained in:
ToadKing 2013-02-01 18:47:11 -05:00
parent 14ee3cf7c2
commit 1064e56970
2 changed files with 6 additions and 5 deletions

View File

@ -75,6 +75,7 @@ static void *android_input_init(void)
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_L3].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_L3);
g_settings.input.binds[player][RETRO_DEVICE_ID_JOYPAD_R3].joykey = (1ULL << RETRO_DEVICE_ID_JOYPAD_R3);
}
g_settings.input.dpad_emulation[0] = DPAD_EMULATION_LSTICK;
return (void*)-1;
}
@ -133,7 +134,7 @@ static void android_input_poll(void *data)
long_msg_enable = true;
}
if (keycode == AKEYCODE_BACK)
if (type_event == AINPUT_EVENT_TYPE_KEY && keycode == AKEYCODE_BACK)
{
int meta = AKeyEvent_getMetaState(event);
if (meta == AMETA_NONE)
@ -169,7 +170,8 @@ static void android_input_poll(void *data)
action == AMOTION_EVENT_ACTION_CANCEL || action == AMOTION_EVENT_ACTION_POINTER_UP) ||
(source == AINPUT_SOURCE_MOUSE && action != AMOTION_EVENT_ACTION_DOWN);
if (motion_pointer < MAX_TOUCH)
int max = min(AMotionEvent_getPointerCount(event), MAX_TOUCH);
for (motion_pointer = 0; motion_pointer < max; motion_pointer++)
{
if (!keyup)
{
@ -189,8 +191,6 @@ static void android_input_poll(void *data)
pointer_count--;
}
}
else
RARCH_WARN("Got motion pointer out of range (index: %u).\n", motion_pointer);
}
if (debug_enable)

View File

@ -3,9 +3,10 @@
android:versionCode="8"
android:versionName="0.9.8.1" >
<uses-feature android:glEsVersion="0x00020000" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false"/>
<uses-sdk
android:minSdkVersion="9"
android:targetSdkVersion="16" />
android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>