mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-24 16:39:43 +00:00
Simplify some code in load_content - only do cheevos calls
when content has been successfully loaded
This commit is contained in:
parent
d658c1e09b
commit
9ad2e6fa1f
18
content.c
18
content.c
@ -538,20 +538,24 @@ static bool load_content(
|
||||
if (special)
|
||||
ret = core.retro_load_game_special(special->id, info, content->size);
|
||||
else
|
||||
{
|
||||
ret = core.retro_load_game(*content->elems[0].data ? info : NULL);
|
||||
|
||||
|
||||
if (!ret)
|
||||
{
|
||||
RARCH_ERR("%s.\n", msg_hash_to_str(MSG_FAILED_TO_LOAD_CONTENT));
|
||||
return false;
|
||||
}
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
if (!special)
|
||||
{
|
||||
/* Load the achievements into memory if the game has content. */
|
||||
cheevos_set_cheats();
|
||||
cheevos_load(*content->elems[0].data ? info : NULL);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!ret)
|
||||
RARCH_ERR("%s.\n", msg_hash_to_str(MSG_FAILED_TO_LOAD_CONTENT));
|
||||
|
||||
return ret;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool init_content_file_subsystem(
|
||||
|
Loading…
Reference in New Issue
Block a user