Get rid of more RARCH_CTL_ enums

This commit is contained in:
twinaphex 2020-02-01 03:32:24 +01:00
parent 96018412c0
commit ff6d79b2cc
4 changed files with 5 additions and 13 deletions

View File

@ -1820,7 +1820,7 @@ static bool path_init_subsystem(void)
static void path_init_savefile(void)
{
bool should_sram_be_used = rarch_use_sram
&& !rarch_ctl(RARCH_CTL_IS_SRAM_SAVE_DISABLED, NULL);
&& !rarch_is_sram_save_disabled;
rarch_use_sram = should_sram_be_used;
@ -5688,7 +5688,7 @@ static bool event_init_content(void)
command_event_set_savestate_auto_index();
if (event_load_save_files())
if (event_load_save_files(rarch_is_sram_load_disabled))
RARCH_LOG("%s.\n",
msg_hash_to_str(MSG_SKIPPING_SRAM_LOAD));
@ -25812,10 +25812,6 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
sthread_tls_delete(&rarch_tls);
#endif
break;
case RARCH_CTL_IS_SRAM_LOAD_DISABLED:
return rarch_is_sram_load_disabled;
case RARCH_CTL_IS_SRAM_SAVE_DISABLED:
return rarch_is_sram_save_disabled;
case RARCH_CTL_SET_BLOCK_CONFIG_READ:
rarch_block_config_read = true;
break;

View File

@ -100,9 +100,6 @@ enum rarch_ctl_state
RARCH_CTL_IS_IPS_PREF,
RARCH_CTL_UNSET_IPS_PREF,
RARCH_CTL_IS_SRAM_LOAD_DISABLED,
RARCH_CTL_IS_SRAM_SAVE_DISABLED,
/* Block config read */
RARCH_CTL_SET_BLOCK_CONFIG_READ,
RARCH_CTL_UNSET_BLOCK_CONFIG_READ,

View File

@ -1567,12 +1567,11 @@ bool event_save_files(bool is_sram_used)
return true;
}
bool event_load_save_files(void)
bool event_load_save_files(bool is_sram_load_disabled)
{
unsigned i;
if (!task_save_files ||
rarch_ctl(RARCH_CTL_IS_SRAM_LOAD_DISABLED, NULL))
if (!task_save_files || is_sram_load_disabled)
return false;
for (i = 0; i < task_save_files->size; i++)

View File

@ -166,7 +166,7 @@ bool take_screenshot(
const char *path, bool silence,
bool has_valid_framebuffer, bool fullpath, bool use_thread);
bool event_load_save_files(void);
bool event_load_save_files(bool is_sram_load_disabled);
bool event_save_files(bool sram_used);