mirror of
https://github.com/libretro/RetroArch
synced 2025-02-10 12:40:03 +00:00
Add savestate_auto_load option.
This commit is contained in:
parent
7ab8eaec02
commit
6f8190ea0b
@ -358,8 +358,9 @@ static const bool savestate_auto_index = false;
|
||||
|
||||
// Automatically saves a savestate at the end of RetroArch's lifetime.
|
||||
// The path is $SRAM_PATH.auto.
|
||||
// RetroArch will automatically load any savestate with this path on startup.
|
||||
// RetroArch will automatically load any savestate with this path on startup if savestate_auto_load is set.
|
||||
static const bool savestate_auto_save = false;
|
||||
static const bool savestate_auto_load = true;
|
||||
|
||||
// Slowmotion ratio.
|
||||
static const float slowmotion_ratio = 3.0;
|
||||
|
@ -256,6 +256,7 @@ struct settings
|
||||
bool block_sram_overwrite;
|
||||
bool savestate_auto_index;
|
||||
bool savestate_auto_save;
|
||||
bool savestate_auto_load;
|
||||
|
||||
bool network_cmd_enable;
|
||||
uint16_t network_cmd_port;
|
||||
|
@ -1845,6 +1845,9 @@ static void load_auto_state(void)
|
||||
return;
|
||||
#endif
|
||||
|
||||
if (!g_settings.savestate_auto_load)
|
||||
return;
|
||||
|
||||
char savestate_name_auto[PATH_MAX];
|
||||
fill_pathname_noext(savestate_name_auto, g_extern.savestate_name,
|
||||
".auto", sizeof(savestate_name_auto));
|
||||
|
@ -10,8 +10,9 @@
|
||||
|
||||
# Automatically saves a savestate at the end of RetroArch's lifetime.
|
||||
# The path is $SRAM_PATH.auto.
|
||||
# RetroArch will automatically load any savestate with this path on startup.
|
||||
# RetroArch will automatically load any savestate with this path on startup if savestate_auto_load is set.
|
||||
# savestate_auto_save = false
|
||||
# savestate_auto_load = true
|
||||
|
||||
# Load libretro from a dynamic location for dynamically built RetroArch.
|
||||
# This option is mandatory.
|
||||
|
@ -211,6 +211,7 @@ void config_set_defaults(void)
|
||||
g_settings.block_sram_overwrite = block_sram_overwrite;
|
||||
g_settings.savestate_auto_index = savestate_auto_index;
|
||||
g_settings.savestate_auto_save = savestate_auto_save;
|
||||
g_settings.savestate_auto_load = savestate_auto_load;
|
||||
g_settings.network_cmd_enable = network_cmd_enable;
|
||||
g_settings.network_cmd_port = network_cmd_port;
|
||||
g_settings.stdin_cmd_enable = stdin_cmd_enable;
|
||||
@ -671,6 +672,7 @@ bool config_load_file(const char *path)
|
||||
CONFIG_GET_BOOL(block_sram_overwrite, "block_sram_overwrite");
|
||||
CONFIG_GET_BOOL(savestate_auto_index, "savestate_auto_index");
|
||||
CONFIG_GET_BOOL(savestate_auto_save, "savestate_auto_save");
|
||||
CONFIG_GET_BOOL(savestate_auto_load, "savestate_auto_load");
|
||||
|
||||
CONFIG_GET_BOOL(network_cmd_enable, "network_cmd_enable");
|
||||
CONFIG_GET_INT(network_cmd_port, "network_cmd_port");
|
||||
|
Loading…
x
Reference in New Issue
Block a user