mirror of
https://github.com/libretro/RetroArch
synced 2025-03-31 10:20:41 +00:00
(Menu) Refactor MENU_CONTENT_HISTORY_SIZE
This commit is contained in:
parent
26a3277402
commit
cecdee7f54
@ -3945,20 +3945,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
|
|||||||
break;
|
break;
|
||||||
case MENU_CONTENT_HISTORY_SIZE:
|
case MENU_CONTENT_HISTORY_SIZE:
|
||||||
if ((current_setting = setting_data_find_setting(setting_data, "game_history_size")))
|
if ((current_setting = setting_data_find_setting(setting_data, "game_history_size")))
|
||||||
{
|
menu_common_setting_set_current_unsigned_integer(current_setting, 1, action, true, false);
|
||||||
if (action == MENU_ACTION_RIGHT)
|
|
||||||
*current_setting->value.unsigned_integer = *current_setting->value.unsigned_integer + 1;
|
|
||||||
else if (action == MENU_ACTION_LEFT)
|
|
||||||
{
|
|
||||||
if (*current_setting->value.unsigned_integer > 0)
|
|
||||||
*current_setting->value.unsigned_integer = *current_setting->value.unsigned_integer - 1;
|
|
||||||
}
|
|
||||||
else if (action == MENU_ACTION_START)
|
|
||||||
*current_setting->value.unsigned_integer = game_history_size;
|
|
||||||
|
|
||||||
if (current_setting->change_handler)
|
|
||||||
current_setting->change_handler(current_setting);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
#ifdef HAVE_OVERLAY
|
#ifdef HAVE_OVERLAY
|
||||||
case MENU_SETTINGS_OVERLAY_ENABLE:
|
case MENU_SETTINGS_OVERLAY_ENABLE:
|
||||||
|
@ -1054,7 +1054,7 @@ rarch_setting_t* setting_data_get_list(void)
|
|||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
CONFIG_BOOL(g_settings.menu_show_start_screen, "rgui_show_start_screen", "Show Start Screen", menu_show_start_screen, GROUP_NAME, SUBGROUP_NAME, general_change_handler)
|
CONFIG_BOOL(g_settings.menu_show_start_screen, "rgui_show_start_screen", "Show Start Screen", menu_show_start_screen, GROUP_NAME, SUBGROUP_NAME, general_change_handler)
|
||||||
#endif
|
#endif
|
||||||
CONFIG_UINT(g_settings.game_history_size, "game_history_size", "Content History Size", game_history_size, GROUP_NAME, SUBGROUP_NAME, general_change_handler)
|
CONFIG_UINT(g_settings.game_history_size, "game_history_size", "Content History Size", game_history_size, GROUP_NAME, SUBGROUP_NAME, general_change_handler) WITH_RANGE(0, 0)
|
||||||
END_SUB_GROUP()
|
END_SUB_GROUP()
|
||||||
START_SUB_GROUP("Paths")
|
START_SUB_GROUP("Paths")
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
|
Loading…
x
Reference in New Issue
Block a user