Fills out bios paths if system dir is not set.

This commit is contained in:
Themaister 2012-09-23 01:33:36 +02:00
parent a0b61cbeb1
commit 9399308051

View File

@ -812,12 +812,15 @@ bool retro_load_game(const struct retro_game_info *info)
const char *dir; const char *dir;
extract_directory(g_rom_dir, info->path, sizeof(g_rom_dir)); extract_directory(g_rom_dir, info->path, sizeof(g_rom_dir));
if (environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &dir) && dir) if (!environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &dir) || !dir)
{ {
fprintf(stderr, "[genplus]: Defaulting system directory to %s.\n", g_rom_dir);
dir = g_rom_dir;
}
#if defined(_WIN32) && !defined(_XBOX360) #if defined(_WIN32) && !defined(_XBOX360)
const char slash[] = "\\"; const char slash[] = "\\";
#elif defined(_WIN32) && defined(_XBOX360) #elif defined(_WIN32) && defined(_XBOX360)
const char slash[] = "\0"; const char slash[] = "";
#else #else
const char slash[] = "/"; const char slash[] = "/";
#endif #endif
@ -850,12 +853,6 @@ bool retro_load_game(const struct retro_game_info *info)
fprintf(stderr, "S&K ROM should be located at: %s\n", SK_ROM); fprintf(stderr, "S&K ROM should be located at: %s\n", SK_ROM);
fprintf(stderr, "Game Genie ROM should be located at: %s\n", GG_ROM); fprintf(stderr, "Game Genie ROM should be located at: %s\n", GG_ROM);
fprintf(stderr, "Action Replay ROM should be located at: %s\n", AR_ROM); fprintf(stderr, "Action Replay ROM should be located at: %s\n", AR_ROM);
}
else
{
fprintf(stderr, "[genplus]: Defaulting system directory to %s.\n", g_rom_dir);
dir = g_rom_dir;
}
snprintf(DEFAULT_PATH, sizeof(DEFAULT_PATH), g_rom_dir); snprintf(DEFAULT_PATH, sizeof(DEFAULT_PATH), g_rom_dir);
#ifdef _XBOX #ifdef _XBOX