Add content_load
This commit is contained in:
parent
6195deb188
commit
0bd45c7f51
|
@ -857,7 +857,7 @@ static void content_load_init_wrap(
|
||||||
*
|
*
|
||||||
* Returns: false (0) if rarch_main_init failed, otherwise true (1).
|
* 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;
|
unsigned i;
|
||||||
bool retval = true;
|
bool retval = true;
|
||||||
|
@ -1761,8 +1761,6 @@ bool content_ctl(enum content_ctl_state state, void *data)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case CONTENT_CTL_LOAD:
|
|
||||||
return content_load((content_ctx_info_t*)data);
|
|
||||||
case CONTENT_CTL_NONE:
|
case CONTENT_CTL_NONE:
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -48,10 +48,6 @@ enum content_ctl_state
|
||||||
|
|
||||||
CONTENT_CTL_DEINIT,
|
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,
|
CONTENT_CTL_GET_CRC,
|
||||||
|
|
||||||
|
@ -103,6 +99,11 @@ bool content_load_state(const char *path);
|
||||||
/* Save a state from memory to disk. */
|
/* Save a state from memory to disk. */
|
||||||
bool content_save_state(const char *path);
|
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);
|
bool content_ctl(enum content_ctl_state state, void *data);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -126,7 +126,7 @@ int rarch_main(int argc, char *argv[], void *data)
|
||||||
info.args = args;
|
info.args = args;
|
||||||
info.environ_get = frontend_driver_environment_get_ptr();
|
info.environ_get = frontend_driver_environment_get_ptr();
|
||||||
|
|
||||||
if (!content_ctl(CONTENT_CTL_LOAD, &info))
|
if (!content_load(&info))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ static bool menu_content_load(void)
|
||||||
content_info.args = NULL;
|
content_info.args = NULL;
|
||||||
content_info.environ_get = menu_content_environment_get;
|
content_info.environ_get = menu_content_environment_get;
|
||||||
|
|
||||||
if (!content_ctl(CONTENT_CTL_LOAD, &content_info))
|
if (!content_load(&content_info))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (*fullpath)
|
if (*fullpath)
|
||||||
|
|
Loading…
Reference in New Issue