From 9ac9ed4b368b8b7bd38343ef4c0fd1c2a29370e7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 7 May 2016 03:35:31 +0200 Subject: [PATCH] Cleanups --- gfx/video_texture_image.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/gfx/video_texture_image.c b/gfx/video_texture_image.c index 865c996102..fe66c575e1 100644 --- a/gfx/video_texture_image.c +++ b/gfx/video_texture_image.c @@ -25,6 +25,7 @@ #include #include +#include #ifdef HAVE_RPNG #include #endif @@ -153,10 +154,8 @@ static bool video_texture_image_load_png( unsigned a_shift, unsigned r_shift, unsigned g_shift, unsigned b_shift) { - bool ret = rpng_load_image_argb(path, - &out_img->pixels, &out_img->width, &out_img->height); - - if (!ret) + if (!rpng_load_image_argb(path, + &out_img->pixels, &out_img->width, &out_img->height)) { out_img->pixels = NULL; out_img->width = out_img->height = 0; @@ -167,13 +166,10 @@ static bool video_texture_image_load_png( a_shift, out_img); #ifdef GEKKO - if (ret) + if (!video_texture_image_rpng_gx_convert_texture32(out_img)) { - if (!video_texture_image_rpng_gx_convert_texture32(out_img)) - { - video_texture_image_free(out_img); - return false; - } + video_texture_image_free(out_img); + return false; } #endif