mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
Create RARCH_CTL_SET_SRAM_ENABLE
This commit is contained in:
parent
8fe012afe4
commit
d1b53a14a1
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user