mirror of
https://github.com/libretro/RetroArch.git
synced 2025-04-02 10:51:52 -04:00
(tasks/task_image.c) refactor cb_nbio_image_menu_thumbnail
This commit is contained in:
parent
e21a655dc6
commit
3cf591ec09
1 changed files with 9 additions and 8 deletions
|
@ -265,24 +265,25 @@ error:
|
|||
|
||||
static int cb_nbio_image_menu_thumbnail(void *data, size_t len)
|
||||
{
|
||||
nbio_handle_t *nbio = (nbio_handle_t*)data;
|
||||
void *handle = NULL;
|
||||
nbio_handle_t *nbio = (nbio_handle_t*)data;
|
||||
nbio_image_handle_t *image = nbio ? nbio->image : NULL;
|
||||
|
||||
if (!nbio || !data || !image)
|
||||
return -1;
|
||||
|
||||
image->handle = image_transfer_new(nbio->image_type);
|
||||
image->size = len;
|
||||
|
||||
if (!image->handle)
|
||||
goto error;
|
||||
|
||||
handle = image_transfer_new(nbio->image_type);
|
||||
|
||||
if (!handle)
|
||||
goto error;
|
||||
|
||||
image->handle = handle;
|
||||
image->size = len;
|
||||
image->cb = &cb_image_menu_thumbnail;
|
||||
|
||||
return cb_nbio_generic(nbio, &len);
|
||||
|
||||
error:
|
||||
image->handle = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue