mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Log calls to retro_load_game and also document some other parts of the code
This commit is contained in:
parent
b4f2ff0c42
commit
e05f04824c
15
content.c
15
content.c
@ -478,18 +478,20 @@ static bool load_content(
|
||||
)
|
||||
{
|
||||
unsigned i;
|
||||
bool ret = true;
|
||||
bool ret = true;
|
||||
const char *path = NULL;
|
||||
|
||||
if (!info || !additional_path_allocs)
|
||||
return false;
|
||||
|
||||
for (i = 0; i < content->size; i++)
|
||||
{
|
||||
const char *path = content->elems[i].data;
|
||||
int attr = content->elems[i].attr.i;
|
||||
bool need_fullpath = attr & 2;
|
||||
bool require_content = attr & 4;
|
||||
|
||||
path = content->elems[i].data;
|
||||
|
||||
if (require_content && string_is_empty(path))
|
||||
{
|
||||
RARCH_LOG("libretro core requires content, "
|
||||
@ -522,16 +524,21 @@ static bool load_content(
|
||||
}
|
||||
}
|
||||
|
||||
path = content->elems[0].data;
|
||||
|
||||
RARCH_LOG("Calling %s with path: [%s]\n", special ?
|
||||
"retro_load_game_special" : "retro_load_game", *path ? path : "N/A");
|
||||
|
||||
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);
|
||||
ret = core.retro_load_game(*path ? info : NULL);
|
||||
|
||||
#ifdef HAVE_CHEEVOS
|
||||
/* Load the achievements into memory if the game has content. */
|
||||
cheevos_set_cheats();
|
||||
cheevos_load(*content->elems[0].data ? info : NULL);
|
||||
cheevos_load(*path ? info : NULL);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -388,6 +388,8 @@ static int zip_file_decompressed(const char *name, const char *valid_exts,
|
||||
|
||||
if (st->opt_file != 0)
|
||||
{
|
||||
/* Called in case core has need_fullpath enabled. */
|
||||
RARCH_LOG("opt file is: %s\n", st->opt_file);
|
||||
if (!retro_write_file(st->opt_file, cdata, size))
|
||||
goto error;
|
||||
|
||||
@ -395,6 +397,9 @@ static int zip_file_decompressed(const char *name, const char *valid_exts,
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Called in case core has need_fullpath disabled.
|
||||
* Will copy decompressed content directly into
|
||||
* RetroArch's ROM buffer. */
|
||||
int ret = 0;
|
||||
file_archive_file_handle_t handle = {0};
|
||||
handle.backend = file_archive_get_default_file_backend();
|
||||
|
Loading…
x
Reference in New Issue
Block a user