Permalink
Browse files

Fix loading PNGs on 64bit windows

  • Loading branch information...
1 parent 9db2962 commit 7539b3800c72551bffb811a975b2e110ae47e5a0 @jamesu committed Mar 17, 2013
Showing with 8 additions and 3 deletions.
  1. +8 −3 engine/source/graphics/bitmapPng.cc
@@ -91,13 +91,18 @@ static void pngFlushDataFn(png_structp /*png_ptr*/)
static png_voidp pngMallocFn(png_structp /*png_ptr*/, png_size_t size)
{
+#ifndef _WIN64
return FrameAllocator::alloc(size);
-// return (png_voidp)dMalloc(size);
+#else
+ return (png_voidp)dMalloc(size);
+#endif
}
-static void pngFreeFn(png_structp /*png_ptr*/, png_voidp /*mem*/)
+static void pngFreeFn(png_structp /*png_ptr*/, png_voidp mem)
{
-// dFree(mem);
+#ifdef _WIN64
+ dFree(mem);
+#endif
}

0 comments on commit 7539b38

Please sign in to comment.