diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/image.cpp | 4 | ||||
-rw-r--r-- | core/variant_op.cpp | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/core/image.cpp b/core/image.cpp index e2b56c51dc..3d85bdd345 100644 --- a/core/image.cpp +++ b/core/image.cpp @@ -1198,7 +1198,9 @@ void Image::expand_x2_hq2x() { if (current != FORMAT_RGBA8) convert(current); - if (used_mipmaps) { + // FIXME: This is likely meant to use "used_mipmaps" as defined above, but if we do, + // we end up with a regression: GH-22747 + if (mipmaps) { generate_mipmaps(); } } diff --git a/core/variant_op.cpp b/core/variant_op.cpp index 493f77bd07..f230f12b5d 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -3542,7 +3542,10 @@ void Variant::interpolate(const Variant &a, const Variant &b, float c, Variant & case INT: { int64_t va = a._data._int; int64_t vb = b._data._int; - r_dst = int((1.0 - c) * va + vb * c); + if (va != vb) + r_dst = int((1.0 - c) * va + vb * c); + else //avoid int casting issues + r_dst = a; } return; case REAL: { |