mirror of
https://github.com/libretro/RetroArch
synced 2025-03-01 16:13:40 +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
16
content.c
16
content.c
@ -538,20 +538,24 @@ static bool load_content(
|
|||||||
if (special)
|
if (special)
|
||||||
ret = core.retro_load_game_special(special->id, info, content->size);
|
ret = core.retro_load_game_special(special->id, info, content->size);
|
||||||
else
|
else
|
||||||
{
|
|
||||||
ret = core.retro_load_game(*content->elems[0].data ? info : NULL);
|
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
|
#ifdef HAVE_CHEEVOS
|
||||||
|
if (!special)
|
||||||
|
{
|
||||||
/* Load the achievements into memory if the game has content. */
|
/* Load the achievements into memory if the game has content. */
|
||||||
cheevos_set_cheats();
|
cheevos_set_cheats();
|
||||||
cheevos_load(*content->elems[0].data ? info : NULL);
|
cheevos_load(*content->elems[0].data ? info : NULL);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!ret)
|
return true;
|
||||||
RARCH_ERR("%s.\n", msg_hash_to_str(MSG_FAILED_TO_LOAD_CONTENT));
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool init_content_file_subsystem(
|
static bool init_content_file_subsystem(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user