mirror of
https://github.com/Shpoike/Quakespasm.git
synced 2025-02-23 12:32:08 +00:00
don't write the config file if we are Sys_Error()ing
git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1564 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
parent
76a9d49c32
commit
499f88e52c
8 changed files with 12 additions and 21 deletions
|
@ -160,6 +160,7 @@ these patched libSDL binaries may help.
|
|||
<item> Fixed a crash (buffer overflow) with invalid vis data.
|
||||
<item> Fixed buttons crushing players in 64-bit builds.
|
||||
<item> Change controller movement to use cubic easing by default; added "joy_exponent_move" cvar.
|
||||
<item> config.cfg is no longer written in case of a Sys_Error.
|
||||
<item> Update the third-party libraries. Other fixes/cleanups.
|
||||
</itemize>
|
||||
</p>
|
||||
|
|
|
@ -302,7 +302,7 @@ void Host_WriteConfiguration (void)
|
|||
|
||||
// dedicated servers initialize the host but don't parse and set the
|
||||
// config.cfg cvars
|
||||
if (host_initialized && !isDedicated)
|
||||
if (host_initialized && !isDedicated && !host_parms->errstate)
|
||||
{
|
||||
f = fopen (va("%s/config.cfg", com_gamedir), "w");
|
||||
if (!f)
|
||||
|
@ -322,23 +322,6 @@ void Host_WriteConfiguration (void)
|
|||
//johnfitz
|
||||
|
||||
fclose (f);
|
||||
|
||||
//johnfitz -- also save fitzquake.rc
|
||||
#if 0
|
||||
f = fopen (va("%s/fitzquake.rc", GAMENAME), "w"); //always save in id1
|
||||
if (!f)
|
||||
{
|
||||
Con_Printf ("Couldn't write fitzquake.rc.\n");
|
||||
return;
|
||||
}
|
||||
|
||||
Cvar_WriteVariables (f);
|
||||
fprintf (f, "vid_restart\n");
|
||||
if (in_mlook.state & 1) fprintf (f, "+mlook\n");
|
||||
|
||||
fclose (f);
|
||||
#endif
|
||||
//johnfitz
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -108,6 +108,8 @@ int main(int argc, char *argv[])
|
|||
parms.argc = argc;
|
||||
parms.argv = argv;
|
||||
|
||||
parms.errstate = 0;
|
||||
|
||||
COM_InitArgv(parms.argc, parms.argv);
|
||||
|
||||
isDedicated = (COM_CheckParm("-dedicated") != 0);
|
||||
|
|
|
@ -203,6 +203,7 @@ typedef struct
|
|||
void *membase;
|
||||
int memsize;
|
||||
int numcpus;
|
||||
int errstate;
|
||||
} quakeparms_t;
|
||||
|
||||
#include "common.h"
|
||||
|
|
|
@ -375,14 +375,14 @@ void Sys_Error (const char *error, ...)
|
|||
va_list argptr;
|
||||
char text[1024];
|
||||
|
||||
fputs (errortxt1, stderr);
|
||||
|
||||
Host_Shutdown ();
|
||||
host_parms->errstate++;
|
||||
|
||||
va_start (argptr, error);
|
||||
q_vsnprintf (text, sizeof(text), error, argptr);
|
||||
va_end (argptr);
|
||||
|
||||
fputs (errortxt1, stderr);
|
||||
Host_Shutdown ();
|
||||
fputs (errortxt2, stderr);
|
||||
fputs (text, stderr);
|
||||
fputs ("\n\n", stderr);
|
||||
|
|
|
@ -298,6 +298,8 @@ void Sys_Error (const char *error, ...)
|
|||
char text[1024];
|
||||
DWORD dummy;
|
||||
|
||||
host_parms->errstate++;
|
||||
|
||||
va_start (argptr, error);
|
||||
q_vsnprintf (text, sizeof(text), error, argptr);
|
||||
va_end (argptr);
|
||||
|
|
|
@ -254,6 +254,7 @@ these patched libSDL binaries may help.
|
|||
<LI> Fixed a crash (buffer overflow) with invalid vis data.</LI>
|
||||
<LI> Fixed buttons crushing players in 64-bit builds.</LI>
|
||||
<LI> Change controller movement to use cubic easing by default; added "joy_exponent_move" cvar.</LI>
|
||||
<LI> config.cfg is no longer written in case of a Sys_Error.</LI>
|
||||
<LI> Update the third-party libraries. Other fixes/cleanups.</LI>
|
||||
</UL>
|
||||
</P>
|
||||
|
|
|
@ -295,6 +295,7 @@
|
|||
o Fixed buttons crushing players in 64-bit builds.
|
||||
o Change controller movement to use cubic easing by default; added
|
||||
"joy_exponent_move" cvar.
|
||||
o config.cfg is no longer written in case of a Sys_Error.
|
||||
o Update the third-party libraries. Other fixes/cleanups.
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue