From 1e872108b772fda68c3318e3c5e77b8b12d2fc0f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Fri, 13 May 2016 09:27:58 +0200 Subject: [PATCH] (RJPEG) Add back rgba to bgra routines --- libretro-common/formats/jpeg/rjpeg.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libretro-common/formats/jpeg/rjpeg.c b/libretro-common/formats/jpeg/rjpeg.c index 887c6e3667..072f0a3a74 100644 --- a/libretro-common/formats/jpeg/rjpeg.c +++ b/libretro-common/formats/jpeg/rjpeg.c @@ -2468,10 +2468,14 @@ bool rjpeg_image_load(uint8_t *buf, void *data, size_t size, unsigned height = 0; struct texture_image *out_img = (struct texture_image*)data; - if (rjpeg_process_image(out_img, (void**)&buf, size, &width, &height) == IMAGE_PROCESS_END) - return true; + if (rjpeg_process_image(out_img, (void**)&buf, size, &width, &height) != IMAGE_PROCESS_END) + return false; - return false; + if (r_shift == 0 && b_shift == 16) { } /* RGBA, doesn't need conversion */ + else + video_frame_convert_rgba_to_bgra(buf, out_img->pixels, width); + + return true; } void rjpeg_free(rjpeg_t *rjpeg)