From 676724ee5e0283cbb879f45e1e88383cf821abd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Fri, 19 Jun 2026 22:54:31 +0200 Subject: [PATCH] Libretro buildfix submitted by boardsofcanada Don't actually understand how this is an issue, but it seems like a fine change anyway. --- Common/Math/SIMDHeaders.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Common/Math/SIMDHeaders.h b/Common/Math/SIMDHeaders.h index c7d11e2886..9dc9a90f83 100644 --- a/Common/Math/SIMDHeaders.h +++ b/Common/Math/SIMDHeaders.h @@ -11,6 +11,7 @@ #include "stdint.h" #include +#include #ifdef __clang__ // Weird how you can't just use #pragma in a macro. @@ -296,8 +297,8 @@ inline __m128 clean_nan_inf_sse(__m128 x) { return _mm_and_ps(x, valid_mask); #else // 1. Establish your maximum and minimum finite bounds - __m128 max_finite = _mm_set1_ps(3.40282347e+38f); // FLT_MAX - __m128 min_finite = _mm_set1_ps(-3.40282347e+38f); // -FLT_MAX + __m128 max_finite = _mm_set1_ps(FLT_MAX); + __m128 min_finite = _mm_set1_ps(-FLT_MAX); // 2. Clamp the upper bound. // If x is +Inf, min(Inf, FLT_MAX) -> FLT_MAX. // If x is NaN, it outputs the second operand -> max_finite (FLT_MAX).