diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2022-01-23 09:31:35 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-23 09:31:35 +0100 |
commit | ce42ab238ac5a16c32058c4b4564b7fefeaf8e07 (patch) | |
tree | 6f49b0c4444b8ea7f39b3e030389c700d3d8e0a2 /core/io/image.cpp | |
parent | 2f277994d2616e520b28d84c207abf040af1b48f (diff) | |
parent | b1b20f5f9103e2842c20a96c54d00c8572657b1a (diff) |
Merge pull request #56931 from lyuma/etcpak_po2
Enforce mult-of-4 requirements on etcpak input.
Diffstat (limited to 'core/io/image.cpp')
-rw-r--r-- | core/io/image.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/core/io/image.cpp b/core/io/image.cpp index 7956d0bad7..9df2b6835c 100644 --- a/core/io/image.cpp +++ b/core/io/image.cpp @@ -1434,12 +1434,11 @@ int Image::_get_dst_image_size(int p_width, int p_height, Format p_format, int & } // Set mipmap size. - // It might be necessary to put this after the minimum mipmap size check because of the possible occurrence of "1 >> 1". if (r_mm_width) { - *r_mm_width = bw >> 1; + *r_mm_width = w; } if (r_mm_height) { - *r_mm_height = bh >> 1; + *r_mm_height = h; } // Reach target mipmap. |