mirror of
https://github.com/libretro/RetroArch
synced 2025-01-27 21:35:25 +00:00
Cleanups
This commit is contained in:
parent
b2426f30a6
commit
748959c8fc
29
content.c
29
content.c
@ -701,9 +701,6 @@ static bool init_content_file_set_attribs(
|
||||
* Initializes and loads a content file for the currently
|
||||
* selected libretro core.
|
||||
*
|
||||
* global->content_is_init will be set to the return value
|
||||
* on exit.
|
||||
*
|
||||
* Returns : true if successful, otherwise false.
|
||||
**/
|
||||
static bool content_init_file(struct string_list *temporary_content)
|
||||
@ -717,8 +714,6 @@ static bool content_init_file(struct string_list *temporary_content)
|
||||
rarch_system_info_t *system = NULL;
|
||||
global_t *global = global_get_ptr();
|
||||
|
||||
global->inited.content = false;
|
||||
|
||||
runloop_ctl(RUNLOOP_CTL_SYSTEM_INFO_GET, &system);
|
||||
|
||||
if (*global->subsystem)
|
||||
@ -748,19 +743,10 @@ static bool content_init_file(struct string_list *temporary_content)
|
||||
if (info)
|
||||
free(info);
|
||||
|
||||
if (!ret)
|
||||
goto error;
|
||||
|
||||
global->inited.content = true;
|
||||
|
||||
if (content)
|
||||
string_list_free(content);
|
||||
return true;
|
||||
|
||||
error:
|
||||
if (content)
|
||||
string_list_free(content);
|
||||
return false;
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool content_ctl(enum content_ctl_state state, void *data)
|
||||
@ -785,9 +771,16 @@ bool content_ctl(enum content_ctl_state state, void *data)
|
||||
return content_save_state(path);
|
||||
}
|
||||
case CONTENT_CTL_INIT:
|
||||
if (content_init_file(temporary_content))
|
||||
return true;
|
||||
/* fall-through */
|
||||
{
|
||||
global_t *global = global_get_ptr();
|
||||
if (content_init_file(temporary_content))
|
||||
{
|
||||
global->inited.content = true;
|
||||
return true;
|
||||
}
|
||||
global->inited.content = false;
|
||||
/* fall-through */
|
||||
}
|
||||
case CONTENT_CTL_TEMPORARY_FREE:
|
||||
if (!temporary_content)
|
||||
return false;
|
||||
|
@ -32,10 +32,7 @@ enum content_ctl_state
|
||||
CONTENT_CTL_NONE = 0,
|
||||
|
||||
/* Initializes and loads a content file for the currently
|
||||
* selected libretro core.
|
||||
*
|
||||
* global->content_is_init will be set to the return value
|
||||
* on exit. */
|
||||
* selected libretro core. */
|
||||
CONTENT_CTL_INIT,
|
||||
|
||||
/* Load a state from disk to memory. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user