diff --git a/menu/drivers/materialui.c b/menu/drivers/materialui.c index e274c95ab5..cbe8748b91 100644 --- a/menu/drivers/materialui.c +++ b/menu/drivers/materialui.c @@ -2773,8 +2773,9 @@ menu_ctx_driver_t menu_ctx_mui = { NULL, NULL, menu_display_osk_ptr_at_pos, - NULL, - NULL, + NULL, /* update_savestate_thumbnail_path */ + NULL, /* update_savestate_thumbnail_image */ materialui_pointer_down, materialui_pointer_up, + NULL /* get_load_content_animation_data */ }; diff --git a/menu/drivers/null.c b/menu/drivers/null.c index 35708a5e81..5ddacd62e0 100644 --- a/menu/drivers/null.c +++ b/menu/drivers/null.c @@ -96,4 +96,7 @@ menu_ctx_driver_t menu_ctx_null = { NULL, /* osk_ptr_at_pos */ NULL, /* update_savestate_thumbnail_path */ NULL, /* update_savestate_thumbnail_image */ + NULL, /* pointer_down */ + NULL, /* pointer_up */ + NULL, /* get_load_content_animation_data */ }; diff --git a/menu/drivers/ozone/ozone.c b/menu/drivers/ozone/ozone.c index d7ce363818..18ead24714 100644 --- a/menu/drivers/ozone/ozone.c +++ b/menu/drivers/ozone/ozone.c @@ -1854,6 +1854,28 @@ static int ozone_list_bind_init(menu_file_list_cbs_t *cbs, return -1; } +#ifdef HAVE_MENU_WIDGETS +static bool ozone_get_load_content_animation_data(void *userdata, menu_texture_item *icon, char **playlist_name) +{ + ozone_handle_t *ozone = (ozone_handle_t*) userdata; + + if (ozone->categories_selection_ptr > ozone->system_tab_end) + { + ozone_node_t *node = file_list_get_userdata_at_offset(ozone->horizontal_list, ozone->categories_selection_ptr - ozone->system_tab_end-1); + + *icon = node->icon; + *playlist_name = node->console_name; + } + else + { + *icon = ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_QUICKMENU]; + *playlist_name = "RetroArch"; + } + + return true; +} +#endif + menu_ctx_driver_t menu_ctx_ozone = { NULL, /* set_texture */ ozone_messagebox, @@ -1896,6 +1918,11 @@ menu_ctx_driver_t menu_ctx_ozone = { menu_display_osk_ptr_at_pos, NULL, /* update_savestate_thumbnail_path */ NULL, /* update_savestate_thumbnail_image */ - NULL, + NULL, /* pointer_down */ + NULL, /* pointer_up */ +#ifdef HAVE_MENU_WIDGETS + ozone_get_load_content_animation_data +#else NULL +#endif }; diff --git a/menu/drivers/rgui.c b/menu/drivers/rgui.c index b4ebb92daf..7f37bf6a7e 100644 --- a/menu/drivers/rgui.c +++ b/menu/drivers/rgui.c @@ -2288,11 +2288,14 @@ menu_ctx_driver_t menu_ctx_rgui = { "rgui", rgui_environ, rgui_pointer_tap, - NULL, + NULL, /* update_thumbnail_path */ rgui_update_thumbnail_image, rgui_set_thumbnail_system, - NULL, - NULL, - NULL, - NULL + NULL, /* set_thumbnail_content */ + NULL, /* osk_ptr_at_pos */ + NULL, /* update_savestate_thumbnail_path */ + NULL, /* update_savestate_thumbnail_image */ + NULL, /* pointer_down */ + NULL, /* pointer_up */ + NULL, /* get_load_content_animation_data */ }; diff --git a/menu/drivers/stripes.c b/menu/drivers/stripes.c index 2b6689ac85..973401d2c0 100644 --- a/menu/drivers/stripes.c +++ b/menu/drivers/stripes.c @@ -4457,5 +4457,8 @@ menu_ctx_driver_t menu_ctx_stripes = { stripes_set_thumbnail_content, stripes_osk_ptr_at_pos, stripes_update_savestate_thumbnail_path, - stripes_update_savestate_thumbnail_image + stripes_update_savestate_thumbnail_image, + NULL, /* pointer_down */ + NULL, /* pointer_up */ + NULL /* get_load_content_animation_data */ }; diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index dabab6c530..0516ee5d49 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -3070,7 +3070,7 @@ static void xmb_draw_items( menu_display_ctx_rotate_draw_t rotate_draw; xmb_node_t *core_node = NULL; size_t end = 0; - uint64_t frame_count = xmb ? xmb->frame_count : 0; + uint64_t frame_count = xmb->frame_count; const char *thumb_ident = xmb_thumbnails_ident('R'); const char *left_thumb_ident= xmb_thumbnails_ident('L'); @@ -5771,6 +5771,28 @@ static int xmb_pointer_tap(void *userdata, return 0; } +#ifdef HAVE_MENU_WIDGETS +static bool xmb_get_load_content_animation_data(void *userdata, menu_texture_item *icon, char **playlist_name) +{ + xmb_handle_t *xmb = (xmb_handle_t*) userdata; + + if (xmb->categories_selection_ptr > xmb->system_tab_end) + { + xmb_node_t *node = file_list_get_userdata_at_offset(xmb->horizontal_list, xmb->categories_selection_ptr - xmb->system_tab_end-1); + + *icon = node->icon; + *playlist_name = xmb->title_name; + } + else + { + *icon = xmb->textures.list[XMB_TEXTURE_QUICKMENU]; + *playlist_name = "RetroArch"; + } + + return true; +} +#endif + menu_ctx_driver_t menu_ctx_xmb = { NULL, xmb_messagebox, @@ -5813,6 +5835,11 @@ menu_ctx_driver_t menu_ctx_xmb = { menu_display_osk_ptr_at_pos, xmb_update_savestate_thumbnail_path, xmb_update_savestate_thumbnail_image, - NULL, + NULL, /* pointer_down */ + NULL, /* pointer_up */ +#ifdef HAVE_MENU_WIDGETS + xmb_get_load_content_animation_data +#else NULL +#endif }; diff --git a/menu/drivers/xui.cpp b/menu/drivers/xui.cpp index f47ee97dcb..f691198861 100644 --- a/menu/drivers/xui.cpp +++ b/menu/drivers/xui.cpp @@ -747,5 +747,8 @@ menu_ctx_driver_t menu_ctx_xui = { NULL, /* set_thumbnail_content */ NULL, /* osk_ptr_at_pos */ NULL, /* update_savestate_thumbnail_path */ - NULL /* update_savestate_thumbnail_image */ + NULL, /* update_savestate_thumbnail_image */ + NULL, /* pointer_down */ + NULL, /* pointer_up */ + NULL /* get_load_content_animation_data */ }; diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 2c88fee5a2..c2563b8cfc 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -1907,6 +1907,12 @@ void menu_driver_frame(video_frame_info_t *video_info) menu_driver_ctx->frame(menu_userdata, video_info); } +bool menu_driver_get_load_content_animation_data(menu_texture_item *icon, char **playlist_name) +{ + return menu_driver_ctx && menu_driver_ctx->get_load_content_animation_data + && menu_driver_ctx->get_load_content_animation_data(menu_userdata, icon, playlist_name); +} + bool menu_driver_render(bool is_idle, bool rarch_is_inited, bool rarch_is_dummy_core) { diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 54e79e1717..58cb2afac8 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -388,6 +388,7 @@ typedef struct menu_ctx_driver int (*pointer_up)(void *data, unsigned x, unsigned y, unsigned ptr, menu_file_list_cbs_t *cbs, menu_entry_t *entry, unsigned action); + bool (*get_load_content_animation_data)(void *userdata, menu_texture_item *icon, char **playlist_name); } menu_ctx_driver_t; typedef struct menu_ctx_displaylist @@ -493,6 +494,8 @@ void menu_driver_set_binding_state(bool on); void menu_driver_frame(video_frame_info_t *video_info); +bool menu_driver_get_load_content_animation_data(menu_texture_item *icon, char **playlist_name); + /* Is a background texture set for the current menu driver? Should * return true for RGUI, for instance. */ bool menu_driver_is_texture_set(void);