From d62dfd87f96f22c7639be1f170418ac13bcfabcf Mon Sep 17 00:00:00 2001 From: Zack Middleton Date: Mon, 12 Jan 2015 16:31:48 -0600 Subject: [PATCH] Set float rounding mode on non-Windows platforms Sys_SetFloatEnv in sys_unix.c existed but was not called. It sets the rounding mode to "to nearest" which is the default on Linux. Might be required on other platforms, I don't know. --- code/sys/sys_unix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/sys/sys_unix.c b/code/sys/sys_unix.c index 98e89dd0..87c1d6ef 100644 --- a/code/sys/sys_unix.c +++ b/code/sys/sys_unix.c @@ -816,6 +816,8 @@ void Sys_PlatformInit( void ) signal( SIGIOT, Sys_SigHandler ); signal( SIGBUS, Sys_SigHandler ); + Sys_SetFloatEnv(); + stdinIsATTY = isatty( STDIN_FILENO ) && !( term && ( !strcmp( term, "raw" ) || !strcmp( term, "dumb" ) ) ); }