mirror of
https://github.com/CTCaer/RetroArch.git
synced 2024-12-20 09:48:27 +00:00
better firmware checking
This commit is contained in:
parent
367dea6723
commit
1b3789edde
@ -856,14 +856,6 @@ static int generic_action_ok_file_load(const char *corepath, const char *fullpat
|
||||
content_ctx_info_t content_info = {0};
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
if(runloop_ctl(RUNLOOP_CTL_IS_MISSING_BIOS, NULL)
|
||||
&& !string_is_empty(settings->directory.system)
|
||||
&& content_enum_idx == CONTENT_MODE_LOAD_CONTENT_WITH_CURRENT_CORE_FROM_MENU)
|
||||
{
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_FIRMWARE), 200, 100, true);
|
||||
RARCH_LOG(msg_hash_to_str(MSG_FIRMWARE));
|
||||
return 0;
|
||||
}
|
||||
if (!task_push_content_load_default(
|
||||
corepath, fullpath,
|
||||
&content_info,
|
||||
|
21
runloop.c
21
runloop.c
@ -140,11 +140,24 @@ void update_firmware_status()
|
||||
core_info_t *core_info = NULL;
|
||||
settings_t *settings = config_get_ptr();
|
||||
core_info_ctx_firmware_t firmware_info;
|
||||
|
||||
core_info_get_current_core(&core_info);
|
||||
firmware_info.path = core_info->path;
|
||||
firmware_info.directory.system = settings->directory.system;
|
||||
core_info_list_update_missing_firmware(&firmware_info);
|
||||
|
||||
if (core_info && settings)
|
||||
{
|
||||
firmware_info.path = core_info->path;
|
||||
if (!string_is_empty(settings->directory.system))
|
||||
firmware_info.directory.system = settings->directory.system;
|
||||
else
|
||||
{
|
||||
char s[PATH_MAX_LENGTH];
|
||||
strlcpy(s, path_get(RARCH_PATH_CONTENT) ,sizeof(s));
|
||||
path_basedir(s);
|
||||
firmware_info.directory.system = s;
|
||||
}
|
||||
RARCH_LOG("Updating firmware status for: %s on %s\n", core_info->path,
|
||||
firmware_info.directory.system);
|
||||
core_info_list_update_missing_firmware(&firmware_info);
|
||||
}
|
||||
}
|
||||
|
||||
void runloop_msg_queue_push(const char *msg,
|
||||
|
@ -223,6 +223,8 @@ char* runloop_msg_queue_pull(void);
|
||||
|
||||
bool runloop_ctl(enum runloop_ctl_state state, void *data);
|
||||
|
||||
void update_firmware_status();
|
||||
|
||||
RETRO_END_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -1241,6 +1241,9 @@ bool task_push_content_load_default(
|
||||
#endif
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_FFMPEG_CORE_FROM_MENU:
|
||||
case CONTENT_MODE_LOAD_CONTENT_WITH_IMAGEVIEWER_CORE_FROM_MENU:
|
||||
update_firmware_status();
|
||||
if(runloop_ctl(RUNLOOP_CTL_IS_MISSING_BIOS, NULL))
|
||||
goto skip;
|
||||
if (!task_load_content(content_info, loading_from_menu, mode))
|
||||
goto error;
|
||||
break;
|
||||
@ -1289,4 +1292,10 @@ error:
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
|
||||
skip:
|
||||
runloop_msg_queue_push(msg_hash_to_str(MSG_FIRMWARE), 100, 1000, true);
|
||||
RARCH_LOG(msg_hash_to_str(MSG_FIRMWARE));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user