Add content_is_init - set to true if content file has been loaded
into memory, set to false when it has failed in doing so
This commit is contained in:
parent
e75d94fd65
commit
064f23b354
|
@ -134,8 +134,12 @@ static ssize_t read_content_file(const char *path, void **buf)
|
||||||
{
|
{
|
||||||
uint8_t *ret_buf = NULL;
|
uint8_t *ret_buf = NULL;
|
||||||
ssize_t ret = -1;
|
ssize_t ret = -1;
|
||||||
|
|
||||||
|
RARCH_LOG("Loading content file: %s.\n", path);
|
||||||
ret = read_file(path, (void**) &ret_buf);
|
ret = read_file(path, (void**) &ret_buf);
|
||||||
|
|
||||||
|
g_extern.content_is_init = (ret <= 0) ? false : true;
|
||||||
|
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -371,7 +375,6 @@ static bool load_content(const struct retro_subsystem_info *special,
|
||||||
if (!need_fullpath && *path)
|
if (!need_fullpath && *path)
|
||||||
{
|
{
|
||||||
/* Load the content into memory. */
|
/* Load the content into memory. */
|
||||||
RARCH_LOG("Loading content file: %s.\n", path);
|
|
||||||
|
|
||||||
/* First content file is significant, attempt to do patching,
|
/* First content file is significant, attempt to do patching,
|
||||||
* CRC checking, etc. */
|
* CRC checking, etc. */
|
||||||
|
|
|
@ -254,9 +254,8 @@ returntype main_entry(signature())
|
||||||
|
|
||||||
if (g_settings.history_list_enable)
|
if (g_settings.history_list_enable)
|
||||||
{
|
{
|
||||||
#if defined(RARCH_CONSOLE) || defined(RARCH_MOBILE)
|
/* TODO - need to also check for SET_SUPPORT_NO_GAME here. */
|
||||||
if (ret)
|
if (g_extern.content_is_init)
|
||||||
#endif
|
|
||||||
history_playlist_push(g_defaults.history,
|
history_playlist_push(g_defaults.history,
|
||||||
g_extern.fullpath,
|
g_extern.fullpath,
|
||||||
g_settings.libretro,
|
g_settings.libretro,
|
||||||
|
|
|
@ -785,6 +785,7 @@ struct global
|
||||||
FILE *log_file;
|
FILE *log_file;
|
||||||
|
|
||||||
bool main_is_init;
|
bool main_is_init;
|
||||||
|
bool content_is_init;
|
||||||
bool error_in_init;
|
bool error_in_init;
|
||||||
char error_string[PATH_MAX];
|
char error_string[PATH_MAX];
|
||||||
jmp_buf error_sjlj_context;
|
jmp_buf error_sjlj_context;
|
||||||
|
|
Loading…
Reference in New Issue