From 070afba5d428dd435d7d412fc13fe1a4ea17e834 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 12 Oct 2015 15:46:21 +0200 Subject: [PATCH] (menu_input.c) Namespace another function --- menu/menu_input.c | 21 +++++++++++---------- menu/menu_input.h | 3 ++- menu/menu_setting.c | 2 +- 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/menu/menu_input.c b/menu/menu_input.c index 58ffbe2e7e..6763606702 100644 --- a/menu/menu_input.c +++ b/menu/menu_input.c @@ -698,6 +698,17 @@ int menu_input_key_bind_set_device_mode(void *data, return 0; } +void menu_input_key_bind_set_min_max(unsigned min, unsigned max) +{ + menu_input_t *menu_input = menu_input_get_ptr(); + + if (!menu_input) + return; + + menu_input->binds.begin = min; + menu_input->binds.last = max; +} + static int menu_input_key_bind_iterate_keyboard(int64_t current, int timeout) { bool timed_out = false; @@ -1164,16 +1175,6 @@ static int menu_input_pointer_post_iterate(menu_file_list_cbs_t *cbs, return ret; } -void menu_input_set_binds_minmax(unsigned min, unsigned max) -{ - menu_input_t *menu_input = menu_input_get_ptr(); - - if (!menu_input) - return; - - menu_input->binds.begin = min; - menu_input->binds.last = max; -} void menu_input_post_iterate(int *ret, unsigned action) { diff --git a/menu/menu_input.h b/menu/menu_input.h index 9a4291fb6e..801f58b847 100644 --- a/menu/menu_input.h +++ b/menu/menu_input.h @@ -111,6 +111,8 @@ int menu_input_key_bind_set_keyboard_mode(void *data, enum menu_input_bind_mode int menu_input_key_bind_set_device_mode(void *data, enum menu_input_bind_mode type); +void menu_input_key_bind_set_min_max(unsigned min, unsigned max); + void menu_input_st_uint_callback(void *userdata, const char *str); void menu_input_st_hex_callback(void *userdata, const char *str); @@ -128,7 +130,6 @@ int16_t menu_input_mouse_state(enum menu_input_mouse_state state); bool menu_input_ctl(enum menu_input_ctl_state state, void *data); -void menu_input_set_binds_minmax(unsigned min, unsigned max); void menu_input_free(void); diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 59bf888507..02e54b3c01 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -1479,7 +1479,7 @@ static int setting_action_ok_bind_defaults(void *data, bool wraparound) if (!target) return -1; - menu_input_set_binds_minmax( + menu_input_key_bind_set_min_max( MENU_SETTINGS_BIND_BEGIN, MENU_SETTINGS_BIND_LAST); for (i = MENU_SETTINGS_BIND_BEGIN;