diff --git a/retroarch.c b/retroarch.c index 9d012e10a9..d72f330a0f 100644 --- a/retroarch.c +++ b/retroarch.c @@ -830,12 +830,17 @@ static int16_t input_state(unsigned port, unsigned device, return res; } +#if !defined(_WIN32) && !defined(GLOBAL_CONFIG_DIR) +#if defined(__HAIKU__) +#define GLOBAL_CONFIG_DIR "/system/settings" +#else +#define GLOBAL_CONFIG_DIR "/etc" +#endif +#endif + #ifdef _WIN32 #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 -#ifndef GLOBAL_CONFIG_DIR -#define GLOBAL_CONFIG_DIR "/etc" -#endif #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 based on the skeleton config (" GLOBAL_CONFIG_DIR "/retroarch.cfg)." #endif diff --git a/settings.c b/settings.c index e6a4bcb145..96c83b9065 100644 --- a/settings.c +++ b/settings.c @@ -665,7 +665,11 @@ static config_file_t *open_default_config_file(void) if (xdg) fill_pathname_join(conf_path, xdg, "retroarch/retroarch.cfg", sizeof(conf_path)); else if (home) +#ifdef __HAIKU__ + fill_pathname_join(conf_path, home, "config/settings/retroarch/retroarch.cfg", sizeof(conf_path)); +#else fill_pathname_join(conf_path, home, ".config/retroarch/retroarch.cfg", sizeof(conf_path)); +#endif if (xdg || home) { @@ -688,7 +692,11 @@ static config_file_t *open_default_config_file(void) if (xdg) fill_pathname_join(conf_path, xdg, "retroarch/retroarch.cfg", sizeof(conf_path)); else if (home) +#ifdef __HAIKU__ + fill_pathname_join(conf_path, home, "config/settings/retroarch/retroarch.cfg", sizeof(conf_path)); +#else fill_pathname_join(conf_path, home, ".config/retroarch/retroarch.cfg", sizeof(conf_path)); +#endif char basedir[PATH_MAX]; fill_pathname_basedir(basedir, conf_path, sizeof(basedir)); @@ -696,7 +704,11 @@ static config_file_t *open_default_config_file(void) if (path_mkdir(basedir)) { #ifndef GLOBAL_CONFIG_DIR +#if defined(__HAIKU__) +#define GLOBAL_CONFIG_DIR "/system/settings" +#else #define GLOBAL_CONFIG_DIR "/etc" +#endif #endif char skeleton_conf[PATH_MAX]; fill_pathname_join(skeleton_conf, GLOBAL_CONFIG_DIR, "retroarch.cfg", sizeof(skeleton_conf));