Compile in mpng

This commit is contained in:
twinaphex 2015-02-19 03:30:12 +01:00
parent d94679e14b
commit 542bbd3ee9
3 changed files with 21 additions and 19 deletions

View File

@ -167,9 +167,9 @@ OBJ += frontend/frontend.o \
performance.o
OBJ += gfx/image/image_rpng.o
#OBJ += gfx/image/image_mpng.o
#OBJ += gfx/image/image_mpng.o \
libretro-common/formats/mpng/mpng_decode.o
OBJ += libretro-common/formats/mpng/mpng_decode.o
# LibretroDB

View File

@ -178,9 +178,11 @@ VIDEO IMAGE
#include "../gfx/image/image_xdk1.c"
#else
#include "../gfx/image/image_rpng.c"
//#include "../gfx/image/image_mpng.c"
#endif
#include "../libretro-common/formats/png/rpng.c"
#include "../libretro-common/formats/mpng/mpng_decode.c"
/*============================================================
VIDEO DRIVER

View File

@ -80,17 +80,17 @@ bool png_decode(const void * pngdata, size_t pnglen, struct mpng_image * img, en
unsigned i;
unsigned b, x, y;
unsigned int bitsperchannel;
unsigned int colortype;
unsigned int compressiontype;
unsigned int filtertype;
unsigned int interlacetype;
unsigned int bpl;
unsigned int bitsperchannel = 0;
unsigned int colortype = 0;
unsigned int compressiontype = 0;
unsigned int filtertype = 0;
unsigned int interlacetype = 0;
unsigned int bpl = 0;
unsigned int width;
unsigned int height;
uint8_t * pixelsat;
uint8_t * pixelsend;
unsigned int width = 0;
unsigned int height = 0;
uint8_t * pixelsat = NULL;
uint8_t * pixelsend = NULL;
unsigned int palette[256];
int palettelen = 0;
@ -409,7 +409,7 @@ bool png_decode(const void * pngdata, size_t pnglen, struct mpng_image * img, en
{
case 1:
{
int y = height;
y = height;
uint8_t *outp = out + 3 * width * height;
do