From ce60a7953c12611426c31da1d90a746b4fce2516 Mon Sep 17 00:00:00 2001 From: Sir Codalot Date: Sun, 16 Feb 2025 01:06:51 +0100 Subject: [PATCH] updated glRotatef in matrix.c When building for Dreamcast, glRotatef uses fsincos to get the sine and the cosine for the provided angle. However, fsincos expects degrees, but it was called with radians. The fix is not to convert to radians in the first place as glRotatef is already called with degrees. --- GL/matrix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GL/matrix.c b/GL/matrix.c index f71a624..29f980e 100644 --- a/GL/matrix.c +++ b/GL/matrix.c @@ -181,11 +181,11 @@ void APIENTRY glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) { 0.0f, 0.0f, 0.0f, 1.0f }; - float r = DEG2RAD * angle; #ifdef __DREAMCAST__ float s, c; - fsincos(r, &s, &c); + fsincos(angle, &s, &c); #else + float r = DEG2RAD * angle; float c = cosf(r); float s = sinf(r); #endif