From 3ed932146888acac27ee171c2e9c7299463974ed Mon Sep 17 00:00:00 2001 From: Themaister Date: Tue, 1 Oct 2013 12:08:20 +0200 Subject: [PATCH] Update man-page and --help. Remove an obsolete per-game config support. It doesn't work with the RGUI concept at all and is mostly just confusing. --- docs/retroarch.1 | 11 ++++++++--- retroarch.c | 15 ++------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/docs/retroarch.1 b/docs/retroarch.1 index 5de513d78d..30f4f0ffcb 100644 --- a/docs/retroarch.1 +++ b/docs/retroarch.1 @@ -74,14 +74,19 @@ Always starts RetroArch in fullscreen. Disregards settings in configuration file Sets the configuration file path. \fBretroarch\fR will use this path to load the configuration file. Should this not be defined, \fBretroarch\fR will look in platform specific paths to attempt finding the config file. /etc/retroarch.cfg (when installed), or retroarch.cfg in the source tarball serves as a skeleton configuration file. -If PATH is a directory, RetroArch will treat this as the config file directory, where the state file name will be inferred from the rom name (*.cfg). -If a config cannot be found when using directory path, the default config path will be used instead. +/etc/retroarch.cfg should serve as a skeleton config only, and not used as a config file. .IP -Unix-like systems will look in $XDG_CONFIG_HOME/retroarch/retroarch.cfg first. If $XDG_CONFIG_HOME is not defined, it is assumed to be $HOME/.config as per specification. Then it will try $HOME/.retroarch.cfg. Last, it will try /etc/retroarch.cfg. If no configuration is found, default settings will be assumed. A configuration file does not need to define every possible option, only those that should be overridden. +Unix-like systems will look in $XDG_CONFIG_HOME/retroarch/retroarch.cfg first. If $XDG_CONFIG_HOME is not defined, it is assumed to be $HOME/.config as per specification. Then it will try $HOME/.retroarch.cfg. If both paths fail, RetroArch will try to create a new, default config file in $XDG_CONFIG_HOME/retroarch/retroarch.cfg (or the $HOME/.config default for $XDG_CONFIG_HOME). If saving a default config also fails, it will try /etc/retroarch.cfg. If no configuration is found at all, default settings will be assumed. +A configuration file does not need to define every possible option, only those which should be overridden. + +If config_save_on_exit = true is set in the config file, RetroArch will overwrite the config file on exit. Settings can be changed from within RGUI. +If RetroArch overwrites a config file, formatting, comments, etc will be lost. +If RetroArch creates a default config file, it will have config_save_on_exit set automatically. .IP Windows will look in retroarch.cfg in same folder where retroarch.exe resides. +A default config file will also be created in the same manner as Unix. .TP \fB--appendconfig PATH\fR diff --git a/retroarch.c b/retroarch.c index 5f2ee98b2a..5aea9cda6f 100644 --- a/retroarch.c +++ b/retroarch.c @@ -600,9 +600,9 @@ static int16_t input_state(unsigned port, unsigned device, unsigned index, unsig } #ifdef _WIN32 -#define RARCH_DEFAULT_CONF_PATH_STR "\n\t\tDefaults to retroarch.cfg in same directory as retroarch.exe." +#define RARCH_DEFAULT_CONF_PATH_STR "\n\t\tDefaults to retroarch.cfg in same directory as retroarch.exe.\n\t\tIf a default config is not found, RetroArch will attempt to create one." #else -#define RARCH_DEFAULT_CONF_PATH_STR "\n\t\tBy default looks for config in $XDG_CONFIG_HOME/retroarch/retroarch.cfg,\n\t\t$HOME/.config/retroarch/retroarch.cfg,\n\t\tand $HOME/.retroarch.cfg." +#define RARCH_DEFAULT_CONF_PATH_STR "\n\t\tBy default looks for config in $XDG_CONFIG_HOME/retroarch/retroarch.cfg,\n\t\t$HOME/.config/retroarch/retroarch.cfg,\n\t\tand $HOME/.retroarch.cfg.\n\t\tIf a default config is not found, RetroArch will attempt to create one." #endif #include "config.features.h" @@ -772,17 +772,6 @@ static void set_paths(const char *path) // do not overwrite it as this was initialized before in a menu or otherwise. if (!*g_settings.system_directory) fill_pathname_basedir(g_settings.system_directory, path, sizeof(g_settings.system_directory)); - - if (*g_extern.config_path && path_is_directory(g_extern.config_path)) - { - fill_pathname_dir(g_extern.config_path, g_extern.basename, ".cfg", sizeof(g_extern.config_path)); - RARCH_LOG("Redirecting config file to \"%s\".\n", g_extern.config_path); - if (!path_file_exists(g_extern.config_path)) - { - *g_extern.config_path = '\0'; - RARCH_LOG("Did not find config file. Using system default.\n"); - } - } } static void parse_input(int argc, char *argv[])