mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
Refactor menu_entries_get_last_setting out of existence
This commit is contained in:
parent
7c3080b312
commit
925d873d91
@ -76,16 +76,13 @@ static int menu_info_screen_iterate(unsigned action)
|
|||||||
if (driver.video_data && driver.menu_ctx && driver.menu_ctx->render)
|
if (driver.video_data && driver.menu_ctx && driver.menu_ctx->render)
|
||||||
driver.menu_ctx->render();
|
driver.menu_ctx->render();
|
||||||
|
|
||||||
current_setting = (rarch_setting_t*)menu_entries_get_last_setting(
|
current_setting = (rarch_setting_t*)setting_data_find_setting(
|
||||||
list->list[driver.menu->selection_ptr].label,
|
driver.menu->list_settings, list->list[driver.menu->selection_ptr].label);
|
||||||
driver.menu->selection_ptr, driver.menu->list_settings);
|
|
||||||
|
|
||||||
if (current_setting)
|
if (current_setting)
|
||||||
strlcpy(needle, current_setting->name, sizeof(needle));
|
strlcpy(needle, current_setting->name, sizeof(needle));
|
||||||
else if ((current_setting = (rarch_setting_t*)menu_entries_get_last_setting(
|
else if ((current_setting = (rarch_setting_t*)setting_data_find_setting(
|
||||||
list->list[driver.menu->selection_ptr].label,
|
driver.menu->list_mainmenu, list->list[driver.menu->selection_ptr].label)))
|
||||||
driver.menu->selection_ptr,
|
|
||||||
driver.menu->list_mainmenu)))
|
|
||||||
{
|
{
|
||||||
if (current_setting)
|
if (current_setting)
|
||||||
strlcpy(needle, current_setting->name, sizeof(needle));
|
strlcpy(needle, current_setting->name, sizeof(needle));
|
||||||
|
@ -390,18 +390,16 @@ int menu_action_setting_set(unsigned id, const char *label,
|
|||||||
|
|
||||||
/* Check if setting belongs to settings menu. */
|
/* Check if setting belongs to settings menu. */
|
||||||
|
|
||||||
rarch_setting_t *setting = (rarch_setting_t*)menu_entries_get_last_setting(
|
rarch_setting_t *setting = (rarch_setting_t*)setting_data_find_setting(
|
||||||
list->list[driver.menu->selection_ptr].label,
|
driver.menu->list_settings, list->list[driver.menu->selection_ptr].label);
|
||||||
driver.menu->selection_ptr, driver.menu->list_settings);
|
|
||||||
|
|
||||||
if (setting)
|
if (setting)
|
||||||
return menu_action_handle_setting(setting, id, label, action);
|
return menu_action_handle_setting(setting, id, label, action);
|
||||||
|
|
||||||
/* Check if setting belongs to main menu. */
|
/* Check if setting belongs to main menu. */
|
||||||
|
|
||||||
setting = (rarch_setting_t*)menu_entries_get_last_setting(
|
setting = (rarch_setting_t*)setting_data_find_setting(
|
||||||
list->list[driver.menu->selection_ptr].label,
|
driver.menu->list_mainmenu, list->list[driver.menu->selection_ptr].label);
|
||||||
driver.menu->selection_ptr, driver.menu->list_mainmenu);
|
|
||||||
|
|
||||||
if (setting)
|
if (setting)
|
||||||
{
|
{
|
||||||
|
@ -917,12 +917,3 @@ int menu_entries_set_current_path_selection(
|
|||||||
|
|
||||||
return menu_action_setting_apply(setting);
|
return menu_action_setting_apply(setting);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *menu_entries_get_last_setting(const char *label, int index,
|
|
||||||
rarch_setting_t *settings)
|
|
||||||
{
|
|
||||||
if (settings)
|
|
||||||
return (rarch_setting_t*)setting_data_find_setting(settings,
|
|
||||||
label);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
@ -46,7 +46,4 @@ int menu_entries_set_current_path_selection(
|
|||||||
const char *label, unsigned type,
|
const char *label, unsigned type,
|
||||||
unsigned action);
|
unsigned action);
|
||||||
|
|
||||||
void *menu_entries_get_last_setting(const char *label, int index,
|
|
||||||
rarch_setting_t *settings);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user