Add 64-bit versions of core power of 2 functions

This commit is contained in:
Aaron Franke 2025-05-19 09:53:53 -07:00
parent 64b09905c7
commit f6f1df7d73
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF
25 changed files with 161 additions and 124 deletions

View file

@ -1115,8 +1115,8 @@ bool Image::is_size_po2() const {
void Image::resize_to_po2(bool p_square, Interpolation p_interpolation) {
ERR_FAIL_COND_MSG(is_compressed(), "Cannot resize in compressed image formats.");
int w = next_power_of_2(width);
int h = next_power_of_2(height);
int w = next_power_of_2((uint32_t)width);
int h = next_power_of_2((uint32_t)height);
if (p_square) {
w = h = MAX(w, h);
}