summaryrefslogtreecommitdiff
path: root/src/common.c
diff options
context:
space:
mode:
authorAndrey Nazarov <skuller@skuller.net>2011-02-06 23:40:20 +0300
committerAndrey Nazarov <skuller@skuller.net>2011-02-07 15:27:21 +0300
commit06d6c024cde24f42d0980725b9e1d50713af646e (patch)
treeaaacdfa9b266c598255789febad11446686e5ee9 /src/common.c
parent9176271b895c4e71d7e383cb8655a7b545b73b33 (diff)
Rework the way FPU issues are handled on i386.
Kill Sys_FixFPCW. Instead implement inline macros that wrap around critical sections of code (pmove and game library calls) and push/pop FPU control word dynamically.
Diffstat (limited to 'src/common.c')
-rw-r--r--src/common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/common.c b/src/common.c
index 84e144c..086a6b9 100644
--- a/src/common.c
+++ b/src/common.c
@@ -38,6 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "q_field.h"
#include "prompt.h"
#include "io_sleep.h"
+#include "fpu.h"
#include <setjmp.h>
#if USE_ZLIB
#include <zlib.h>
@@ -472,6 +473,8 @@ void Com_Error( error_type_t code, const char *fmt, ... ) {
// abort any console redirects
Com_AbortRedirect();
+
+ X86_POP_FPCW;
if( code == ERR_DISCONNECT || code == ERR_SILENT ) {
Com_WPrintf( "%s\n", com_errorMsg );
@@ -1832,6 +1835,8 @@ void Qcommon_Init( int argc, char **argv ) {
Com_SetLastError( NULL );
+ X86_SetFPCW();
+
// prepare enough of the subsystems to handle
// cvar and command buffer management
Z_Init();