Create frontend_driver_content_loaded

This commit is contained in:
twinaphex 2015-12-05 07:53:02 +01:00
parent 1fcf63735f
commit f38cdd1a64
3 changed files with 14 additions and 7 deletions

View File

@ -119,5 +119,13 @@ int frontend_driver_parse_drive_list(void *data)
return -1;
return frontend->parse_drive_list(data);
}
#endif
void frontend_driver_content_loaded(void)
{
frontend_ctx_driver_t *frontend = frontend_get_ptr();
if (!frontend || !frontend->content_loaded)
return;
frontend->content_loaded();
}
#endif

View File

@ -111,6 +111,8 @@ frontend_ctx_driver_t *frontend_ctx_init_first(void);
int frontend_driver_parse_drive_list(void *data);
void frontend_driver_content_loaded(void);
#ifdef __cplusplus
}
#endif

View File

@ -1402,8 +1402,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
if (!menu_load_content(CORE_TYPE_PLAIN))
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
#endif
if (driver->frontend_ctx && driver->frontend_ctx->content_loaded)
driver->frontend_ctx->content_loaded();
frontend_driver_content_loaded();
break;
#ifdef HAVE_FFMPEG
case RARCH_CTL_LOAD_CONTENT_FFMPEG:
@ -1412,8 +1411,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
if (!menu_load_content(CORE_TYPE_FFMPEG))
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
#endif
if (driver->frontend_ctx && driver->frontend_ctx->content_loaded)
driver->frontend_ctx->content_loaded();
frontend_driver_content_loaded();
break;
#endif
case RARCH_CTL_LOAD_CONTENT_IMAGEVIEWER:
@ -1422,8 +1420,7 @@ bool rarch_ctl(enum rarch_ctl_state state, void *data)
if (!menu_load_content(CORE_TYPE_IMAGEVIEWER))
rarch_ctl(RARCH_CTL_MENU_RUNNING, NULL);
#endif
if (driver->frontend_ctx && driver->frontend_ctx->content_loaded)
driver->frontend_ctx->content_loaded();
frontend_driver_content_loaded();
break;
case RARCH_CTL_MENU_RUNNING_FINISHED:
#ifdef HAVE_MENU