diff --git a/config.def.h b/config.def.h index cd2c87742c..6d2743ae18 100644 --- a/config.def.h +++ b/config.def.h @@ -201,15 +201,20 @@ enum #endif #endif -#ifdef HAVE_LIBRETRO_MANAGEMENT +#if defined(HAVE_LIBRETRO_MANAGEMENT) || defined(IS_SALAMANDER) #ifdef GEKKO #define SALAMANDER_FILE "boot.dol" +#define DEFAULT_EXE_EXT ".dol" #elif defined(__CELLOS_LV2__) #define SALAMANDER_FILE "EBOOT.BIN" +#define DEFAULT_EXE_EXT ".SELF" #elif defined(_XBOX1) #define SALAMANDER_FILE "default.xbe" +#define DEFAULT_EXE_EXT ".xbe" #elif defined(_XBOX360) #define SALAMANDER_FILE "default.xex" +#define DEFAULT_EXE_EXT ".xex" +#endif #endif //////////////// diff --git a/console/rarch_console.h b/console/rarch_console.h index 955a01ac88..cf6e6d3730 100644 --- a/console/rarch_console.h +++ b/console/rarch_console.h @@ -44,7 +44,6 @@ typedef struct char core_dir[MAXIMUM_PATH]; char config_path[MAXIMUM_PATH]; char libretro_path[MAXIMUM_PATH]; - char executable_extension[MAXIMUM_PATH]; char filebrowser_startup_dir[MAXIMUM_PATH]; char filesystem_root_dir[MAXIMUM_PATH]; char input_presets_dir[MAXIMUM_PATH]; diff --git a/frontend/frontend_console.c b/frontend/frontend_console.c index 1ff402d8eb..a32692748b 100644 --- a/frontend/frontend_console.c +++ b/frontend/frontend_console.c @@ -19,6 +19,7 @@ #include #include +#include "../config.def.h" #include "frontend_console.h" #include "menu/rmenu.h" #include "menu/menu_settings.h" @@ -238,7 +239,7 @@ int rarch_main(int argc, char *argv[]) #ifdef HAVE_LIBRETRO_MANAGEMENT char core_exe_path[PATH_MAX]; char path_prefix[PATH_MAX]; - const char *extension = default_paths.executable_extension; + const char *extension = DEFAULT_EXE_EXT; char slash; #if defined(_WIN32) slash = '\\'; diff --git a/frontend/platform/platform_gx.c b/frontend/platform/platform_gx.c index d460f247ff..f36dcabad8 100644 --- a/frontend/platform/platform_gx.c +++ b/frontend/platform/platform_gx.c @@ -273,7 +273,6 @@ static void get_environment_settings(int argc, char *argv[]) snprintf(default_paths.filebrowser_startup_dir, sizeof(default_paths.filebrowser_startup_dir), default_paths.filesystem_root_dir); snprintf(default_paths.sram_dir, sizeof(default_paths.sram_dir), "%s/sram", default_paths.port_dir); snprintf(default_paths.input_presets_dir, sizeof(default_paths.input_presets_dir), "%s/input", default_paths.port_dir); - strlcpy(default_paths.executable_extension, ".dol", sizeof(default_paths.executable_extension)); #ifndef IS_SALAMANDER MAKE_DIR(default_paths.port_dir); diff --git a/frontend/platform/platform_ps3.c b/frontend/platform/platform_ps3.c index fa699894d3..22d18ac82b 100644 --- a/frontend/platform/platform_ps3.c +++ b/frontend/platform/platform_ps3.c @@ -283,7 +283,6 @@ static void get_environment_settings(int argc, char *argv[]) } snprintf(default_paths.core_dir, sizeof(default_paths.core_dir), "%s/cores", default_paths.port_dir); - snprintf(default_paths.executable_extension, sizeof(default_paths.executable_extension), ".SELF"); snprintf(default_paths.savestate_dir, sizeof(default_paths.savestate_dir), "%s/savestates", default_paths.core_dir); snprintf(default_paths.filesystem_root_dir, sizeof(default_paths.filesystem_root_dir), "/"); snprintf(default_paths.filebrowser_startup_dir, sizeof(default_paths.filebrowser_startup_dir), default_paths.filesystem_root_dir); diff --git a/frontend/platform/platform_psp.c b/frontend/platform/platform_psp.c index 730b88bbaa..193be53092 100644 --- a/frontend/platform/platform_psp.c +++ b/frontend/platform/platform_psp.c @@ -55,7 +55,6 @@ static void get_environment_settings(int argc, char *argv[]) RARCH_LOG("port dir: [%s]\n", default_paths.port_dir); snprintf(default_paths.core_dir, sizeof(default_paths.core_dir), "%s/cores", default_paths.port_dir); - snprintf(default_paths.executable_extension, sizeof(default_paths.executable_extension), ".SELF"); snprintf(default_paths.savestate_dir, sizeof(default_paths.savestate_dir), "%s/savestates", default_paths.core_dir); snprintf(default_paths.filesystem_root_dir, sizeof(default_paths.filesystem_root_dir), "/"); snprintf(default_paths.filebrowser_startup_dir, sizeof(default_paths.filebrowser_startup_dir), default_paths.filesystem_root_dir); diff --git a/frontend/platform/platform_xdk.c b/frontend/platform/platform_xdk.c index d67c58fc9d..f341f8b0f2 100644 --- a/frontend/platform/platform_xdk.c +++ b/frontend/platform/platform_xdk.c @@ -306,7 +306,6 @@ static void get_environment_settings(int argc, char *argv[]) strlcpy(default_paths.sram_dir, "D:\\sram", sizeof(default_paths.sram_dir)); strlcpy(default_paths.system_dir, "D:\\system", sizeof(default_paths.system_dir)); strlcpy(default_paths.filesystem_root_dir, "D:", sizeof(default_paths.filesystem_root_dir)); - strlcpy(default_paths.executable_extension, ".xbe", sizeof(default_paths.executable_extension)); strlcpy(default_paths.filebrowser_startup_dir, "D:", sizeof(default_paths.filebrowser_startup_dir)); strlcpy(default_paths.screenshots_dir, "D:\\screenshots", sizeof(default_paths.screenshots_dir)); #elif defined(_XBOX360) @@ -322,7 +321,6 @@ static void get_environment_settings(int argc, char *argv[]) strlcpy(default_paths.savestate_dir, "game:\\savestates", sizeof(default_paths.savestate_dir)); strlcpy(default_paths.sram_dir, "game:\\sram", sizeof(default_paths.sram_dir)); strlcpy(default_paths.system_dir, "game:\\system", sizeof(default_paths.system_dir)); - strlcpy(default_paths.executable_extension, ".xex", sizeof(default_paths.executable_extension)); strlcpy(default_paths.filebrowser_startup_dir, "game:", sizeof(default_paths.filebrowser_startup_dir)); #endif }