mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
Create MENU_ENTRIES_CTL_SETTINGS_GET
This commit is contained in:
parent
7942328e39
commit
ee312b346b
@ -355,15 +355,6 @@ void menu_entries_refresh(file_list_t *list)
|
||||
}
|
||||
}
|
||||
|
||||
rarch_setting_t *menu_setting_get_ptr(void)
|
||||
{
|
||||
menu_entries_t *entries = menu_entries_data;
|
||||
|
||||
if (!entries)
|
||||
return NULL;
|
||||
return entries->list_settings;
|
||||
}
|
||||
|
||||
/* Sets the starting index of the menu entry list. */
|
||||
void menu_entries_set_start(size_t i)
|
||||
{
|
||||
@ -726,6 +717,14 @@ bool menu_entries_ctl(enum menu_entries_ctl_state state, void *data)
|
||||
*list = entries->menu_list;
|
||||
}
|
||||
return true;
|
||||
case MENU_ENTRIES_CTL_SETTINGS_GET:
|
||||
{
|
||||
rarch_setting_t **settings = (rarch_setting_t**)data;
|
||||
if (!settings || !entries)
|
||||
return false;
|
||||
*settings = entries->list_settings;
|
||||
}
|
||||
return true;
|
||||
case MENU_ENTRIES_CTL_INIT:
|
||||
return menu_entries_init();
|
||||
case MENU_ENTRIES_CTL_SHOW_BACK:
|
||||
|
@ -107,6 +107,7 @@ enum menu_entries_ctl_state
|
||||
MENU_ENTRIES_CTL_DEINIT,
|
||||
MENU_ENTRIES_CTL_INIT,
|
||||
MENU_ENTRIES_CTL_LIST_GET,
|
||||
MENU_ENTRIES_CTL_SETTINGS_GET,
|
||||
MENU_ENTRIES_CTL_NEEDS_REFRESH,
|
||||
MENU_ENTRIES_CTL_SHOW_BACK
|
||||
};
|
||||
@ -125,8 +126,6 @@ int menu_entries_get_title(char *title, size_t title_len);
|
||||
|
||||
int menu_entries_get_core_title(char *title_msg, size_t title_msg_len);
|
||||
|
||||
rarch_setting_t *menu_setting_get_ptr(void);
|
||||
|
||||
void menu_entries_set_refresh(bool nonblocking);
|
||||
|
||||
void menu_entries_unset_refresh(bool nonblocking);
|
||||
|
@ -1856,8 +1856,10 @@ uint32_t menu_setting_get_index(rarch_setting_t *setting)
|
||||
**/
|
||||
rarch_setting_t *menu_setting_find(const char *label)
|
||||
{
|
||||
rarch_setting_t *setting = menu_setting_get_ptr();
|
||||
uint32_t needle = 0;
|
||||
rarch_setting_t *setting = NULL;
|
||||
uint32_t needle = 0;
|
||||
|
||||
menu_entries_ctl(MENU_ENTRIES_CTL_SETTINGS_GET, &setting);
|
||||
|
||||
if (!setting || !label)
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user