Add History List Enable option

This commit is contained in:
twinaphex 2014-10-17 04:17:28 +02:00
parent d3b27fd888
commit 0f5161d621
7 changed files with 37 additions and 9 deletions

View file

@ -309,6 +309,10 @@ enum
#define DEFAULT_ASPECT_RATIO -1.0f
#endif
static const bool def_history_list_enable = true;
static const unsigned int def_user_language = 0;
/* VIDEO */
#if defined(_XBOX360)
@ -317,8 +321,6 @@ enum
#define DEFAULT_GAMMA 0
#endif
static const unsigned int def_user_language = 0;
/* Windowed
* Real x resolution = aspect * base_size * x scale
* Real y resolution = base_size * y scale

View file

@ -228,15 +228,16 @@ returntype main_entry(signature())
rarch_main_command(RARCH_CMD_HISTORY_INIT);
#if defined(HAVE_MENU)
if (g_settings.history_list_enable)
{
#if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE)
if (ret)
#endif
rarch_playlist_push(g_defaults.history,
g_extern.fullpath,
g_settings.libretro,
&g_extern.system.info);
if (ret)
#endif
rarch_playlist_push(g_defaults.history,
g_extern.fullpath,
g_settings.libretro,
&g_extern.system.info);
}
#if defined(HAVE_MAIN_LOOP)
while (main_entry_decide(signature_expand(), args) != -1);

View file

@ -80,6 +80,9 @@ static void menu_environment_get(int *argc, char *argv[],
static void push_to_history_playlist(void)
{
if (!g_settings.history_list_enable)
return;
if (*g_extern.fullpath)
{
char tmp[PATH_MAX];

View file

@ -388,6 +388,7 @@ struct settings
char extraction_directory[PATH_MAX];
char playlist_directory[PATH_MAX];
bool history_list_enable;
bool rewind_enable;
size_t rewind_buffer_size;
unsigned rewind_granularity;

View file

@ -43,6 +43,10 @@
# Enable or disable verbosity level of frontend.
# log_verbosity = false
# If this option is enabled, every content file loaded in RetroArch will be
# automatically added to a history list.
# history_list_enable = true
# Enable or disable RetroArch performance counters
# perfcnt_enable = false

View file

@ -332,6 +332,7 @@ static void config_set_defaults(void)
def_menu, sizeof(g_settings.menu.driver));
#endif
g_settings.history_list_enable = def_history_list_enable;
g_settings.load_dummy_on_core_shutdown = load_dummy_on_core_shutdown;
g_settings.video.scale = scale;
@ -1124,6 +1125,8 @@ static bool config_load_file(const char *path, bool set_defaults)
g_extern.config_path, "retroarch-content-history.txt",
sizeof(g_settings.content_history_path));
CONFIG_GET_BOOL(history_list_enable, "history_list_enable");
CONFIG_GET_PATH(content_history_path, "game_history_path");
CONFIG_GET_INT(content_history_size, "game_history_size");
@ -1679,6 +1682,8 @@ bool config_save_file(const char *path)
g_settings.savestate_auto_save);
config_set_bool(conf, "savestate_auto_load",
g_settings.savestate_auto_load);
config_set_bool(conf, "history_list_enable",
g_settings.history_list_enable);
config_set_float(conf, "fastforward_ratio", g_settings.fastforward_ratio);
config_set_bool(conf, "fastforward_ratio_throttle_enable", g_settings.fastforward_ratio_throttle_enable);

View file

@ -3041,6 +3041,18 @@ static bool setting_data_append_list_general_options(
general_write_handler,
general_read_handler);
CONFIG_BOOL(
g_settings.history_list_enable,
"history_list_enable",
"History List Enable",
true,
"OFF",
"ON",
group_info.name,
subgroup_info.name,
general_write_handler,
general_read_handler);
CONFIG_UINT(g_settings.libretro_log_level,
"libretro_log_level",
"Libretro Logging Level",