mirror of
https://github.com/libretro/RetroArch
synced 2025-04-02 07:20:34 +00:00
Simplify action_iterate_info
This commit is contained in:
parent
512e126a26
commit
7738b7e2f4
@ -170,6 +170,7 @@ static int action_iterate_help(char *s, size_t len, const char *label)
|
|||||||
|
|
||||||
static int action_iterate_info(char *s, size_t len, const char *label)
|
static int action_iterate_info(char *s, size_t len, const char *label)
|
||||||
{
|
{
|
||||||
|
uint32_t label_hash = 0;
|
||||||
char needle[PATH_MAX_LENGTH] = {0};
|
char needle[PATH_MAX_LENGTH] = {0};
|
||||||
menu_file_list_cbs_t *cbs = NULL;
|
menu_file_list_cbs_t *cbs = NULL;
|
||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
menu_list_t *menu_list = menu_list_get_ptr();
|
||||||
@ -192,9 +193,9 @@ static int action_iterate_info(char *s, size_t len, const char *label)
|
|||||||
strlcpy(needle, lbl, sizeof(needle));
|
strlcpy(needle, lbl, sizeof(needle));
|
||||||
}
|
}
|
||||||
|
|
||||||
setting_get_description(needle, s, len);
|
label_hash = menu_hash_calculate(needle);
|
||||||
|
|
||||||
return 0;
|
return menu_hash_get_help(label_hash, s, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int action_iterate_menu_viewport(char *s, size_t len,
|
static int action_iterate_menu_viewport(char *s, size_t len,
|
||||||
|
@ -1900,26 +1900,6 @@ static rarch_setting_t setting_string_setting_options(enum setting_type type,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* setting_get_description:
|
|
||||||
* @label : identifier label of setting
|
|
||||||
* @s : output message
|
|
||||||
* @len : size of @s
|
|
||||||
*
|
|
||||||
* Writes a 'Help' description message to @s if there is
|
|
||||||
* one available based on the identifier label of the setting
|
|
||||||
* (@label).
|
|
||||||
*
|
|
||||||
* Returns: 0 (always for now). TODO: make it handle -1 as well.
|
|
||||||
**/
|
|
||||||
int setting_get_description(const char *label, char *s,
|
|
||||||
size_t len)
|
|
||||||
{
|
|
||||||
uint32_t label_hash = menu_hash_calculate(label);
|
|
||||||
|
|
||||||
return menu_hash_get_help(label_hash, s, len);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void get_string_representation_bind_device(void * data, char *s,
|
static void get_string_representation_bind_device(void * data, char *s,
|
||||||
size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
|
@ -247,20 +247,6 @@ int setting_set_with_string_representation(
|
|||||||
**/
|
**/
|
||||||
void setting_get_string_representation(void *data, char *s, size_t len);
|
void setting_get_string_representation(void *data, char *s, size_t len);
|
||||||
|
|
||||||
/**
|
|
||||||
* setting_get_description:
|
|
||||||
* @label : identifier label of setting
|
|
||||||
* @s : output message
|
|
||||||
* @len : size of @s
|
|
||||||
*
|
|
||||||
* Writes a 'Help' description message to @s if there is
|
|
||||||
* one available based on the identifier label of the setting
|
|
||||||
* (@label).
|
|
||||||
*
|
|
||||||
* Returns: 0 (always for now). TODO: make it handle -1 as well.
|
|
||||||
**/
|
|
||||||
int setting_get_description(const char *label, char *s, size_t len);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* setting_get_label:
|
* setting_get_label:
|
||||||
* @list : File list on which to perform the search
|
* @list : File list on which to perform the search
|
||||||
|
Loading…
x
Reference in New Issue
Block a user