mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-02-10 21:52:42 +00:00
(Android) Reimplement 'touchscreen is always player 1 and doesn't take
up a slot'
This commit is contained in:
parent
6638ee1257
commit
9cfdd61103
@ -113,9 +113,14 @@ static void android_input_poll(void *data)
|
|||||||
int type_event = AInputEvent_getType(event);
|
int type_event = AInputEvent_getType(event);
|
||||||
int state_id = -1;
|
int state_id = -1;
|
||||||
|
|
||||||
for (unsigned i = 0; i < pads_connected; i++)
|
if (source & (AINPUT_SOURCE_TOUCHSCREEN | AINPUT_SOURCE_MOUSE | AINPUT_SOURCE_TOUCHPAD))
|
||||||
if (state_device_ids[i] == id)
|
state_id = 0; // touch overlay is always player 1
|
||||||
state_id = i;
|
else
|
||||||
|
{
|
||||||
|
for (unsigned i = 0; i < pads_connected; i++)
|
||||||
|
if (state_device_ids[i] == id)
|
||||||
|
state_id = i;
|
||||||
|
}
|
||||||
|
|
||||||
if (state_id < 0)
|
if (state_id < 0)
|
||||||
{
|
{
|
||||||
@ -214,7 +219,7 @@ static void android_input_poll(void *data)
|
|||||||
*key |= input_state;
|
*key |= input_state;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(volume_enable && (keycode == AKEYCODE_VOLUME_UP || keycode == AKEYCODE_VOLUME_DOWN))
|
if((keycode == AKEYCODE_VOLUME_UP || keycode == AKEYCODE_VOLUME_DOWN) && keycode_lut[keycode] == 0)
|
||||||
handled = 0;
|
handled = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user