From 77f7e1da8cab97507c07dd48248e5a5ac5b45873 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 29 Mar 2018 16:27:19 +0200 Subject: [PATCH] Make menu_driver_load_image a static function --- menu/menu_driver.c | 22 ++++++++++++++-------- menu/menu_driver.h | 8 -------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/menu/menu_driver.c b/menu/menu_driver.c index 128dd37bdc..7fc7abdcc6 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -61,6 +61,12 @@ #define PARTICLES_COUNT 100 +typedef struct menu_ctx_load_image +{ + void *data; + enum menu_image_type type; +} menu_ctx_load_image_t; + /* Menu drivers */ static const menu_ctx_driver_t *menu_ctx_drivers[] = { #if defined(HAVE_XUI) @@ -1058,6 +1064,14 @@ bool menu_display_get_tex_coords(menu_display_ctx_coord_draw_t *draw) return true; } +static bool menu_driver_load_image(menu_ctx_load_image_t *load_image_info) +{ + if (menu_driver_ctx && menu_driver_ctx->load_image) + return menu_driver_ctx->load_image(menu_userdata, + load_image_info->data, load_image_info->type); + return false; +} + void menu_display_handle_thumbnail_upload(void *task_data, void *user_data, const char *err) { @@ -1804,14 +1818,6 @@ void menu_driver_populate_entries(menu_displaylist_info_t *info) info->label, info->type); } -bool menu_driver_load_image(menu_ctx_load_image_t *load_image_info) -{ - if (menu_driver_ctx && menu_driver_ctx->load_image) - return menu_driver_ctx->load_image(menu_userdata, - load_image_info->data, load_image_info->type); - return false; -} - bool menu_driver_push_list(menu_ctx_displaylist_t *disp_list) { if (menu_driver_ctx->list_push) diff --git a/menu/menu_driver.h b/menu/menu_driver.h index 3d8a2a74b0..b61131a33d 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -507,12 +507,6 @@ typedef struct menu_ctx_driver menu_entry_t *entry, unsigned action); } menu_ctx_driver_t; -typedef struct menu_ctx_load_image -{ - void *data; - enum menu_image_type type; -} menu_ctx_load_image_t; - typedef struct menu_ctx_displaylist { menu_displaylist_info_t *info; @@ -630,8 +624,6 @@ void menu_driver_navigation_set(bool scroll); void menu_driver_populate_entries(menu_displaylist_info_t *info); -bool menu_driver_load_image(menu_ctx_load_image_t *load_image_info); - bool menu_driver_push_list(menu_ctx_displaylist_t *disp_list); bool menu_driver_init(bool video_is_threaded);