This commit is contained in:
twinaphex 2012-09-30 04:54:58 +02:00
commit ac986d94a0

View File

@ -812,12 +812,15 @@ bool retro_load_game(const struct retro_game_info *info)
const char *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)
const char slash[] = "\\";
#elif defined(_WIN32) && defined(_XBOX360)
const char slash[] = "\0";
const char slash[] = "";
#else
const char slash[] = "/";
#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, "Game Genie ROM should be located at: %s\n", GG_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);
#ifdef _XBOX