diff --git a/tasks/task_image.c b/tasks/task_image.c index 855b5e5f45..fef0002a73 100644 --- a/tasks/task_image.c +++ b/tasks/task_image.c @@ -25,6 +25,7 @@ #include #include +#include "../gfx/video_driver.h" #include "../file_path_special.h" #include "../verbosity.h" @@ -331,6 +332,7 @@ bool task_push_image_load(const char *fullpath, retro_task_t *t = NULL; struct nbio_t *handle = NULL; struct nbio_image_handle *image = NULL; + bool supports_rgba = video_driver_supports_rgba(); if (enum_idx == MSG_UNKNOWN) goto error_msg; @@ -349,6 +351,9 @@ bool task_push_image_load(const char *fullpath, nbio->handle = handle; + if (supports_rgba) + BIT32_SET(nbio->status_flags, NBIO_FLAG_IMAGE_SUPPORTS_RGBA); + image = (struct nbio_image_handle*)calloc(1, sizeof(*image)); if (!image) goto error; diff --git a/tasks/tasks_internal.h b/tasks/tasks_internal.h index b070f29290..7a91723d8c 100644 --- a/tasks/tasks_internal.h +++ b/tasks/tasks_internal.h @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -60,6 +61,12 @@ enum nbio_status_enum NBIO_STATUS_TRANSFER_PARSE_FREE }; +enum nbio_status_flags +{ + NBIO_FLAG_NONE = 0, + NBIO_FLAG_IMAGE_SUPPORTS_RGBA +}; + typedef struct nbio_handle { enum image_type_enum image_type; @@ -70,6 +77,7 @@ typedef struct nbio_handle unsigned pos_increment; msg_queue_t *msg_queue; unsigned status; + uint32_t status_flags; } nbio_handle_t; typedef struct autoconfig_params