mirror of
https://github.com/libretro/RetroArch
synced 2025-02-28 12:40:23 +00:00
(GX) Buildfix
This commit is contained in:
parent
101ec57936
commit
7decd1e230
@ -74,39 +74,6 @@ bool video_texture_image_color_convert(unsigned r_shift,
|
||||
}
|
||||
|
||||
#ifdef HAVE_RPNG
|
||||
static bool video_texture_image_load_png(
|
||||
const char *path,
|
||||
struct texture_image *out_img,
|
||||
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)
|
||||
{
|
||||
out_img->pixels = NULL;
|
||||
out_img->width = out_img->height = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
video_texture_image_color_convert(r_shift, g_shift, b_shift,
|
||||
a_shift, out_img);
|
||||
|
||||
#ifdef GEKKO
|
||||
if (ret)
|
||||
{
|
||||
if (!video_texture_image_rpng_gx_convert_texture32(out_img))
|
||||
{
|
||||
video_texture_image_free(out_img);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef GEKKO
|
||||
|
||||
@ -168,6 +135,41 @@ static bool video_texture_image_rpng_gx_convert_texture32(struct texture_image *
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool video_texture_image_load_png(
|
||||
const char *path,
|
||||
struct texture_image *out_img,
|
||||
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)
|
||||
{
|
||||
out_img->pixels = NULL;
|
||||
out_img->width = out_img->height = 0;
|
||||
return false;
|
||||
}
|
||||
|
||||
video_texture_image_color_convert(r_shift, g_shift, b_shift,
|
||||
a_shift, out_img);
|
||||
|
||||
#ifdef GEKKO
|
||||
if (ret)
|
||||
{
|
||||
if (!video_texture_image_rpng_gx_convert_texture32(out_img))
|
||||
{
|
||||
video_texture_image_free(out_img);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
void video_texture_image_free(struct texture_image *img)
|
||||
{
|
||||
if (!img)
|
||||
|
Loading…
x
Reference in New Issue
Block a user