Behebe das Problem, dass CL_Shutdown() rekursiv ein weiteres Mal

aufgerufen wird. Danke an caedes für das entgödeln.
This commit is contained in:
Yamagi Burmeister 2010-10-19 16:21:02 +00:00
parent 09c87ea0cc
commit ca1f64c016
4 changed files with 10 additions and 13 deletions

View file

@ -407,7 +407,7 @@ void CL_Userinfo_f (void)
*/
void CL_Snd_Restart_f (void)
{
S_Shutdown ();
S_Shutdown();
S_Init ();
CL_RegisterSounds ();
}
@ -827,7 +827,6 @@ void CL_Shutdown(void)
CDAudio_Shutdown ();
OGG_Stop();
S_Shutdown();
IN_Shutdown ();
VID_Shutdown();
}

View file

@ -220,16 +220,6 @@ void Com_Error (int code, char *fmt, ...)
void Com_Quit (void)
{
SV_Shutdown ("Server quit\n", false);
#ifndef DEDICATED_ONLY
CL_Shutdown ();
#endif
if (logfile)
{
fclose (logfile);
logfile = NULL;
}
Sys_Quit ();
}

View file

@ -60,6 +60,7 @@ static DIR *fdir;
qboolean stdin_active = true;
extern cvar_t *nostdout;
extern FILE *logfile;
static qboolean
CompareAttributes ( char *path, char *name, unsigned musthave, unsigned canthave )
@ -270,6 +271,13 @@ Sys_Quit ( void )
#ifndef DEDICATED_ONLY
CL_Shutdown();
#endif
if (logfile)
{
fclose (logfile);
logfile = NULL;
}
Qcommon_Shutdown();
fcntl( 0, F_SETFL, fcntl( 0, F_GETFL, 0 ) & ~FNDELAY );
exit( 0 );

View file

@ -317,7 +317,7 @@ VID_LoadRefresh ( char *name )
( ( IN_Update_fp = dlsym( reflib_library, "IN_Update" ) ) == NULL ) ||
( ( IN_Close_fp = dlsym( reflib_library, "IN_Close" ) ) == NULL ) )
{
Sys_Error( "No KBD functions in REF.\n" );
Sys_Error( "No keyboard input functions in REF.\n" );
}
IN_KeyboardInit_fp( Do_Key_Event );