diff options
author | Maxim Moseychuk | 2018-06-04 00:07:32 +0300 |
---|---|---|
committer | Maxim Moseychuk | 2018-06-04 00:07:32 +0300 |
commit | b0fe3ada0ded3fc6ba012166b8b4fbc01d4898b2 (patch) | |
tree | ccdc8e6ce69229620c29f93a95a88951fca877ac /non_square_mipmaps.patch | |
parent | b12aaacc439f4d4d8c279b947f866031eb6e5bf2 (diff) | |
download | aur-b0fe3ada0ded3fc6ba012166b8b4fbc01d4898b2.tar.gz |
Fix export non-square minimaps
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=731486
Diffstat (limited to 'non_square_mipmaps.patch')
-rw-r--r-- | non_square_mipmaps.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/non_square_mipmaps.patch b/non_square_mipmaps.patch new file mode 100644 index 000000000000..c239a3403764 --- /dev/null +++ b/non_square_mipmaps.patch @@ -0,0 +1,23 @@ +Description: Fix size chain for non-square mipmaps +Author: Tony Houghton <h@realh.co.uk> +Forwarded: No +Last-Update: 2016-11-20 +Index: gimp-dds-3.0.1/mipmap.c +=================================================================== +--- gimp-dds-3.0.1.orig/mipmap.c ++++ gimp-dds-3.0.1/mipmap.c +@@ -143,11 +143,11 @@ unsigned int get_volume_mipmapped_size(i + int get_next_mipmap_dimensions(int *next_w, int *next_h, + int curr_w, int curr_h) + { +- if(curr_w == 1 || curr_h == 1) ++ if(curr_w == 1 && curr_h == 1) + return(0); + +- if(next_w) *next_w = curr_w >> 1; +- if(next_h) *next_h = curr_h >> 1; ++ if(next_w) *next_w = curr_w == 1 ? 1 : curr_w >> 1; ++ if(next_h) *next_h = curr_h == 1 ? 1 : curr_h >> 1; + + return(1); + } |