mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-12-28 04:01:48 +01:00
Merge pull request #97 from sergiobenrocha2/master
[Libretro] Change BRAM Dir from System/BIOS to Save.
This commit is contained in:
commit
308b01e9e7
@ -1601,6 +1601,7 @@ bool retro_load_game(const struct retro_game_info *info)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
const char *dir;
|
const char *dir;
|
||||||
|
const char *save_dir;
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
char slash = '\\';
|
char slash = '\\';
|
||||||
#else
|
#else
|
||||||
@ -1726,6 +1727,13 @@ bool retro_load_game(const struct retro_game_info *info)
|
|||||||
dir = g_rom_dir;
|
dir = g_rom_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!environ_cb(RETRO_ENVIRONMENT_GET_SAVE_DIRECTORY, &save_dir) || !save_dir)
|
||||||
|
{
|
||||||
|
if (log_cb)
|
||||||
|
log_cb(RETRO_LOG_INFO, "[genplus]: Defaulting Sega CD BRAM directory to %s.\n", g_rom_dir);
|
||||||
|
save_dir = g_rom_dir;
|
||||||
|
}
|
||||||
|
|
||||||
snprintf(GG_ROM, sizeof(GG_ROM), "%s%cggenie.bin", dir, slash);
|
snprintf(GG_ROM, sizeof(GG_ROM), "%s%cggenie.bin", dir, slash);
|
||||||
snprintf(AR_ROM, sizeof(AR_ROM), "%s%careplay.bin", dir, slash);
|
snprintf(AR_ROM, sizeof(AR_ROM), "%s%careplay.bin", dir, slash);
|
||||||
snprintf(SK_ROM, sizeof(SK_ROM), "%s%csk.bin", dir, slash);
|
snprintf(SK_ROM, sizeof(SK_ROM), "%s%csk.bin", dir, slash);
|
||||||
@ -1738,10 +1746,10 @@ bool retro_load_game(const struct retro_game_info *info)
|
|||||||
snprintf(CD_BIOS_EU, sizeof(CD_BIOS_EU), "%s%cbios_CD_E.bin", dir, slash);
|
snprintf(CD_BIOS_EU, sizeof(CD_BIOS_EU), "%s%cbios_CD_E.bin", dir, slash);
|
||||||
snprintf(CD_BIOS_US, sizeof(CD_BIOS_US), "%s%cbios_CD_U.bin", dir, slash);
|
snprintf(CD_BIOS_US, sizeof(CD_BIOS_US), "%s%cbios_CD_U.bin", dir, slash);
|
||||||
snprintf(CD_BIOS_JP, sizeof(CD_BIOS_JP), "%s%cbios_CD_J.bin", dir, slash);
|
snprintf(CD_BIOS_JP, sizeof(CD_BIOS_JP), "%s%cbios_CD_J.bin", dir, slash);
|
||||||
snprintf(CD_BRAM_EU, sizeof(CD_BRAM_EU), "%s%cscd_E.brm", dir, slash);
|
snprintf(CD_BRAM_EU, sizeof(CD_BRAM_EU), "%s%cscd_E.brm", save_dir, slash);
|
||||||
snprintf(CD_BRAM_US, sizeof(CD_BRAM_US), "%s%cscd_U.brm", dir, slash);
|
snprintf(CD_BRAM_US, sizeof(CD_BRAM_US), "%s%cscd_U.brm", save_dir, slash);
|
||||||
snprintf(CD_BRAM_JP, sizeof(CD_BRAM_JP), "%s%cscd_J.brm", dir, slash);
|
snprintf(CD_BRAM_JP, sizeof(CD_BRAM_JP), "%s%cscd_J.brm", save_dir, slash);
|
||||||
snprintf(CART_BRAM, sizeof(CART_BRAM), "%s%ccart.brm", dir, slash);
|
snprintf(CART_BRAM, sizeof(CART_BRAM), "%s%ccart.brm", save_dir, slash);
|
||||||
if (log_cb)
|
if (log_cb)
|
||||||
{
|
{
|
||||||
log_cb(RETRO_LOG_INFO, "Game Genie ROM should be located at: %s\n", GG_ROM);
|
log_cb(RETRO_LOG_INFO, "Game Genie ROM should be located at: %s\n", GG_ROM);
|
||||||
|
Loading…
Reference in New Issue
Block a user