Save archive_mode to config file and change representation

This commit is contained in:
twinaphex 2014-11-14 16:30:55 +01:00
parent 746529671c
commit 3094efdc7e
3 changed files with 30 additions and 0 deletions

View File

@ -34,6 +34,10 @@
# A directory for where to search for libretro core information.
# libretro_info_path =
# Sets mode for archived files in file browser.
# 0 = Ask, 1 = Load Archive, 2 = Open Archive
# archive_mode = 0
# Sets log level for libretro cores (GET_LOG_INTERFACE).
# If a log level issued by a libretro core is below libretro_log_level, it is ignored.
# DEBUG logs are always ignored unless verbose mode is activated (--verbose).

View File

@ -1091,6 +1091,8 @@ static bool config_load_file(const char *path, bool set_defaults)
CONFIG_GET_BOOL_EXTERN(perfcnt_enable, "perfcnt_enable");
CONFIG_GET_INT(archive.mode, "archive_mode");
#ifdef HAVE_OVERLAY
CONFIG_GET_PATH_EXTERN(overlay_dir, "overlay_directory");
if (!strcmp(g_extern.overlay_dir, "default"))
@ -1758,6 +1760,8 @@ bool config_save_file(const char *path)
config_set_bool(conf, "log_verbosity", g_extern.verbosity);
config_set_bool(conf, "perfcnt_enable", g_extern.perfcnt_enable);
config_set_int(conf, "archive_mode", g_settings.archive.mode);
ret = config_file_write(conf, path);
config_file_free(conf);
return ret;

View File

@ -266,6 +266,28 @@ static void menu_common_setting_set_label_st_uint(rarch_setting_t *setting,
strlcpy(type_str, name, type_str_size);
}
else if (strstr(setting->name, "archive_mode"))
{
const char *name = NULL;
switch (g_settings.archive.mode)
{
case 0:
name = "Ask";
break;
case 1:
name = "Load Archive";
break;
case 2:
name = "Open Archive";
break;
default:
name = "Unknown";
break;
}
strlcpy(type_str, name, type_str_size);
}
else if (strstr(setting->name, "analog_dpad_mode"))
{
static const char *modes[] = {