diff --git a/menu/menu_driver.c b/menu/menu_driver.c index fefe4e6088..b1d3d41cf4 100644 --- a/menu/menu_driver.c +++ b/menu/menu_driver.c @@ -324,3 +324,15 @@ void menu_driver_populate_entries(const char *path, const char *label, if (driver->menu_ctx && driver->menu_ctx->populate_entries) driver->menu_ctx->populate_entries(path, label, k); } + +bool menu_driver_load_background(void *data) +{ + driver_t *driver = driver_get_ptr(); + if (!driver) + return false; + + if (driver->menu_ctx && driver->menu_ctx->load_background) + return driver->menu_ctx->load_background(data); + + return false; +} diff --git a/menu/menu_driver.h b/menu/menu_driver.h index cbded2565a..5f403c3581 100644 --- a/menu/menu_driver.h +++ b/menu/menu_driver.h @@ -317,6 +317,8 @@ void menu_driver_render_messagebox(const char *msg); void menu_driver_populate_entries(const char *path, const char *label, unsigned k); +bool menu_driver_load_background(void *data); + #ifdef __cplusplus } #endif diff --git a/runloop_data.c b/runloop_data.c index 77fc5b0921..7d73cd1c7c 100644 --- a/runloop_data.c +++ b/runloop_data.c @@ -276,8 +276,7 @@ static int cb_image_menu_wallpaper_upload(void *data, size_t len) nbio->image.processing_final_state == IMAGE_PROCESS_ERROR_END) return -1; - if (driver->menu_ctx && driver->menu_ctx->load_background) - driver->menu_ctx->load_background(&nbio->image.ti); + menu_driver_load_background(&nbio->image.ti); texture_image_free(&nbio->image.ti);