mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2025-01-11 18:59:07 +01:00
[libretro] Port Backup Ram Cart changes from downstream (#498)
This commit is contained in:
parent
42f0944c50
commit
aed9e6c5a3
@ -1261,7 +1261,7 @@ static void check_variables(bool first_run)
|
||||
bool update_frameskip = false;
|
||||
struct retro_variable var = {0};
|
||||
|
||||
var.key = "genesis_plus_gx_bram";
|
||||
var.key = "genesis_plus_gx_system_bram";
|
||||
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
@ -1284,6 +1284,25 @@ static void check_variables(bool first_run)
|
||||
}
|
||||
}
|
||||
|
||||
var.key = "genesis_plus_gx_cart_bram";
|
||||
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
|
||||
{
|
||||
#if defined(_WIN32)
|
||||
char slash = '\\';
|
||||
#else
|
||||
char slash = '/';
|
||||
#endif
|
||||
|
||||
if (!var.value || !strcmp(var.value, "per cart"))
|
||||
{
|
||||
snprintf(CART_BRAM, sizeof(CART_BRAM), "%s%ccart.brm", save_dir, slash);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(CART_BRAM, sizeof(CART_BRAM), "%s%c%s_cart.brm", save_dir, slash, g_rom_name);
|
||||
}
|
||||
}
|
||||
|
||||
var.key = "genesis_plus_gx_system_hw";
|
||||
environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var);
|
||||
{
|
||||
@ -3182,7 +3201,6 @@ 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_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(CART_BRAM, sizeof(CART_BRAM), "%s%ccart.brm", save_dir, slash);
|
||||
|
||||
check_variables(true);
|
||||
|
||||
|
@ -146,7 +146,7 @@ struct retro_core_option_v2_definition option_defs_us[] = {
|
||||
"disabled"
|
||||
},
|
||||
{
|
||||
"genesis_plus_gx_bram",
|
||||
"genesis_plus_gx_system_bram",
|
||||
"CD System BRAM",
|
||||
NULL,
|
||||
"When running Sega CD content, specifies whether to share a single save file between all games from a specific region (Per-BIOS) or to create a separate save file for each game (Per-Game). Note that the Sega CD has limited internal storage, sufficient only for a handful of titles. To avoid running out of space, the 'Per-Game' setting is recommended.",
|
||||
@ -159,6 +159,20 @@ struct retro_core_option_v2_definition option_defs_us[] = {
|
||||
},
|
||||
"per bios"
|
||||
},
|
||||
{
|
||||
"genesis_plus_gx_cart_bram",
|
||||
"CD Backup Cart BRAM",
|
||||
NULL,
|
||||
"When running Sega CD content, specifies whether to share a single backup ram cart for all games (Per-Cart) or to create a separate backup ram cart for each game (Per-Game).",
|
||||
NULL,
|
||||
"system",
|
||||
{
|
||||
{ "per cart", "Per-Cart" },
|
||||
{ "per game", "Per-Game" },
|
||||
{ NULL, NULL },
|
||||
},
|
||||
"per cart"
|
||||
},
|
||||
{
|
||||
"genesis_plus_gx_add_on",
|
||||
"CD add-on (MD mode) (Requires Restart)",
|
||||
|
Loading…
x
Reference in New Issue
Block a user