diff --git a/blackberry-qnx/qnx_input.c b/blackberry-qnx/qnx_input.c index cbb1074a09..db57283f84 100644 --- a/blackberry-qnx/qnx_input.c +++ b/blackberry-qnx/qnx_input.c @@ -646,46 +646,6 @@ static void qnx_input_set_keybinds(void *data, unsigned device, unsigned port, (void)device; - if (keybind_action & (1ULL << KEYBINDS_ACTION_DECREMENT_BIND)) - { - if (joykey == NO_BTN) - *key = platform_keys[arr_size - 1].joykey; - else if (platform_keys[0].joykey == joykey) - *key = NO_BTN; - else - { - *key = NO_BTN; - for (size_t i = 1; i < arr_size; i++) - { - if (platform_keys[i].joykey == joykey) - { - *key = platform_keys[i - 1].joykey; - break; - } - } - } - } - - if (keybind_action & (1ULL << KEYBINDS_ACTION_INCREMENT_BIND)) - { - if (joykey == NO_BTN) - *key = platform_keys[0].joykey; - else if (platform_keys[arr_size - 1].joykey == joykey) - *key = NO_BTN; - else - { - *key = NO_BTN; - for (size_t i = 0; i < arr_size - 1; i++) - { - if (platform_keys[i].joykey == joykey) - { - *key = platform_keys[i + 1].joykey; - break; - } - } - } - } - if (keybind_action & (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND)) *key = g_settings.input.binds[port][id].def_joykey; #endif diff --git a/driver.h b/driver.h index 7a780310ae..343b29ac85 100644 --- a/driver.h +++ b/driver.h @@ -302,8 +302,6 @@ enum analog_dpad_bind_enums enum keybind_set_id { KEYBINDS_ACTION_NONE = 0, - KEYBINDS_ACTION_DECREMENT_BIND, - KEYBINDS_ACTION_INCREMENT_BIND, KEYBINDS_ACTION_SET_DEFAULT_BIND, KEYBINDS_ACTION_SET_DEFAULT_BINDS, KEYBINDS_ACTION_SET_ANALOG_DPAD_NONE, diff --git a/frontend/menu/menu_settings.c b/frontend/menu/menu_settings.c index bb88874376..714df33ce9 100644 --- a/frontend/menu/menu_settings.c +++ b/frontend/menu/menu_settings.c @@ -509,10 +509,6 @@ int menu_set_settings(unsigned setting, unsigned action) if (action == RGUI_ACTION_START) keybind_action = (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND); - else if (action == RGUI_ACTION_LEFT) - keybind_action = (1ULL << KEYBINDS_ACTION_DECREMENT_BIND); - else if (action == RGUI_ACTION_RIGHT) - keybind_action = (1ULL << KEYBINDS_ACTION_INCREMENT_BIND); // FIXME: The array indices here look totally wrong ... Fixed it so it looks kind of sane for now. if (keybind_action != KEYBINDS_ACTION_NONE) diff --git a/frontend/menu/rmenu.c b/frontend/menu/rmenu.c index 6e33166dee..ffa6050380 100644 --- a/frontend/menu/rmenu.c +++ b/frontend/menu/rmenu.c @@ -658,13 +658,6 @@ static void set_keybind_digital(unsigned default_retro_joypad_id, uint64_t actio switch (action) { - case RGUI_ACTION_LEFT: - keybind_action = (1ULL << KEYBINDS_ACTION_DECREMENT_BIND); - break; - case RGUI_ACTION_RIGHT: - case RGUI_ACTION_OK: - keybind_action = (1ULL << KEYBINDS_ACTION_INCREMENT_BIND); - break; case RGUI_ACTION_START: keybind_action = (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND); break; diff --git a/frontend/menu/rmenu_xui.cpp b/frontend/menu/rmenu_xui.cpp index e0ebbdf6ea..2bbd2e18cd 100644 --- a/frontend/menu/rmenu_xui.cpp +++ b/frontend/menu/rmenu_xui.cpp @@ -618,43 +618,6 @@ HRESULT CRetroArchControls::OnControlNavigate( case SETTING_CONTROLS_DEFAULT_ALL: break; default: - if (action == RGUI_ACTION_LEFT) - { - struct platform_bind key_label; - strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc)); - key_label.joykey = g_settings.input.binds[rgui->current_pad][current_index].joykey; - - if (driver.input->set_keybinds) - driver.input->set_keybinds(&key_label, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL)); - - if (driver.input->set_keybinds) - driver.input->set_keybinds(driver.input_data, g_settings.input.device[rgui->current_pad], - rgui->current_pad, current_index, (1ULL << KEYBINDS_ACTION_DECREMENT_BIND)); - - snprintf(button, sizeof(button), "%s #%d: %s", - g_settings.input.binds[rgui->current_pad][current_index].desc, - rgui->current_pad, key_label.desc); - mbstowcs(strw_buffer, button, sizeof(strw_buffer) / sizeof(wchar_t)); - XuiListSetText(m_menulist, current_index, strw_buffer); - } - else if (action == RGUI_ACTION_RIGHT) - { - struct platform_bind key_label; - strlcpy(key_label.desc, "Unknown", sizeof(key_label.desc)); - key_label.joykey = g_settings.input.binds[rgui->current_pad][current_index].joykey; - - if (driver.input->set_keybinds) - driver.input->set_keybinds(&key_label, 0, 0, 0, (1ULL << KEYBINDS_ACTION_GET_BIND_LABEL)); - if (driver.input->set_keybinds) - driver.input->set_keybinds(driver.input_data, g_settings.input.device[rgui->current_pad], - rgui->current_pad, current_index, (1ULL << KEYBINDS_ACTION_INCREMENT_BIND)); - - snprintf(button, sizeof(button), "%s #%d: %s", - g_settings.input.binds[rgui->current_pad][current_index].desc, rgui->current_pad, - key_label.desc); - mbstowcs(strw_buffer, button, sizeof(strw_buffer) / sizeof(wchar_t)); - XuiListSetText(m_menulist, current_index, strw_buffer); - } break; } diff --git a/gx/gx_input.c b/gx/gx_input.c index e00560f8fa..7a5dd1d06f 100644 --- a/gx/gx_input.c +++ b/gx/gx_input.c @@ -185,46 +185,6 @@ static void gx_input_set_keybinds(void *data, unsigned device, unsigned port, (void)device; - if (keybind_action & (1ULL << KEYBINDS_ACTION_DECREMENT_BIND)) - { - if (joykey == NO_BTN) - *key = platform_keys[arr_size - 1].joykey; - else if (platform_keys[0].joykey == joykey) - *key = NO_BTN; - else - { - *key = NO_BTN; - for (size_t i = 1; i < arr_size; i++) - { - if (platform_keys[i].joykey == joykey) - { - *key = platform_keys[i - 1].joykey; - break; - } - } - } - } - - if (keybind_action & (1ULL << KEYBINDS_ACTION_INCREMENT_BIND)) - { - if (joykey == NO_BTN) - *key = platform_keys[0].joykey; - else if (platform_keys[arr_size - 1].joykey == joykey) - *key = NO_BTN; - else - { - *key = NO_BTN; - for (size_t i = 0; i < arr_size - 1; i++) - { - if (platform_keys[i].joykey == joykey) - { - *key = platform_keys[i + 1].joykey; - break; - } - } - } - } - if (keybind_action & (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND)) *key = g_settings.input.binds[port][id].def_joykey; diff --git a/ps3/ps3_input.c b/ps3/ps3_input.c index bc7cc59a0a..6a74123583 100644 --- a/ps3/ps3_input.c +++ b/ps3/ps3_input.c @@ -345,46 +345,6 @@ static void ps3_input_set_keybinds(void *data, unsigned device, (void)device; - if (keybind_action & (1ULL << KEYBINDS_ACTION_DECREMENT_BIND)) - { - if (joykey == NO_BTN) - *key = platform_keys[arr_size - 1].joykey; - else if (platform_keys[0].joykey == joykey) - *key = NO_BTN; - else - { - *key = NO_BTN; - for (size_t i = 1; i < arr_size; i++) - { - if (platform_keys[i].joykey == joykey) - { - *key = platform_keys[i - 1].joykey; - break; - } - } - } - } - - if (keybind_action & (1ULL << KEYBINDS_ACTION_INCREMENT_BIND)) - { - if (joykey == NO_BTN) - *key = platform_keys[0].joykey; - else if (platform_keys[arr_size - 1].joykey == joykey) - *key = NO_BTN; - else - { - *key = NO_BTN; - for (size_t i = 0; i < arr_size - 1; i++) - { - if (platform_keys[i].joykey == joykey) - { - *key = platform_keys[i + 1].joykey; - break; - } - } - } - } - if (keybind_action & (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND)) *key = g_settings.input.binds[port][id].def_joykey; diff --git a/xdk/xdk_xinput_input.c b/xdk/xdk_xinput_input.c index 591c369097..5ebdf7dc77 100644 --- a/xdk/xdk_xinput_input.c +++ b/xdk/xdk_xinput_input.c @@ -218,46 +218,6 @@ static void xdk_input_set_keybinds(void *data, unsigned device, (void)device; - if (keybind_action & (1ULL << KEYBINDS_ACTION_DECREMENT_BIND)) - { - if (joykey == NO_BTN) - *key = platform_keys[arr_size - 1].joykey; - else if (platform_keys[0].joykey == joykey) - *key = NO_BTN; - else - { - *key = NO_BTN; - for (size_t i = 1; i < arr_size; i++) - { - if (platform_keys[i].joykey == joykey) - { - *key = platform_keys[i - 1].joykey; - break; - } - } - } - } - - if (keybind_action & (1ULL << KEYBINDS_ACTION_INCREMENT_BIND)) - { - if (joykey == NO_BTN) - *key = platform_keys[0].joykey; - else if (platform_keys[arr_size - 1].joykey == joykey) - *key = NO_BTN; - else - { - *key = NO_BTN; - for (size_t i = 0; i < arr_size - 1; i++) - { - if (platform_keys[i].joykey == joykey) - { - *key = platform_keys[i + 1].joykey; - break; - } - } - } - } - if (keybind_action & (1ULL << KEYBINDS_ACTION_SET_DEFAULT_BIND)) *key = g_settings.input.binds[port][id].def_joykey;