Add content_load

This commit is contained in:
twinaphex 2016-05-08 04:35:00 +02:00
parent 6195deb188
commit 0bd45c7f51
4 changed files with 8 additions and 9 deletions

View File

@ -857,7 +857,7 @@ static void content_load_init_wrap(
*
* Returns: false (0) if rarch_main_init failed, otherwise true (1).
**/
static bool content_load(content_ctx_info_t *info)
bool content_load(content_ctx_info_t *info)
{
unsigned i;
bool retval = true;
@ -1761,8 +1761,6 @@ bool content_ctl(enum content_ctl_state state, void *data)
#endif
}
break;
case CONTENT_CTL_LOAD:
return content_load((content_ctx_info_t*)data);
case CONTENT_CTL_NONE:
default:
break;

View File

@ -48,10 +48,6 @@ enum content_ctl_state
CONTENT_CTL_DEINIT,
/* Loads content file and starts up RetroArch.
* If no content file can be loaded, will start up RetroArch
* as-is. */
CONTENT_CTL_LOAD,
CONTENT_CTL_GET_CRC,
@ -103,6 +99,11 @@ bool content_load_state(const char *path);
/* Save a state from memory to disk. */
bool content_save_state(const char *path);
/* Loads content file and starts up RetroArch.
* If no content file can be loaded, will start up RetroArch
* as-is. */
bool content_load(content_ctx_info_t *info);
bool content_ctl(enum content_ctl_state state, void *data);
#ifdef __cplusplus

View File

@ -126,7 +126,7 @@ int rarch_main(int argc, char *argv[], void *data)
info.args = args;
info.environ_get = frontend_driver_environment_get_ptr();
if (!content_ctl(CONTENT_CTL_LOAD, &info))
if (!content_load(&info))
return 0;
}

View File

@ -105,7 +105,7 @@ static bool menu_content_load(void)
content_info.args = NULL;
content_info.environ_get = menu_content_environment_get;
if (!content_ctl(CONTENT_CTL_LOAD, &content_info))
if (!content_load(&content_info))
goto error;
if (*fullpath)