From bdad323b964084f22cd6eaa6518908d8a5a89071 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 1 Oct 2017 01:17:45 -0400 Subject: [PATCH] consoles: only use libretro_path for libretro_directory if it isn't empty --- configuration.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/configuration.c b/configuration.c index a0f3889fdd..8962a1f983 100644 --- a/configuration.c +++ b/configuration.c @@ -2603,14 +2603,21 @@ static bool config_load_file(const char *path, bool set_defaults, } } - /* Safe-guard against older behavior. */ - if (path_is_directory(path_get(RARCH_PATH_CORE))) +#ifdef RARCH_CONSOLE + if (!string_is_empty(path_get(RARCH_PATH_CORE))) { - RARCH_WARN("\"libretro_path\" is a directory, using this for \"libretro_directory\" instead.\n"); - strlcpy(settings->paths.directory_libretro, path_get(RARCH_PATH_CORE), - sizeof(settings->paths.directory_libretro)); - path_clear(RARCH_PATH_CORE); +#endif + /* Safe-guard against older behavior. */ + if (path_is_directory(path_get(RARCH_PATH_CORE))) + { + RARCH_WARN("\"libretro_path\" is a directory, using this for \"libretro_directory\" instead.\n"); + strlcpy(settings->paths.directory_libretro, path_get(RARCH_PATH_CORE), + sizeof(settings->paths.directory_libretro)); + path_clear(RARCH_PATH_CORE); + } +#ifdef RARCH_CONSOLE } +#endif if (string_is_equal_fast(settings->paths.path_menu_wallpaper, "default", 7)) *settings->paths.path_menu_wallpaper = '\0';