Rename game_history_size to content_history_size

This commit is contained in:
twinaphex 2014-08-12 04:57:31 +02:00
parent 126e115abd
commit f027acd5cf
9 changed files with 14 additions and 14 deletions

View File

@ -499,7 +499,7 @@ static const uint16_t network_cmd_port = 55355;
static const bool stdin_cmd_enable = false;
// Number of entries that will be kept in content history file.
static const unsigned game_history_size = 100;
static const unsigned default_content_history_size = 100;
// Show Menu start-up screen on boot.
static const bool menu_show_start_screen = true;

View File

@ -744,7 +744,7 @@ bool rarch_environment_cb(unsigned cmd, void *data)
{
bool state = *(const bool*)data;
RARCH_LOG("Environ SET_SUPPORT_NO_GAME: %s.\n", state ? "yes" : "no");
g_extern.system.no_game = state;
g_extern.system.no_content = state;
break;
}

2
file.c
View File

@ -442,7 +442,7 @@ bool init_rom_file(void)
{
attr.i = g_extern.system.info.block_extract;
attr.i |= g_extern.system.info.need_fullpath << 1;
attr.i |= (!g_extern.system.no_game) << 2;
attr.i |= (!g_extern.system.no_content) << 2;
string_list_append(content, g_extern.libretro_no_content ? "" : g_extern.fullpath, attr);
}

View File

@ -4456,7 +4456,7 @@ static void menu_common_setting_set_label(char *type_str, size_t type_str_size,
strlcpy(type_str, *g_settings.menu_content_directory ? g_settings.menu_content_directory : "<default>", type_str_size);
break;
case MENU_CONTENT_HISTORY_SIZE:
snprintf(type_str, type_str_size, "%d", g_settings.game_history_size);
snprintf(type_str, type_str_size, "%d", g_settings.content_history_size);
break;
case MENU_CONTENT_DIR_PATH:
strlcpy(type_str, *g_settings.content_directory ? g_settings.content_directory : "<default>", type_str_size);

View File

@ -91,7 +91,7 @@ void menu_content_history_push_current(void)
if (*tmp)
path_resolve_realpath(tmp, sizeof(tmp));
if (g_extern.system.no_game || *tmp)
if (g_extern.system.no_content || *tmp)
if (g_extern.history)
content_history_push(g_extern.history,
*tmp ? tmp : NULL,

View File

@ -327,7 +327,7 @@ struct settings
char core_options_path[PATH_MAX];
char content_history_path[PATH_MAX];
unsigned game_history_size;
unsigned content_history_size;
char libretro[PATH_MAX];
char libretro_directory[PATH_MAX];
@ -496,7 +496,7 @@ struct global
bool block_extract;
bool force_nonblock;
bool no_game;
bool no_content;
const char *input_desc_btn[MAX_PLAYERS][RARCH_FIRST_CUSTOM_BIND];
char valid_extensions[PATH_MAX];

View File

@ -3272,7 +3272,7 @@ void rarch_main_command(unsigned action)
if (g_extern.history)
return;
g_extern.history = content_history_init(g_settings.content_history_path, g_settings.game_history_size);
g_extern.history = content_history_init(g_settings.content_history_path, g_settings.content_history_size);
break;
case RARCH_CMD_HISTORY_DEINIT:
if (g_extern.history)

View File

@ -367,7 +367,7 @@ void config_set_defaults(void)
g_settings.network_cmd_enable = network_cmd_enable;
g_settings.network_cmd_port = network_cmd_port;
g_settings.stdin_cmd_enable = stdin_cmd_enable;
g_settings.game_history_size = game_history_size;
g_settings.content_history_size = default_content_history_size;
g_settings.libretro_log_level = libretro_log_level;
#ifdef HAVE_MENU
@ -1091,7 +1091,7 @@ bool config_load_file(const char *path, bool set_defaults)
fill_pathname_resolve_relative(g_settings.content_history_path, g_extern.config_path, ".retroarch-game-history.txt", sizeof(g_settings.content_history_path));
CONFIG_GET_PATH(content_history_path, "game_history_path");
CONFIG_GET_INT(game_history_size, "game_history_size");
CONFIG_GET_INT(content_history_size, "game_history_size");
CONFIG_GET_INT(input.turbo_period, "input_turbo_period");
CONFIG_GET_INT(input.turbo_duty_cycle, "input_duty_cycle");
@ -1432,7 +1432,7 @@ bool config_save_file(const char *path)
#endif
config_set_path(conf, "game_history_path", g_settings.content_history_path);
config_set_int(conf, "game_history_size", g_settings.game_history_size);
config_set_int(conf, "game_history_size", g_settings.content_history_size);
config_set_path(conf, "joypad_autoconfig_dir", g_settings.input.autoconfig_dir);
config_set_bool(conf, "input_autodetect_enable", g_settings.input.autodetect_enable);

View File

@ -966,7 +966,7 @@ static void general_read_handler(const void *data)
else if (!strcmp(setting->name, "rgui_show_start_screen"))
*setting->value.boolean = g_settings.menu_show_start_screen;
else if (!strcmp(setting->name, "game_history_size"))
*setting->value.unsigned_integer = g_settings.game_history_size;
*setting->value.unsigned_integer = g_settings.content_history_size;
else if (!strcmp(setting->name, "content_directory"))
strlcpy(setting->value.string, g_settings.content_directory, setting->size);
#ifdef HAVE_MENU
@ -1313,7 +1313,7 @@ static void general_write_handler(const void *data)
else if (!strcmp(setting->name, "rgui_show_start_screen"))
g_settings.menu_show_start_screen = *setting->value.boolean;
else if (!strcmp(setting->name, "game_history_size"))
g_settings.game_history_size = *setting->value.unsigned_integer;
g_settings.content_history_size = *setting->value.unsigned_integer;
else if (!strcmp(setting->name, "content_directory"))
strlcpy(g_settings.content_directory, setting->value.string, sizeof(g_settings.content_directory));
#ifdef HAVE_MENU
@ -1750,7 +1750,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_write_handler, general_read_handler)
#endif
CONFIG_UINT(g_settings.game_history_size, "game_history_size", "Content History Size", game_history_size, GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_RANGE(0, 0, 1.0, true, false)
CONFIG_UINT(g_settings.content_history_size, "game_history_size", "Content History Size", default_content_history_size, GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_RANGE(0, 0, 1.0, true, false)
END_SUB_GROUP()
START_SUB_GROUP("Paths")
#ifdef HAVE_MENU