summaryrefslogtreecommitdiff
path: root/src/sv_init.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/sv_init.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/sv_init.c')
-rw-r--r--src/sv_init.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sv_init.c b/src/sv_init.c
index fbe7740..033b3dd 100644
--- a/src/sv_init.c
+++ b/src/sv_init.c
@@ -149,6 +149,9 @@ static void SV_SpawnServer( cm_t *cm, const char *server, const char *spawnpoint
// map initialization
sv.state = ss_loading;
+ X86_PUSH_FPCW;
+ X86_SINGLE_FPCW;
+
// load and spawn all other entities
ge->SpawnEntities ( sv.name, cm->cache->entitystring, spawnpoint );
@@ -156,6 +159,8 @@ static void SV_SpawnServer( cm_t *cm, const char *server, const char *spawnpoint
ge->RunFrame ();
ge->RunFrame ();
+ X86_POP_FPCW;
+
// make sure maxclients string is correct
sprintf( sv.configstrings[CS_MAXCLIENTS], "%d", sv_maxclients->integer );