mirror of
https://github.com/libretro/RetroArch
synced 2025-02-07 03:40:24 +00:00
Fix display of core-generated messages when load content fails
This commit is contained in:
parent
8098c5978f
commit
42537a67e1
13
retroarch.c
13
retroarch.c
@ -14833,9 +14833,16 @@ bool command_event(enum event_command cmd, void *data)
|
||||
break;
|
||||
}
|
||||
case CMD_EVENT_CORE_INIT:
|
||||
content_reset_savestate_backups();
|
||||
{
|
||||
enum rarch_core_type *type = (enum rarch_core_type*)data;
|
||||
enum rarch_core_type *type = (enum rarch_core_type*)data;
|
||||
rarch_system_info_t *sys_info = &p_rarch->runloop_system;
|
||||
|
||||
content_reset_savestate_backups();
|
||||
|
||||
/* Ensure that disk control interface is reset */
|
||||
if (sys_info)
|
||||
disk_control_set_ext_callback(&sys_info->disk_control, NULL);
|
||||
|
||||
if (!type || !command_event_init_core(p_rarch, *type))
|
||||
return false;
|
||||
}
|
||||
@ -17175,7 +17182,7 @@ static void runloop_core_msg_queue_push(
|
||||
}
|
||||
|
||||
/* Get duration in frames */
|
||||
fps = av_info ? av_info->timing.fps : 60.0;
|
||||
fps = (av_info && (av_info->timing.fps > 0)) ? av_info->timing.fps : 60.0;
|
||||
duration_frames = (unsigned)((fps * (float)msg->duration / 1000.0f) + 0.5f);
|
||||
|
||||
runloop_msg_queue_push(msg->msg,
|
||||
|
@ -2579,7 +2579,10 @@ bool content_init(void)
|
||||
{
|
||||
RARCH_ERR("[CONTENT LOAD]: %s\n", error_string);
|
||||
}
|
||||
runloop_msg_queue_push(error_string, 2, ret ? 1 : 180, true, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
/* Do not flush the message queue here
|
||||
* > This allows any core-generated error messages
|
||||
* to propagate through to the frontend */
|
||||
runloop_msg_queue_push(error_string, 2, ret ? 1 : 180, false, NULL, MESSAGE_QUEUE_ICON_DEFAULT, MESSAGE_QUEUE_CATEGORY_INFO);
|
||||
free(error_string);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user