mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
commit
6588969bb4
@ -690,6 +690,16 @@ int16_t input_state(unsigned port, unsigned device,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (overlay_ptr)
|
||||
input_state_overlay(overlay_ptr, &res, port, device, idx, id);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
if (input_driver_remote)
|
||||
input_remote_state(&res, port, device, idx, id);
|
||||
#endif
|
||||
|
||||
if (((id < RARCH_FIRST_META_KEY) || (device == RETRO_DEVICE_KEYBOARD)))
|
||||
{
|
||||
bool bind_valid = libretro_input_binds[port] && libretro_input_binds[port][id].valid;
|
||||
@ -702,8 +712,12 @@ int16_t input_state(unsigned port, unsigned device,
|
||||
joypad_info.auto_binds = input_autoconf_binds[joypad_info.joy_idx];
|
||||
|
||||
if (!reset_state)
|
||||
{
|
||||
res = current_input->input_state(
|
||||
current_input_data, joypad_info, libretro_input_binds, port, device, idx, id);
|
||||
if (input_overlay_is_alive(overlay_ptr) && port == 0)
|
||||
res |= input_overlay_key_pressed(overlay_ptr, id);
|
||||
}
|
||||
else
|
||||
res = 0;
|
||||
}
|
||||
@ -713,15 +727,7 @@ int16_t input_state(unsigned port, unsigned device,
|
||||
input_mapper_state(input_driver_mapper,
|
||||
&res, port, device, idx, id);
|
||||
|
||||
#ifdef HAVE_OVERLAY
|
||||
if (overlay_ptr)
|
||||
input_state_overlay(overlay_ptr, &res, port, device, idx, id);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_NETWORKGAMEPAD
|
||||
if (input_driver_remote)
|
||||
input_remote_state(&res, port, device, idx, id);
|
||||
#endif
|
||||
|
||||
/* Don't allow turbo for D-pad. */
|
||||
if (device == RETRO_DEVICE_JOYPAD && (id < RETRO_DEVICE_ID_JOYPAD_UP ||
|
||||
|
@ -84,11 +84,16 @@ void input_mapper_free(input_mapper_t *handle)
|
||||
void input_mapper_poll(input_mapper_t *handle)
|
||||
{
|
||||
unsigned i, j;
|
||||
input_bits_t current_input;
|
||||
input_bits_t current_input, current_overlay_input;
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned max_users =
|
||||
unsigned max_users =
|
||||
*(input_driver_get_uint(INPUT_ACTION_MAX_USERS));
|
||||
bool key_event[RARCH_CUSTOM_BIND_LIST_END] = { false };
|
||||
bool poll_overlay = false;
|
||||
|
||||
if (input_overlay_is_alive(overlay_ptr))
|
||||
poll_overlay = true;
|
||||
|
||||
|
||||
#ifdef HAVE_MENU
|
||||
if (menu_driver_is_alive())
|
||||
@ -158,7 +163,10 @@ void input_mapper_poll(input_mapper_t *handle)
|
||||
for (j = 0; j < RARCH_FIRST_CUSTOM_BIND; j++)
|
||||
{
|
||||
unsigned current_button_value = BIT256_GET(current_input, j);
|
||||
unsigned remap_button =
|
||||
if (poll_overlay && i == 0)
|
||||
current_button_value |= input_overlay_key_pressed(overlay_ptr, j);
|
||||
|
||||
unsigned remap_button =
|
||||
settings->uints.input_remap_ids[i][j];
|
||||
bool remap_valid = (current_button_value == 1) &&
|
||||
(j != remap_button) && (remap_button != RARCH_UNMAPPED);
|
||||
|
Loading…
x
Reference in New Issue
Block a user