diff --git a/console/rarch_console.h b/console/rarch_console.h index 9c00667690..6cdcc65c8d 100644 --- a/console/rarch_console.h +++ b/console/rarch_console.h @@ -97,11 +97,11 @@ typedef struct char savestate_dir[MAXIMUM_PATH]; #if defined(HAVE_CG) || defined(HAVE_HLSL) || defined(HAVE_GLSL) char menu_shader_file[MAXIMUM_PATH]; -#ifdef IS_SALAMANDER - char salamander_file[MAXIMUM_PATH]; -#endif char shader_file[MAXIMUM_PATH]; char shader_dir[MAXIMUM_PATH]; +#endif +#ifdef IS_SALAMANDER + char salamander_file[MAXIMUM_PATH]; #endif char sram_dir[MAXIMUM_PATH]; char system_dir[MAXIMUM_PATH]; diff --git a/console/rarch_console_libretro_mgmt.c b/console/rarch_console_libretro_mgmt.c index 37268a480b..ba97ffefe8 100644 --- a/console/rarch_console_libretro_mgmt.c +++ b/console/rarch_console_libretro_mgmt.c @@ -17,6 +17,7 @@ #include #include "../boolean.h" #include "../file.h" +#include "rarch_console.h" #include "rarch_console_libretro_mgmt.h" @@ -151,17 +152,11 @@ void rarch_manage_libretro_set_first_file(char *first_file, size_t size_of_first if(first_exe) { -#if defined(_XBOX) || defined(GEKKO) +#ifdef IS_SALAMANDER char fname_tmp[PATH_MAX]; fill_pathname_base(fname_tmp, first_exe, sizeof(fname_tmp)); -#ifdef _XBOX - if(strcmp(fname_tmp, "RetroArch-Salamander.xex") == 0) -#elif defined(GEKKO) - if(strcmp(fname_tmp, "boot.dol") == 0) -#else -#error This case not handled -#endif + if(strncmp(fname_tmp, default_paths.salamander_file, sizeof(fname_tmp)) == 0) { RARCH_WARN("First entry is RetroArch Salamander itself, increment entry by one and check if it exists.\n"); first_exe = dir_list->elems[1].data; diff --git a/gx/salamander/main.c b/gx/salamander/main.c index 262904199b..1c945953f1 100644 --- a/gx/salamander/main.c +++ b/gx/salamander/main.c @@ -43,6 +43,8 @@ char libretro_path[512]; char PORT_DIR[512]; char app_dir[512]; +default_paths_t default_paths; + static void find_and_set_first_file(void) { //Last fallback - we'll need to start the first executable file @@ -107,6 +109,7 @@ static void get_environment_settings(void) getcwd(PORT_DIR, MAXPATHLEN); snprintf(SYS_CONFIG_FILE, sizeof(SYS_CONFIG_FILE), "%sretroarch.cfg", PORT_DIR); snprintf(LIBRETRO_DIR_PATH, sizeof(LIBRETRO_DIR_PATH), PORT_DIR); + snprintf(default_paths.salamander_file, sizeof(default_paths.salamander_file), "boot.dol"); } int main(int argc, char *argv[]) diff --git a/ps3/salamander/main.c b/ps3/salamander/main.c index 31c80fb774..864b03d17b 100644 --- a/ps3/salamander/main.c +++ b/ps3/salamander/main.c @@ -50,6 +50,8 @@ char LIBRETRO_DIR_PATH[PATH_MAX]; char SYS_CONFIG_FILE[PATH_MAX]; char libretro_path[PATH_MAX]; +default_paths_t default_paths; + static void find_and_set_first_file(void) { //Last fallback - we'll need to start the first executable file @@ -160,6 +162,7 @@ static void get_environment_settings (void) snprintf(SYS_CONFIG_FILE, sizeof(SYS_CONFIG_FILE), "%s/retroarch.cfg", usrDirPath); snprintf(LIBRETRO_DIR_PATH, sizeof(LIBRETRO_DIR_PATH), "%s/cores", usrDirPath); } + snprintf(default_paths.salamander_file, sizeof(default_paths.salamander_file), ""); } //dummy - just to avoid the emitted warnings diff --git a/xdk/salamander/main.c b/xdk/salamander/main.c index e41b5e668b..031ab02a96 100644 --- a/xdk/salamander/main.c +++ b/xdk/salamander/main.c @@ -41,6 +41,8 @@ char LIBRETRO_DIR_PATH[PATH_MAX]; char SYS_CONFIG_FILE[PATH_MAX]; char libretro_path[PATH_MAX]; +default_paths_t default_paths; + static void find_and_set_first_file(void) { //Last fallback - we'll need to start the first executable file @@ -156,8 +158,11 @@ static void get_environment_settings (void) break; } } + + strlcpy(default_paths.salamander_file, "RetroArch-Salamander.xex", sizeof(default_paths.salamander_file)); #elif defined(_XBOX1) strlcpy(SYS_CONFIG_FILE, "D:\\retroarch.cfg", sizeof(SYS_CONFIG_FILE)); + strlcpy(default_paths.salamander_file, "RetroArch-Salamander.xbe", sizeof(default_paths.salamander_file)); #endif }