mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-16 15:57:42 +00:00
(iOS) Differentiate between RETRO_DEVICE_POINTER and RARCH_DEVICE_POINTER_SCREEN.
This commit is contained in:
parent
05bf7acffb
commit
7fcb26bded
@ -106,9 +106,12 @@ static int16_t ios_input_state(void *data, const struct retro_keybind **binds, u
|
||||
{
|
||||
case RETRO_DEVICE_JOYPAD:
|
||||
return (id < RARCH_BIND_LIST_END) ? ios_is_pressed(port, &binds[port][id]) : false;
|
||||
|
||||
|
||||
case RETRO_DEVICE_POINTER:
|
||||
case RARCH_DEVICE_POINTER_SCREEN:
|
||||
{
|
||||
const bool want_full = device == RARCH_DEVICE_POINTER_SCREEN;
|
||||
|
||||
if (index < ios_touch_count && index < MAX_TOUCHES)
|
||||
{
|
||||
const touch_data_t* touch = &ios_touch_list[index];
|
||||
@ -116,8 +119,8 @@ static int16_t ios_input_state(void *data, const struct retro_keybind **binds, u
|
||||
switch (id)
|
||||
{
|
||||
case RETRO_DEVICE_ID_POINTER_PRESSED: return 1;
|
||||
case RETRO_DEVICE_ID_POINTER_X: return touch->full_x;
|
||||
case RETRO_DEVICE_ID_POINTER_Y: return touch->full_y;
|
||||
case RETRO_DEVICE_ID_POINTER_X: return want_full ? touch->full_x : touch->fixed_x;
|
||||
case RETRO_DEVICE_ID_POINTER_Y: return want_full ? touch->full_y : touch->fixed_y;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user