(RARCH_CONSOLE) Create default_paths.filebrowser_startup_dir -

to get rid of system-specific hacks
This commit is contained in:
twinaphex 2012-07-30 00:26:37 +02:00
parent 2d3a2ac7c9
commit 1be33ff581
6 changed files with 11 additions and 13 deletions

View File

@ -60,6 +60,7 @@ typedef struct
char config_file[MAXIMUM_PATH];
char core_dir[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];
#ifdef HAVE_MULTIMAN

View File

@ -69,8 +69,8 @@ void rarch_config_load(const char * conf_name, const char * libretro_dir_path, c
for (unsigned i = 0; i < 7; i++)
{
char cfg[64];
snprintf(cfg, sizeof(cfg), "input_dpad_emulation_p%u", i + 1);
CONFIG_GET_INT(input.dpad_emulation[i], cfg);
snprintf(cfg, sizeof(cfg), "input_dpad_emulation_p%u", i + 1);
CONFIG_GET_INT(input.dpad_emulation[i], cfg);
}
// g_console
@ -135,8 +135,8 @@ void rarch_config_save(const char * conf_name)
for (unsigned i = 0; i < 7; i++)
{
char cfg[64];
snprintf(cfg, sizeof(cfg), "input_dpad_emulation_p%u", i + 1);
config_set_int(conf, cfg, g_settings.input.dpad_emulation[i]);
snprintf(cfg, sizeof(cfg), "input_dpad_emulation_p%u", i + 1);
config_set_int(conf, cfg, g_settings.input.dpad_emulation[i]);
}
#ifdef RARCH_CONSOLE

View File

@ -235,7 +235,7 @@ void rarch_settings_msg(unsigned setting, unsigned delay)
break;
#ifdef HAVE_HDD_CACHE_PARTITION
case ZIP_EXTRACT_TO_CACHE_DIR:
snprintf(str, sizeof(str), "INFO - ZIP file successfully extracted to cache partition.");
snprintf(str, sizeof(str), "INFO - ZIP file successfully extracted to cache partition.");
break;
#endif
}
@ -358,14 +358,7 @@ void rarch_settings_set_default (const input_driver_t *input)
g_console.mode_switch = MODE_MENU;
g_console.screen_orientation = ORIENTATION_NORMAL;
g_console.current_resolution_id = 0;
#if defined(_XBOX360)
//Ugly but necessary hack
strlcpy(g_console.default_rom_startup_dir, "game:", sizeof(g_console.default_rom_startup_dir));
#elif defined(_XBOX1)
strlcpy(g_console.default_rom_startup_dir, "D:", sizeof(g_console.default_rom_startup_dir));
#else
strlcpy(g_console.default_rom_startup_dir, default_paths.filesystem_root_dir, sizeof(g_console.default_rom_startup_dir));
#endif
strlcpy(g_console.default_rom_startup_dir, default_paths.filebrowser_startup_dir, sizeof(g_console.default_rom_startup_dir));
strlcpy(g_console.default_savestate_dir, default_paths.savestate_dir, sizeof(g_console.default_savestate_dir));
strlcpy(g_console.default_sram_dir, default_paths.sram_dir, sizeof(g_console.default_sram_dir));
g_console.aspect_ratio_index = 0;

View File

@ -201,6 +201,7 @@ static void get_environment_settings(int argc, char *argv[])
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);
snprintf(default_paths.sram_dir, sizeof(default_paths.sram_dir), "%s/sram", default_paths.core_dir);
snprintf(default_paths.system_dir, sizeof(default_paths.system_dir), "%s/system", default_paths.core_dir);

View File

@ -201,6 +201,7 @@ static void get_environment_settings(void)
snprintf(default_paths.system_dir, sizeof(default_paths.system_dir), "%s/system", default_paths.core_dir);
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);
snprintf(default_paths.sram_dir, sizeof(default_paths.sram_dir), "%s/sram", default_paths.core_dir);
snprintf(default_paths.input_presets_dir, sizeof(default_paths.input_presets_dir), "%s/presets/input", default_paths.core_dir);
strlcpy(default_paths.executable_extension, ".dol", sizeof(default_paths.executable_extension));

View File

@ -109,6 +109,7 @@ static void get_environment_settings (void)
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));
#elif defined(_XBOX360)
#ifdef HAVE_HDD_CACHE_PARTITION
strlcpy(default_paths.cache_dir, "cache:\\", sizeof(default_paths.cache_dir));
@ -118,6 +119,7 @@ static void get_environment_settings (void)
strlcpy(default_paths.config_file, "game:\\retroarch.cfg", sizeof(default_paths.config_file));
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
}