diff options
author | Dirk Meyer <dinoex@FreeBSD.org> | 2010-03-30 11:22:14 +0000 |
---|---|---|
committer | Dirk Meyer <dinoex@FreeBSD.org> | 2010-03-30 11:22:14 +0000 |
commit | 7d91ac84259d29d162a42ccbc9a8d43c6469f05e (patch) | |
tree | 672ef3eceb48d1a064505f7b0469c9e9c568f710 /games/joequake | |
parent | 3519b8488b8d050b98944e722f1adeed9cbeea50 (diff) | |
download | ports-7d91ac84259d29d162a42ccbc9a8d43c6469f05e.tar.gz ports-7d91ac84259d29d162a42ccbc9a8d43c6469f05e.zip |
- fix build for png-1.4.1
Notes
Notes:
svn path=/head/; revision=251805
Diffstat (limited to 'games/joequake')
-rw-r--r-- | games/joequake/files/patch-image.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/games/joequake/files/patch-image.c b/games/joequake/files/patch-image.c index e5dce3ef01e5..ef4fede71ed2 100644 --- a/games/joequake/files/patch-image.c +++ b/games/joequake/files/patch-image.c @@ -1,5 +1,5 @@ ---- ./image.c.orig Sun Oct 16 22:47:00 2005 -+++ ./image.c Sat May 20 10:00:24 2006 +--- image.c.orig 2005-10-16 22:47:00.000000000 +0200 ++++ image.c 2010-03-30 11:54:39.000000000 +0200 @@ -422,6 +422,7 @@ buffer[i+2] = temp; } @@ -8,6 +8,15 @@ if (!COM_WriteFile(filename, buffer, size + 18)) retval = false; free (buffer); +@@ -533,7 +534,7 @@ + } + + if (colortype == PNG_COLOR_TYPE_GRAY && bitdepth < 8) +- png_set_gray_1_2_4_to_8 (png_ptr); ++ png_set_expand_gray_1_2_4_to_8 (png_ptr); + + if (png_get_valid(png_ptr, pnginfo, PNG_INFO_tRNS)) + png_set_tRNS_to_alpha (png_ptr); @@ -585,17 +586,14 @@ Image_WritePNG ============= @@ -27,7 +36,7 @@ width_sign = (width < 0) ? -1 : 1; width = abs(width); -@@ -816,15 +814,12 @@ +@@ -816,16 +814,13 @@ Image_WriteJPEG ============= */ @@ -39,8 +48,9 @@ FILE *fout; struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; -- -- Q_snprintfz (name, MAX_OSPATH, "%s/%s", com_basedir, filename); +- Q_snprintfz (name, MAX_OSPATH, "%s/%s", com_basedir, filename); +- if (!(fout = fopen(name, "wb"))) { + COM_CreatePath (name); |