mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 08:30:16 +00:00
Create menu_input_set_binds_minmax
This commit is contained in:
parent
a892f5901e
commit
115c8cdf12
@ -1031,6 +1031,17 @@ 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)
|
||||
{
|
||||
menu_entry_t entry = {{0}};
|
||||
|
@ -233,6 +233,8 @@ int16_t menu_input_mouse_state(enum menu_input_mouse_state state);
|
||||
|
||||
bool menu_input_ctl(enum menu_ctl_state state, void *data);
|
||||
|
||||
void menu_input_set_binds_minmax(unsigned min, unsigned max);
|
||||
|
||||
menu_input_t *menu_input_get_ptr(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
@ -996,14 +996,11 @@ static int setting_action_ok_bind_defaults(void *data, bool wraparound)
|
||||
struct retro_keybind *target = NULL;
|
||||
const struct retro_keybind *def_binds = NULL;
|
||||
rarch_setting_t *setting = (rarch_setting_t*)data;
|
||||
menu_input_t *menu_input = menu_input_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
(void)wraparound;
|
||||
|
||||
if (!menu_input)
|
||||
return -1;
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
@ -1015,8 +1012,8 @@ static int setting_action_ok_bind_defaults(void *data, bool wraparound)
|
||||
if (!target)
|
||||
return -1;
|
||||
|
||||
menu_input->binds.begin = MENU_SETTINGS_BIND_BEGIN;
|
||||
menu_input->binds.last = MENU_SETTINGS_BIND_LAST;
|
||||
menu_input_set_binds_minmax(
|
||||
MENU_SETTINGS_BIND_BEGIN, MENU_SETTINGS_BIND_LAST);
|
||||
|
||||
for (i = MENU_SETTINGS_BIND_BEGIN;
|
||||
i <= MENU_SETTINGS_BIND_LAST; i++, target++)
|
||||
|
Loading…
Reference in New Issue
Block a user