diff options
-rw-r--r-- | emulators/openmsx/distinfo | 5 | ||||
-rw-r--r-- | emulators/openmsx/patches/patch-src_video_ScreenShotSaver.cc | 43 |
2 files changed, 46 insertions, 2 deletions
diff --git a/emulators/openmsx/distinfo b/emulators/openmsx/distinfo index ca2374f7a20..c56996d6203 100644 --- a/emulators/openmsx/distinfo +++ b/emulators/openmsx/distinfo @@ -1,6 +1,7 @@ -$NetBSD: distinfo,v 1.6 2007/05/19 01:24:26 xtraeme Exp $ +$NetBSD: distinfo,v 1.7 2011/06/20 09:28:06 wiz Exp $ SHA1 (openmsx-0.6.2.tar.gz) = b9e2f1bf13f193618f35c0fd6820c2bd44088870 RMD160 (openmsx-0.6.2.tar.gz) = b800499248ee43de8007042d4dd0a4523f464833 Size (openmsx-0.6.2.tar.gz) = 1934469 bytes -SHA1 (patch-aa) = 19ae367cb8337ac647f4a0ae69bfc8a4cf8da79b +SHA1 (patch-aa) = aadad14af76af2dc97dbb3f0ab4b1b5bda4be8c1 +SHA1 (patch-src_video_ScreenShotSaver.cc) = 84175620949c2f781565bdc5e2e864b24afd4549 diff --git a/emulators/openmsx/patches/patch-src_video_ScreenShotSaver.cc b/emulators/openmsx/patches/patch-src_video_ScreenShotSaver.cc new file mode 100644 index 00000000000..a1468c8ff3a --- /dev/null +++ b/emulators/openmsx/patches/patch-src_video_ScreenShotSaver.cc @@ -0,0 +1,43 @@ +$NetBSD: patch-src_video_ScreenShotSaver.cc,v 1.1 2011/06/20 09:28:06 wiz Exp $ + +Fix build with png-1.5. + +--- src/video/ScreenShotSaver.cc.orig 2007-04-14 21:25:30.000000000 +0000 ++++ src/video/ScreenShotSaver.cc +@@ -31,7 +31,7 @@ static bool IMG_SavePNG_RW(int width, in + // Couldn't allocate memory for PNG file + goto error; + } +- png_ptr->io_ptr = fp; ++ png_init_io(png_ptr, fp); + + // Allocate/initialize the image information data. REQUIRED + info_ptr = png_create_info_struct(png_ptr); +@@ -41,7 +41,7 @@ static bool IMG_SavePNG_RW(int width, in + } + + // Set error handling. +- if (setjmp(png_ptr->jmpbuf)) { ++ if (setjmp(png_jmpbuf(png_ptr))) { + // Error writing the PNG file + goto error; + } +@@ -78,18 +78,12 @@ static bool IMG_SavePNG_RW(int width, in + png_write_image(png_ptr, row_pointers); + png_write_end(png_ptr, info_ptr); + +- if (info_ptr->palette) { +- free(info_ptr->palette); +- } + png_destroy_write_struct(&png_ptr, &info_ptr); + + fclose(fp); + return true; + + error: +- if (info_ptr->palette) { +- free(info_ptr->palette); +- } + png_destroy_write_struct(&png_ptr, &info_ptr); + + fclose(fp); |