mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 00:39:53 +00:00
Allow bypassing savestate info files filtering (#14906)
This commit is contained in:
parent
951f5a76a5
commit
940ad64d41
@ -321,6 +321,12 @@
|
||||
* load times on platforms with slow IO */
|
||||
#define DEFAULT_CORE_INFO_CACHE_ENABLE true
|
||||
|
||||
/* Specifies whether to ignore core info
|
||||
* savestate capabilities, allowing to
|
||||
* experiment with related features
|
||||
* (run ahead, rewind, etc) */
|
||||
#define DEFAULT_CORE_INFO_SAVESTATE_BYPASS false
|
||||
|
||||
/* Specifies whether to 'reload' (fork and quit)
|
||||
* RetroArch when launching content with the
|
||||
* currently loaded core
|
||||
|
@ -1664,6 +1664,7 @@ static struct config_bool_setting *populate_settings_bool(
|
||||
SETTING_BOOL("load_dummy_on_core_shutdown", &settings->bools.load_dummy_on_core_shutdown, true, DEFAULT_LOAD_DUMMY_ON_CORE_SHUTDOWN, false);
|
||||
SETTING_BOOL("check_firmware_before_loading", &settings->bools.check_firmware_before_loading, true, DEFAULT_CHECK_FIRMWARE_BEFORE_LOADING, false);
|
||||
SETTING_BOOL("core_option_category_enable", &settings->bools.core_option_category_enable, true, DEFAULT_CORE_OPTION_CATEGORY_ENABLE, false);
|
||||
SETTING_BOOL("core_info_savestate_bypass", &settings->bools.core_info_savestate_bypass, true, DEFAULT_CORE_INFO_SAVESTATE_BYPASS, false);
|
||||
#if defined(__WINRT__) || defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP
|
||||
SETTING_BOOL("core_info_cache_enable", &settings->bools.core_info_cache_enable, false, DEFAULT_CORE_INFO_CACHE_ENABLE, false);
|
||||
#else
|
||||
|
@ -905,6 +905,7 @@ typedef struct settings
|
||||
bool check_firmware_before_loading;
|
||||
bool core_option_category_enable;
|
||||
bool core_info_cache_enable;
|
||||
bool core_info_savestate_bypass;
|
||||
#ifndef HAVE_DYNAMIC
|
||||
bool always_reload_core_on_run_content;
|
||||
#endif
|
||||
|
16
core_info.c
16
core_info.c
@ -2776,6 +2776,10 @@ void core_info_qsort(core_info_list_t *core_info_list,
|
||||
bool core_info_current_supports_savestate(void)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->bools.core_info_savestate_bypass)
|
||||
return true;
|
||||
|
||||
/* If no core is currently loaded, assume
|
||||
* by default that all savestate functionality
|
||||
@ -2790,6 +2794,10 @@ bool core_info_current_supports_savestate(void)
|
||||
bool core_info_current_supports_rewind(void)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->bools.core_info_savestate_bypass)
|
||||
return true;
|
||||
|
||||
/* If no core is currently loaded, assume
|
||||
* by default that all savestate functionality
|
||||
@ -2804,6 +2812,10 @@ bool core_info_current_supports_rewind(void)
|
||||
bool core_info_current_supports_netplay(void)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->bools.core_info_savestate_bypass)
|
||||
return true;
|
||||
|
||||
/* If no core is currently loaded, assume
|
||||
* by default that all savestate functionality
|
||||
@ -2818,6 +2830,10 @@ bool core_info_current_supports_netplay(void)
|
||||
bool core_info_current_supports_runahead(void)
|
||||
{
|
||||
core_info_state_t *p_coreinfo = &core_info_st;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if (settings->bools.core_info_savestate_bypass)
|
||||
return true;
|
||||
|
||||
/* If no core is currently loaded, assume
|
||||
* by default that all savestate functionality
|
||||
|
@ -1485,6 +1485,10 @@ MSG_HASH(
|
||||
MENU_ENUM_LABEL_CORE_INFO_CACHE_ENABLE,
|
||||
"core_info_cache_enable"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_CORE_INFO_SAVESTATE_BYPASS,
|
||||
"core_info_savestate_bypass"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_DUMMY_ON_CORE_SHUTDOWN,
|
||||
"dummy_on_core_shutdown"
|
||||
|
@ -86,6 +86,9 @@ int msg_hash_get_help_us_enum(enum msg_hash_enums msg, char *s, size_t len)
|
||||
case MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE:
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_CHECK_FOR_MISSING_FIRMWARE), len);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CORE_INFO_SAVESTATE_BYPASS:
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_SUBLABEL_CORE_INFO_SAVESTATE_BYPASS), len);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_PARENT_DIRECTORY:
|
||||
strlcpy(s, msg_hash_to_str(MENU_ENUM_LABEL_HELP_PARENT_DIRECTORY), len);
|
||||
break;
|
||||
|
@ -3935,6 +3935,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CORE_INFO_CACHE_ENABLE,
|
||||
"Maintain a persistent local cache of installed core information. Greatly reduces loading times on platforms with slow disk access."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_CORE_INFO_SAVESTATE_BYPASS,
|
||||
"Bypass Core Info Save States Features"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_CORE_INFO_SAVESTATE_BYPASS,
|
||||
"Specifies whether to ignore core info savestate capabilities, allowing to experiment with related features (run ahead, rewind, etc)."
|
||||
)
|
||||
#ifndef HAVE_DYNAMIC
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT,
|
||||
|
@ -525,6 +525,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_dummy_on_core_shutdown, MENU_
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_dummy_check_missing_firmware, MENU_ENUM_SUBLABEL_CHECK_FOR_MISSING_FIRMWARE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_option_category_enable, MENU_ENUM_SUBLABEL_CORE_OPTION_CATEGORY_ENABLE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_info_cache_enable, MENU_ENUM_SUBLABEL_CORE_INFO_CACHE_ENABLE)
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_core_info_savestate_bypass, MENU_ENUM_SUBLABEL_CORE_INFO_SAVESTATE_BYPASS)
|
||||
#ifndef HAVE_DYNAMIC
|
||||
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_always_reload_core_on_run_content, MENU_ENUM_SUBLABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT)
|
||||
#endif
|
||||
@ -4216,6 +4217,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_CORE_INFO_CACHE_ENABLE:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_info_cache_enable);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_CORE_INFO_SAVESTATE_BYPASS:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_core_info_savestate_bypass);
|
||||
break;
|
||||
#ifndef HAVE_DYNAMIC
|
||||
case MENU_ENUM_LABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_always_reload_core_on_run_content);
|
||||
|
@ -10084,6 +10084,7 @@ unsigned menu_displaylist_build_list(
|
||||
{
|
||||
menu_displaylist_build_info_t build_list[] = {
|
||||
{MENU_ENUM_LABEL_CORE_INFO_CACHE_ENABLE, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_CORE_INFO_SAVESTATE_BYPASS, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_CHECK_FOR_MISSING_FIRMWARE, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_CORE_OPTION_CATEGORY_ENABLE, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_DRIVER_SWITCH_ENABLE, PARSE_ONLY_BOOL},
|
||||
|
@ -10606,9 +10606,9 @@ static bool setting_append_list(
|
||||
{
|
||||
unsigned i, listing = 0;
|
||||
#ifndef HAVE_DYNAMIC
|
||||
struct bool_entry bool_entries[9];
|
||||
struct bool_entry bool_entries[10];
|
||||
#else
|
||||
struct bool_entry bool_entries[8];
|
||||
struct bool_entry bool_entries[9];
|
||||
#endif
|
||||
START_GROUP(list, list_info, &group_info,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CORE_SETTINGS), parent_group);
|
||||
@ -10675,6 +10675,13 @@ static bool setting_append_list(
|
||||
bool_entries[listing].flags = SD_FLAG_ADVANCED;
|
||||
listing++;
|
||||
|
||||
bool_entries[listing].target = &settings->bools.core_info_savestate_bypass;
|
||||
bool_entries[listing].name_enum_idx = MENU_ENUM_LABEL_CORE_INFO_SAVESTATE_BYPASS;
|
||||
bool_entries[listing].SHORT_enum_idx = MENU_ENUM_LABEL_VALUE_CORE_INFO_SAVESTATE_BYPASS;
|
||||
bool_entries[listing].default_value = DEFAULT_CORE_INFO_SAVESTATE_BYPASS;
|
||||
bool_entries[listing].flags = SD_FLAG_ADVANCED;
|
||||
listing++;
|
||||
|
||||
#ifndef HAVE_DYNAMIC
|
||||
bool_entries[listing].target = &settings->bools.always_reload_core_on_run_content;
|
||||
bool_entries[listing].name_enum_idx = MENU_ENUM_LABEL_ALWAYS_RELOAD_CORE_ON_RUN_CONTENT;
|
||||
|
@ -2738,6 +2738,7 @@ enum msg_hash_enums
|
||||
|
||||
MENU_LBL_H(DUMMY_ON_CORE_SHUTDOWN),
|
||||
MENU_LBL_H(CHECK_FOR_MISSING_FIRMWARE),
|
||||
MENU_LABEL(CORE_INFO_SAVESTATE_BYPASS),
|
||||
MENU_LABEL(CORE_OPTION_CATEGORY_ENABLE),
|
||||
MENU_LABEL(CORE_INFO_CACHE_ENABLE),
|
||||
#ifndef HAVE_DYNAMIC
|
||||
|
Loading…
x
Reference in New Issue
Block a user