aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThemaister2012-09-10 09:11:27 +0200
committerThemaister2012-09-10 09:11:27 +0200
commit791f6e3e4764e93a81a6b57127d6d9673a7456e9 (patch)
tree673dbb899cfe933464777a4cfd2b18bde931bd47
parent9f7042907bbf7e1810ee8e002bc43319fbb3d0b4 (diff)
downloadpcsx_rearmed-791f6e3e4764e93a81a6b57127d6d9673a7456e9.tar.gz
pcsx_rearmed-791f6e3e4764e93a81a6b57127d6d9673a7456e9.tar.bz2
pcsx_rearmed-791f6e3e4764e93a81a6b57127d6d9673a7456e9.zip
Fix build for libretro.
-rwxr-xr-xconfigure10
-rw-r--r--frontend/common/readpng.c34
2 files changed, 22 insertions, 22 deletions
diff --git a/configure b/configure
index 9c059af..da126e7 100755
--- a/configure
+++ b/configure
@@ -230,12 +230,12 @@ if [ "x$builtin_gpu" = "x" ]; then
builtin_gpu="peops"
fi
-if [ "$ARCH" = "x86_64" ]; then
+#if [ "$ARCH" = "x86_64" ]; then
# currently we are full of 32bit assumptions,
# at least savestate compatibility will break without these
- CFLAGS="$CFLAGS -m32"
- LDFLAGS="$LDFLAGS -m32"
-fi
+# CFLAGS="$CFLAGS -m32"
+# LDFLAGS="$LDFLAGS -m32"
+#fi
# supposedly we can avoid -fPIC on armv5 for slightly better performace?
if [ "$ARCH" != "arm" -o "$have_armv6" = "yes" ]; then
@@ -267,7 +267,7 @@ check_zlib()
{
cat > $TMPC <<EOF
#include <zlib.h>
- void main() { uncompress(0, 0, 0, 0); }
+ int main(void) { uncompress(0, 0, 0, 0); }
EOF
compile_binary
}
diff --git a/frontend/common/readpng.c b/frontend/common/readpng.c
index cad1217..540f543 100644
--- a/frontend/common/readpng.c
+++ b/frontend/common/readpng.c
@@ -60,7 +60,7 @@ int readpng(void *dest, const char *fname, readpng_what what, int req_w, int req
goto done;
}
- // lprintf("%s: %ix%i @ %ibpp\n", fname, (int)info_ptr->width, (int)info_ptr->height, info_ptr->pixel_depth);
+ // lprintf("%s: %ix%i @ %ibpp\n", fname, (int)png_get_image_width(png_ptr, info_ptr), (int)png_get_image_height(png_ptr, info_ptr), png_get_bit_depth(png_ptr, info_ptr));
switch (what)
{
@@ -68,15 +68,15 @@ int readpng(void *dest, const char *fname, readpng_what what, int req_w, int req
{
int height, width, h;
unsigned short *dst = dest;
- if (info_ptr->pixel_depth != 24)
+ if (png_get_bit_depth(png_ptr, info_ptr) != 8)
{
- lprintf(__FILE__ ": bg image uses %ibpp, needed 24bpp\n", info_ptr->pixel_depth);
+ lprintf(__FILE__ ": bg image uses %ibpc, needed 8bpc\n", png_get_bit_depth(png_ptr, info_ptr));
break;
}
- height = info_ptr->height;
+ height = png_get_image_width(png_ptr, info_ptr);
if (height > req_h)
height = req_h;
- width = info_ptr->width;
+ width = png_get_image_height(png_ptr, info_ptr);
if (width > req_w)
width = req_w;
@@ -102,15 +102,15 @@ int readpng(void *dest, const char *fname, readpng_what what, int req_w, int req
{
int x, y, x1, y1;
unsigned char *dst = dest;
- if (info_ptr->width != req_w || info_ptr->height != req_h)
+ if (png_get_image_width(png_ptr, info_ptr) != req_w || png_get_image_height(png_ptr, info_ptr) != req_h)
{
lprintf(__FILE__ ": unexpected font image size %dx%d, needed %dx%d\n",
- (int)info_ptr->width, (int)info_ptr->height, req_w, req_h);
+ (int)png_get_image_width(png_ptr, info_ptr), (int)png_get_image_height(png_ptr, info_ptr), req_w, req_h);
break;
}
- if (info_ptr->pixel_depth != 8)
+ if (png_get_bit_depth(png_ptr, info_ptr) != 8)
{
- lprintf(__FILE__ ": font image uses %ibpp, needed 8bpp\n", info_ptr->pixel_depth);
+ lprintf(__FILE__ ": font image uses %ibpp, needed 8bpp\n", png_get_bit_depth(png_ptr, info_ptr));
break;
}
for (y = 0; y < 16; y++)
@@ -135,15 +135,15 @@ int readpng(void *dest, const char *fname, readpng_what what, int req_w, int req
{
int x1, y1;
unsigned char *dst = dest;
- if (info_ptr->width != req_w || info_ptr->height != req_h)
+ if (png_get_image_width(png_ptr, info_ptr) != req_w || png_get_image_height(png_ptr, info_ptr) != req_h)
{
lprintf(__FILE__ ": unexpected selector image size %ix%i, needed %dx%d\n",
- (int)info_ptr->width, (int)info_ptr->height, req_w, req_h);
+ (int)png_get_image_width(png_ptr, info_ptr), (int)png_get_image_height(png_ptr, info_ptr), req_w, req_h);
break;
}
- if (info_ptr->pixel_depth != 8)
+ if (png_get_bit_depth(png_ptr, info_ptr) != 8)
{
- lprintf(__FILE__ ": selector image uses %ibpp, needed 8bpp\n", info_ptr->pixel_depth);
+ lprintf(__FILE__ ": selector image uses %ibpp, needed 8bpp\n", png_get_bit_depth(png_ptr, info_ptr));
break;
}
for (y1 = 0; y1 < req_h; y1++)
@@ -159,15 +159,15 @@ int readpng(void *dest, const char *fname, readpng_what what, int req_w, int req
{
int height, width, h;
unsigned char *dst = dest;
- if (info_ptr->pixel_depth != 24)
+ if (png_get_bit_depth(png_ptr, info_ptr) != 8)
{
- lprintf(__FILE__ ": image uses %ibpp, needed 24bpp\n", info_ptr->pixel_depth);
+ lprintf(__FILE__ ": image uses %ibpc, needed 8bpc\n", png_get_bit_depth(png_ptr, info_ptr));
break;
}
- height = info_ptr->height;
+ height = png_get_image_height(png_ptr, info_ptr);
if (height > req_h)
height = req_h;
- width = info_ptr->width;
+ width = png_get_image_width(png_ptr, info_ptr);
if (width > req_w)
width = req_w;