diff --git a/input/drivers/android_input.c b/input/drivers/android_input.c index 633557c41f..ccdaa830e3 100644 --- a/input/drivers/android_input.c +++ b/input/drivers/android_input.c @@ -1242,10 +1242,11 @@ static void android_input_poll_memcpy(void *data) static bool android_input_key_pressed(void *data, int key) { rarch_joypad_info_t joypad_info; - android_input_t *android = (android_input_t*)data; - settings_t *settings = config_get_ptr(); + android_input_t *android = (android_input_t*)data; + settings_t *settings = config_get_ptr(); + const struct retro_keybind *keyptr = input_config_get_specific_bind(0, key); - if( settings->input.binds[0][key].valid + if( keyptr->valid && android_keyboard_port_input_pressed(input_config_get_binds(0), key)) return true; @@ -1254,9 +1255,9 @@ static bool android_input_key_pressed(void *data, int key) joypad_info.auto_binds = input_autoconfigure_get_binds(0); joypad_info.axis_threshold = settings->input.axis_threshold; - if (settings->input.binds[0][key].valid && + if (keyptr->valid && input_joypad_pressed(android->joypad, joypad_info, - 0, settings->input.binds[0], key)) + 0, input_config_get_binds(0), key)) return true; return false; diff --git a/input/input_driver.c b/input/input_driver.c index 9d822185db..11c18ecb59 100644 --- a/input/input_driver.c +++ b/input/input_driver.c @@ -1026,7 +1026,7 @@ bool input_driver_init(void) settings_t *settings = config_get_ptr(); for (i = 0; i < MAX_USERS; i++) - libretro_input_binds[i] = settings->input.binds[i]; + libretro_input_binds[i] = input_config_get_binds(i); if (current_input) current_input_data = current_input->init(settings->input.joypad_driver); diff --git a/menu/cbs/menu_cbs_start.c b/menu/cbs/menu_cbs_start.c index 84ef967490..9d16959ce3 100644 --- a/menu/cbs/menu_cbs_start.c +++ b/menu/cbs/menu_cbs_start.c @@ -39,6 +39,7 @@ #include "../../gfx/video_shader_driver.h" +#include "../../input/input_config.h" #include "../../input/input_remapping.h" #ifndef BIND_ACTION_START @@ -109,8 +110,11 @@ static int action_start_input_desc(unsigned type, const char *label) (void)label; if (inp_desc_button_index_offset < RARCH_FIRST_CUSTOM_BIND) - settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset] = - settings->input.binds[inp_desc_user][inp_desc_button_index_offset].id; + { + const struct retro_keybind *keyptr = input_config_get_specific_bind(inp_desc_user, + inp_desc_button_index_offset); + settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset] = keyptr->id; + } else settings->input.remap_ids[inp_desc_user][inp_desc_button_index_offset] = inp_desc_button_index_offset - RARCH_FIRST_CUSTOM_BIND;