(Menu) Refactor MENU_CONTENT_HISTORY_SIZE

This commit is contained in:
twinaphex 2014-07-17 21:58:47 +02:00
parent 26a3277402
commit cecdee7f54
2 changed files with 2 additions and 15 deletions

View File

@ -3945,20 +3945,7 @@ static int menu_common_setting_set(unsigned setting, unsigned action)
break;
case MENU_CONTENT_HISTORY_SIZE:
if ((current_setting = setting_data_find_setting(setting_data, "game_history_size")))
{
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);
}
menu_common_setting_set_current_unsigned_integer(current_setting, 1, action, true, false);
break;
#ifdef HAVE_OVERLAY
case MENU_SETTINGS_OVERLAY_ENABLE:

View File

@ -1054,7 +1054,7 @@ rarch_setting_t* setting_data_get_list(void)
#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)
#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()
START_SUB_GROUP("Paths")
#ifdef HAVE_MENU