Create RARCH_CTL_SET_SRAM_ENABLE

This commit is contained in:
twinaphex 2016-01-27 19:53:07 +01:00
parent 8fe012afe4
commit d1b53a14a1
3 changed files with 8 additions and 4 deletions

View File

@ -537,6 +537,8 @@ static void event_set_savestate_auto_index(void)
static bool event_init_content(void)
{
rarch_ctl(RARCH_CTL_SET_SRAM_ENABLE, NULL);
/* No content to be loaded for dummy core,
* just successfully exit. */
if (rarch_ctl(RARCH_CTL_IS_DUMMY_CORE, NULL))
@ -567,7 +569,6 @@ static bool event_init_content(void)
static bool event_init_core(void *data)
{
retro_ctx_environ_info_t info;
global_t *global = global_get_ptr();
settings_t *settings = config_get_ptr();
enum rarch_core_type *core_type = (enum rarch_core_type*)data;
@ -603,9 +604,6 @@ static bool event_init_core(void *data)
if (!core_ctl(CORE_CTL_RETRO_INIT, NULL))
return false;
global->sram.use = rarch_ctl(RARCH_CTL_IS_PLAIN_CORE, NULL)
&& !content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL);
if (!event_init_content())
return false;

View File

@ -1370,6 +1370,10 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
return false;
set_paths_redirect(global->name.base);
break;
case RARCH_CTL_SET_SRAM_ENABLE:
global->sram.use = rarch_ctl(RARCH_CTL_IS_PLAIN_CORE, NULL)
&& !content_ctl(CONTENT_CTL_DOES_NOT_NEED_CONTENT, NULL);
break;
case RARCH_CTL_SET_ERROR_ON_INIT:
rarch_error_on_init = true;
break;

View File

@ -104,6 +104,8 @@ enum rarch_ctl_state
RARCH_CTL_SET_PATHS_REDIRECT,
RARCH_CTL_SET_SRAM_ENABLE,
RARCH_CTL_SET_FORCE_FULLSCREEN,
RARCH_CTL_UNSET_FORCE_FULLSCREEN,