Remove default_paths.salamander_file and make hardcoded constant

in config.def.h
This commit is contained in:
twinaphex 2013-03-11 06:48:58 +01:00
parent 4d062b869c
commit ce42e7fb65
8 changed files with 16 additions and 10 deletions

View File

@ -201,6 +201,17 @@ enum
#endif
#endif
#ifdef HAVE_LIBRETRO_MANAGEMENT
#ifdef GEKKO
#define SALAMANDER_FILE "boot.dol"
#elif defined(__CELLOS_LV2__)
#define SALAMANDER_FILE "EBOOT.BIN"
#elif defined(_XBOX1)
#define SALAMANDER_FILE "default.xbe"
#elif defined(_XBOX360)
#define SALAMANDER_FILE "default.xex"
#endif
////////////////
// Video
////////////////

View File

@ -59,7 +59,6 @@ typedef struct
char shader_file[MAXIMUM_PATH];
char shader_dir[MAXIMUM_PATH];
#endif
char salamander_file[MAXIMUM_PATH];
char sram_dir[MAXIMUM_PATH];
char system_dir[MAXIMUM_PATH];
} default_paths_t;

View File

@ -71,7 +71,7 @@ static void find_first_libretro_core(char *first_file,
char fname[PATH_MAX];
fill_pathname_base(fname, libretro_elem, sizeof(fname));
if (strncmp(fname, default_paths.salamander_file, sizeof(fname)) == 0)
if (strncmp(fname, SALAMANDER_FILE, sizeof(fname)) == 0)
{
if ((i + 1) == list->size)
{

View File

@ -858,7 +858,8 @@ static int rgui_settings_toggle_setting(unsigned setting, rgui_action_t action,
if (action == RGUI_ACTION_OK)
{
#ifdef GEKKO
fill_pathname_join(g_extern.fullpath, default_paths.core_dir, "boot.dol", sizeof(g_extern.fullpath));
fill_pathname_join(g_extern.fullpath, default_paths.core_dir, SALAMANDER_FILE,
sizeof(g_extern.fullpath));
#endif
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_GAME);
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXIT);
@ -1299,7 +1300,7 @@ static bool directory_parse(const char *directory, void *userdata, void *ctx)
bool is_dir = list->elems[i].attr.b;
if (core_chooser && (is_dir
#ifdef HAVE_LIBRETRO_MANAGEMENT
|| strcasecmp(list->elems[i].data, default_paths.salamander_file) == 0
|| strcasecmp(list->elems[i].data, SALAMANDER_FILE) == 0
#endif
))
continue;
@ -1401,7 +1402,7 @@ int rgui_iterate(rgui_handle_t *rgui, rgui_action_t action)
#if defined(HAVE_DYNAMIC)
#elif defined(GEKKO)
fill_pathname_join(g_extern.fullpath, default_paths.core_dir, "boot.dol", sizeof(g_extern.fullpath));
fill_pathname_join(g_extern.fullpath, default_paths.core_dir, SALAMANDER_FILE, sizeof(g_extern.fullpath));
g_extern.lifecycle_mode_state &= ~(1ULL << MODE_GAME);
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXIT);
g_extern.lifecycle_mode_state |= (1ULL << MODE_EXITSPAWN);

View File

@ -274,7 +274,6 @@ static void get_environment_settings(int argc, char *argv[])
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));
strlcpy(default_paths.salamander_file, "boot.dol", sizeof(default_paths.salamander_file));
#ifndef IS_SALAMANDER
MAKE_DIR(default_paths.port_dir);

View File

@ -308,7 +308,6 @@ static void get_environment_settings(int argc, char *argv[])
#else
snprintf(g_extern.config_path, sizeof(g_extern.config_path), "%s/retroarch.cfg", default_paths.port_dir);
#endif
snprintf(default_paths.salamander_file, sizeof(default_paths.salamander_file), "EBOOT.BIN");
}
}

View File

@ -70,7 +70,6 @@ static void get_environment_settings(int argc, char *argv[])
snprintf(default_paths.input_presets_dir, sizeof(default_paths.input_presets_dir), "%s/input", default_paths.cgp_dir);
snprintf(default_paths.border_dir, sizeof(default_paths.border_dir), "%s/borders", default_paths.core_dir);
snprintf(g_extern.config_path, sizeof(g_extern.config_path), "%s/retroarch.cfg", default_paths.port_dir);
snprintf(default_paths.salamander_file, sizeof(default_paths.salamander_file), "EBOOT.BIN");
}
int callback_thread(SceSize args, void *argp)

View File

@ -309,7 +309,6 @@ static void get_environment_settings(int argc, char *argv[])
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));
strlcpy(default_paths.salamander_file, "default.xbe", sizeof(default_paths.salamander_file));
#elif defined(_XBOX360)
strlcpy(default_paths.core_dir, "game:", sizeof(default_paths.core_dir));
strlcpy(default_paths.filesystem_root_dir, "game:\\", sizeof(default_paths.filesystem_root_dir));
@ -325,7 +324,6 @@ static void get_environment_settings(int argc, char *argv[])
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));
snprintf(default_paths.salamander_file, sizeof(default_paths.salamander_file), "default.xex");
#endif
}