From bd289b32ea7cfc2e238afd9347f000b57f1951b7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 12 Oct 2015 15:41:14 +0200 Subject: [PATCH] (menu_input.c) Better namespacing --- menu/drivers/menu_generic.c | 2 +- menu/menu_input.c | 8 ++++---- menu/menu_input.h | 8 ++++---- menu/menu_setting.c | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/menu/drivers/menu_generic.c b/menu/drivers/menu_generic.c index c85dd3fc78..6c5261caa9 100644 --- a/menu/drivers/menu_generic.c +++ b/menu/drivers/menu_generic.c @@ -240,7 +240,7 @@ int generic_menu_iterate(enum menu_action action) BIT64_SET(menu->state, MENU_STATE_POP_STACK); break; case ITERATE_TYPE_BIND: - if (menu_input_bind_iterate(menu->menu_state.msg, sizeof(menu->menu_state.msg))) + if (menu_input_key_bind_iterate(menu->menu_state.msg, sizeof(menu->menu_state.msg))) { menu_list_pop_stack(menu_list, &selection); menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &selection); diff --git a/menu/menu_input.c b/menu/menu_input.c index c22549942b..02eccbccf1 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -664,7 +664,7 @@ static int menu_input_set_timeout(void) return 0; } -int menu_input_set_keyboard_bind_mode(void *data, +int menu_input_key_bind_set_keyboard_mode(void *data, enum menu_input_bind_mode type) { rarch_setting_t *setting = (rarch_setting_t*)data; @@ -698,7 +698,7 @@ int menu_input_set_input_device_bind_mode(void *data, return 0; } -static int menu_input_bind_iterate_keyboard(int64_t current, int timeout) +static int menu_input_key_bind_iterate_keyboard(int64_t current, int timeout) { bool timed_out = false; menu_input_t *menu_input = menu_input_get_ptr(); @@ -735,7 +735,7 @@ static int menu_input_bind_iterate_keyboard(int64_t current, int timeout) return 0; } -int menu_input_bind_iterate(char *s, size_t len) +int menu_input_key_bind_iterate(char *s, size_t len) { struct menu_bind_state binds; menu_input_t *menu_input = menu_input_get_ptr(); @@ -753,7 +753,7 @@ int menu_input_bind_iterate(char *s, size_t len) menu_input->binds.begin - MENU_SETTINGS_BIND_BEGIN].desc, timeout, menu_hash_to_str(MENU_VALUE_SECONDS)); - return menu_input_bind_iterate_keyboard(current, timeout); + return menu_input_key_bind_iterate_keyboard(current, timeout); } else snprintf(s, len, diff --git a/menu/menu_input.h b/menu/menu_input.h index e4a8e6c820..e86e3e5542 100644 --- a/menu/menu_input.h +++ b/menu/menu_input.h @@ -105,6 +105,10 @@ void menu_input_key_start_line(const char *label, const char *label_setting, unsigned type, unsigned idx, input_keyboard_line_complete_t cb); +int menu_input_key_bind_iterate(char *s, size_t len); + +int menu_input_key_bind_set_keyboard_mode(void *data, enum menu_input_bind_mode type); + void menu_input_st_uint_callback(void *userdata, const char *str); void menu_input_st_hex_callback(void *userdata, const char *str); @@ -112,14 +116,10 @@ void menu_input_st_string_callback(void *userdata, const char *str); void menu_input_st_cheat_callback(void *userdata, const char *str); -int menu_input_bind_iterate(char *s, size_t len); - unsigned menu_input_frame(retro_input_t input, retro_input_t trigger_state); void menu_input_post_iterate(int *ret, unsigned action); -int menu_input_set_keyboard_bind_mode(void *data, enum menu_input_bind_mode type); - int menu_input_set_input_device_bind_mode(void *data, enum menu_input_bind_mode type); int16_t menu_input_pointer_state(enum menu_input_pointer_state state); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 35c4eb88e5..276f7920ea 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -1429,7 +1429,7 @@ static int setting_action_ok_bind_all(void *data, bool wraparound) return -1; if (global->menu.bind_mode_keyboard) - menu_input_set_keyboard_bind_mode(data, MENU_INPUT_BIND_ALL); + menu_input_key_bind_set_keyboard_mode(data, MENU_INPUT_BIND_ALL); else menu_input_set_input_device_bind_mode(data, MENU_INPUT_BIND_ALL); @@ -1576,7 +1576,7 @@ static int setting_bind_action_ok(void *data, bool wraparound) (void)wraparound; if (global->menu.bind_mode_keyboard) - menu_input_set_keyboard_bind_mode(data, MENU_INPUT_BIND_SINGLE); + menu_input_key_bind_set_keyboard_mode(data, MENU_INPUT_BIND_SINGLE); else menu_input_set_input_device_bind_mode(data, MENU_INPUT_BIND_SINGLE);