mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Merge pull request #8959 from yoshisuga/touchscreen_input_touch_count
iOS/Android: Support detecting multi-touch input
This commit is contained in:
commit
f4554ef547
@ -1469,6 +1469,8 @@ static int16_t android_input_state(void *data,
|
||||
return (idx < android->pointer_count) &&
|
||||
(android->pointer[idx].x != -0x8000) &&
|
||||
(android->pointer[idx].y != -0x8000);
|
||||
case RETRO_DEVICE_ID_POINTER_COUNT:
|
||||
return android->pointer_count;
|
||||
case RARCH_DEVICE_ID_POINTER_BACK:
|
||||
{
|
||||
const struct retro_keybind *keyptr = &input_autoconf_binds[0][RARCH_MENU_TOGGLE];
|
||||
@ -1488,6 +1490,8 @@ static int16_t android_input_state(void *data,
|
||||
return (idx < android->pointer_count) &&
|
||||
(android->pointer[idx].full_x != -0x8000) &&
|
||||
(android->pointer[idx].full_y != -0x8000);
|
||||
case RETRO_DEVICE_ID_POINTER_COUNT:
|
||||
return android->pointer_count;
|
||||
case RARCH_DEVICE_ID_POINTER_BACK:
|
||||
{
|
||||
const struct retro_keybind *keyptr = &input_autoconf_binds[0][RARCH_MENU_TOGGLE];
|
||||
|
@ -281,6 +281,8 @@ static int16_t cocoa_pointer_state(cocoa_input_data_t *apple,
|
||||
return x;
|
||||
case RETRO_DEVICE_ID_POINTER_Y:
|
||||
return y;
|
||||
case RETRO_DEVICE_ID_POINTER_COUNT:
|
||||
return apple->touch_count;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,6 +248,7 @@ extern "C" {
|
||||
#define RETRO_DEVICE_ID_POINTER_X 0
|
||||
#define RETRO_DEVICE_ID_POINTER_Y 1
|
||||
#define RETRO_DEVICE_ID_POINTER_PRESSED 2
|
||||
#define RETRO_DEVICE_ID_POINTER_COUNT 3
|
||||
|
||||
/* Returned from retro_get_region(). */
|
||||
#define RETRO_REGION_NTSC 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user