diff --git a/configuration.c b/configuration.c index 82912570a9..cd40a50a5c 100644 --- a/configuration.c +++ b/configuration.c @@ -2482,10 +2482,20 @@ void config_set_defaults(void *data) sizeof(settings->paths.directory_overlay)); #ifdef RARCH_MOBILE if (string_is_empty(settings->paths.path_overlay)) + { + fill_pathname_join(settings->paths.path_overlay, + settings->paths.directory_overlay, + FILE_PATH_DEFAULT_OVERLAY, + sizeof(settings->paths.path_overlay)); + + /* Handle the case where old asset files + * are installed */ + if (!path_is_valid(settings->paths.path_overlay)) fill_pathname_join(settings->paths.path_overlay, settings->paths.directory_overlay, - "gamepads/flat/retropad.cfg", + FILE_PATH_DEFAULT_OVERLAY_FALLBACK, sizeof(settings->paths.path_overlay)); + } #endif } #endif diff --git a/file_path_special.h b/file_path_special.h index 635a76cdef..12c787e281 100644 --- a/file_path_special.h +++ b/file_path_special.h @@ -107,6 +107,10 @@ RETRO_BEGIN_DECLS #define FILE_PATH_CORE_BACKUP_EXTENSION_NO_DOT "lcbk" #define FILE_PATH_LOCK_EXTENSION ".lck" #define FILE_PATH_BACKUP_EXTENSION ".bak" +#if defined(RARCH_MOBILE) +#define FILE_PATH_DEFAULT_OVERLAY "gamepads/neo-retropad/neo-retropad.cfg" +#define FILE_PATH_DEFAULT_OVERLAY_FALLBACK "gamepads/flat/retropad.cfg" +#endif enum application_special_type {