mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
(Android) Buildfix
This commit is contained in:
parent
3eaf7d5e66
commit
9c1d40c364
@ -1420,7 +1420,6 @@ bool android_run_events(void *data)
|
|||||||
|
|
||||||
static bool android_is_pressed(
|
static bool android_is_pressed(
|
||||||
android_input_t *android,
|
android_input_t *android,
|
||||||
settings_t *settings,
|
|
||||||
rarch_joypad_info_t *joypad_info,
|
rarch_joypad_info_t *joypad_info,
|
||||||
const struct retro_keybind *binds,
|
const struct retro_keybind *binds,
|
||||||
unsigned port, unsigned id)
|
unsigned port, unsigned id)
|
||||||
@ -1428,9 +1427,9 @@ static bool android_is_pressed(
|
|||||||
const struct retro_keybind *bind = &binds[id];
|
const struct retro_keybind *bind = &binds[id];
|
||||||
/* Auto-binds are per joypad, not per user. */
|
/* Auto-binds are per joypad, not per user. */
|
||||||
const uint64_t joykey = (binds[id].joykey != NO_BTN)
|
const uint64_t joykey = (binds[id].joykey != NO_BTN)
|
||||||
? binds[id].joykey : joypad_info->auto_binds[i].joykey;
|
? binds[id].joykey : joypad_info->auto_binds[id].joykey;
|
||||||
const uint32_t joyaxis = (binds[id].joyaxis != AXIS_NONE)
|
const uint32_t joyaxis = (binds[id].joyaxis != AXIS_NONE)
|
||||||
? binds[id].joyaxis : joypad_info->auto_binds[i].joyaxis;
|
? binds[id].joyaxis : joypad_info->auto_binds[id].joyaxis;
|
||||||
|
|
||||||
if ((uint16_t)joykey != NO_BTN
|
if ((uint16_t)joykey != NO_BTN
|
||||||
&& android->joypad->button(
|
&& android->joypad->button(
|
||||||
@ -1460,16 +1459,10 @@ static int16_t android_input_state(void *data,
|
|||||||
int16_t ret = 0;
|
int16_t ret = 0;
|
||||||
for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++)
|
for (i = 0; i < RARCH_FIRST_CUSTOM_BIND; i++)
|
||||||
{
|
{
|
||||||
/* Auto-binds are per joypad, not per user. */
|
|
||||||
const uint64_t joykey = (binds[port][i].joykey != NO_BTN)
|
|
||||||
? binds[port][i].joykey : joypad_info->auto_binds[i].joykey;
|
|
||||||
const uint32_t joyaxis = (binds[port][i].joyaxis != AXIS_NONE)
|
|
||||||
? binds[port][i].joyaxis : joypad_info->auto_binds[i].joyaxis;
|
|
||||||
|
|
||||||
if (
|
if (
|
||||||
android_keyboard_port_input_pressed(binds[port], i)
|
android_keyboard_port_input_pressed(binds[port], i)
|
||||||
|| android_is_pressed(
|
|| android_is_pressed(
|
||||||
android, settings, joypad_info, binds[port],
|
android, joypad_info, binds[port],
|
||||||
port, i)
|
port, i)
|
||||||
)
|
)
|
||||||
ret |= (1 << i);
|
ret |= (1 << i);
|
||||||
@ -1481,7 +1474,7 @@ static int16_t android_input_state(void *data,
|
|||||||
if (
|
if (
|
||||||
android_keyboard_port_input_pressed(binds[port], id)
|
android_keyboard_port_input_pressed(binds[port], id)
|
||||||
|| android_is_pressed(
|
|| android_is_pressed(
|
||||||
android, settings, joypad_info, binds[port],
|
android, joypad_info, binds[port],
|
||||||
port, id))
|
port, id))
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user