From 67d5e8dc16d6c8a483d45637f1bfda788647d157 Mon Sep 17 00:00:00 2001 From: UnknownShadow200 Date: Thu, 23 Jan 2025 19:44:21 +1100 Subject: [PATCH] Saturn: Fix frustum culling not working --- src/Vectors.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Vectors.c b/src/Vectors.c index 9dbf5a509..c69baab71 100644 --- a/src/Vectors.c +++ b/src/Vectors.c @@ -204,6 +204,11 @@ cc_bool FrustumCulling_SphereInFrustum(float x, float y, float z, float radius) d = frustumF.a * x + frustumF.b * y + frustumF.c * z + frustumF.d; if (d <= -radius) return false; /* Don't test NEAR plane, it's pointless */ + +#ifdef CC_BUILD_SATURN + /* Workaround a compiler bug causing the below statement to return 0 instead */ + __asm__( "!" ); +#endif return true; }