Get rid of unused typedef

This commit is contained in:
twinaphex 2016-09-23 02:49:25 +02:00
parent 8fd94e4aab
commit 9db91a92c3
1 changed files with 16 additions and 18 deletions

View File

@ -40,8 +40,6 @@ enum image_status_enum
IMAGE_STATUS_TRANSFER_PARSE_FREE IMAGE_STATUS_TRANSFER_PARSE_FREE
}; };
typedef struct nbio_image_handle nbio_image_handle_t;
struct nbio_image_handle struct nbio_image_handle
{ {
struct texture_image ti; struct texture_image ti;
@ -60,8 +58,8 @@ struct nbio_image_handle
static int cb_image_menu_upload_generic(void *data, size_t len) static int cb_image_menu_upload_generic(void *data, size_t len)
{ {
unsigned r_shift, g_shift, b_shift, a_shift; unsigned r_shift, g_shift, b_shift, a_shift;
nbio_handle_t *nbio = (nbio_handle_t*)data; nbio_handle_t *nbio = (nbio_handle_t*)data;
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
if (!image) if (!image)
return -1; return -1;
@ -86,7 +84,7 @@ static int cb_image_menu_upload_generic(void *data, size_t len)
static int task_image_iterate_transfer_parse(nbio_handle_t *nbio) static int task_image_iterate_transfer_parse(nbio_handle_t *nbio)
{ {
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
if (image->handle && image->cb) if (image->handle && image->cb)
{ {
@ -102,7 +100,7 @@ static int task_image_process(
unsigned *width, unsigned *width,
unsigned *height) unsigned *height)
{ {
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
int retval = image_transfer_process( int retval = image_transfer_process(
image->handle, image->handle,
@ -122,7 +120,7 @@ static int cb_image_menu_generic(nbio_handle_t *nbio)
{ {
int retval; int retval;
unsigned width = 0, height = 0; unsigned width = 0, height = 0;
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
if (!image) if (!image)
return -1; return -1;
@ -140,7 +138,7 @@ static int cb_image_menu_generic(nbio_handle_t *nbio)
static int cb_image_menu_thumbnail(void *data, size_t len) static int cb_image_menu_thumbnail(void *data, size_t len)
{ {
nbio_handle_t *nbio = (nbio_handle_t*)data; nbio_handle_t *nbio = (nbio_handle_t*)data;
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
if (cb_image_menu_generic(nbio) != 0) if (cb_image_menu_generic(nbio) != 0)
return -1; return -1;
@ -154,7 +152,7 @@ static int task_image_iterate_process_transfer(nbio_handle_t *nbio)
{ {
int retval = 0; int retval = 0;
unsigned i, width = 0, height = 0; unsigned i, width = 0, height = 0;
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
if (!image) if (!image)
return -1; return -1;
@ -177,7 +175,7 @@ static int task_image_iterate_process_transfer(nbio_handle_t *nbio)
static int task_image_iterate_transfer(nbio_handle_t *nbio) static int task_image_iterate_transfer(nbio_handle_t *nbio)
{ {
unsigned i; unsigned i;
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
if (!image) if (!image)
goto error; goto error;
@ -199,7 +197,7 @@ error:
static void task_image_load_free_internal(nbio_handle_t *nbio) static void task_image_load_free_internal(nbio_handle_t *nbio)
{ {
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
if (image) { if (image) {
image_transfer_free(image->handle, nbio->image_type); image_transfer_free(image->handle, nbio->image_type);
@ -214,7 +212,7 @@ static void task_image_load_free_internal(nbio_handle_t *nbio)
static int cb_nbio_generic(nbio_handle_t *nbio, size_t *len) static int cb_nbio_generic(nbio_handle_t *nbio, size_t *len)
{ {
void *ptr = NULL; void *ptr = NULL;
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
if (!image || !image->handle) if (!image || !image->handle)
goto error; goto error;
@ -246,7 +244,7 @@ error:
static int cb_nbio_image_menu_thumbnail(void *data, size_t len) static int cb_nbio_image_menu_thumbnail(void *data, size_t len)
{ {
nbio_image_handle_t *image = NULL; struct nbio_image_handle *image = NULL;
void *handle = NULL; void *handle = NULL;
nbio_handle_t *nbio = (nbio_handle_t*)data; nbio_handle_t *nbio = (nbio_handle_t*)data;
@ -258,7 +256,7 @@ static int cb_nbio_image_menu_thumbnail(void *data, size_t len)
if (!handle) if (!handle)
goto error; goto error;
image = (nbio_image_handle_t*)nbio->data; image = (struct nbio_image_handle*)nbio->data;
image->handle = handle; image->handle = handle;
image->size = len; image->size = len;
@ -273,7 +271,7 @@ error:
bool task_image_load_handler(retro_task_t *task) bool task_image_load_handler(retro_task_t *task)
{ {
nbio_handle_t *nbio = (nbio_handle_t*)task->state; nbio_handle_t *nbio = (nbio_handle_t*)task->state;
nbio_image_handle_t *image = (nbio_image_handle_t*)nbio->data; struct nbio_image_handle *image = (struct nbio_image_handle*)nbio->data;
switch (image->status) switch (image->status)
{ {
@ -322,7 +320,7 @@ bool task_push_image_load(const char *fullpath,
nbio_handle_t *nbio = NULL; nbio_handle_t *nbio = NULL;
retro_task_t *t = NULL; retro_task_t *t = NULL;
struct nbio_t *handle = NULL; struct nbio_t *handle = NULL;
nbio_image_handle_t *image = NULL; struct nbio_image_handle *image = NULL;
if (enum_idx == MSG_UNKNOWN) if (enum_idx == MSG_UNKNOWN)
goto error_msg; goto error_msg;
@ -341,13 +339,13 @@ bool task_push_image_load(const char *fullpath,
nbio->handle = handle; nbio->handle = handle;
image = (nbio_image_handle_t*)calloc(1, sizeof(*image)); image = (struct nbio_image_handle*)calloc(1, sizeof(*image));
if (!image) if (!image)
goto error; goto error;
image->status = IMAGE_STATUS_TRANSFER; image->status = IMAGE_STATUS_TRANSFER;
nbio->data = (nbio_image_handle_t*)image; nbio->data = (struct nbio_image_handle*)image;
nbio->is_finished = false; nbio->is_finished = false;
nbio->cb = &cb_nbio_image_menu_thumbnail; nbio->cb = &cb_nbio_image_menu_thumbnail;
nbio->status = NBIO_STATUS_TRANSFER; nbio->status = NBIO_STATUS_TRANSFER;