(menu_input.c) Namespace another function

This commit is contained in:
twinaphex 2015-10-12 15:46:21 +02:00
parent 9cf699b9c8
commit 070afba5d4
3 changed files with 14 additions and 12 deletions

View File

@ -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)
{

View File

@ -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);

View File

@ -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;