Make uninitialization sequence more consistent across the editor code. It's

always like this now:
  ExtUninit -> (writesetup, misc.)
  uninitengine -> (uninitsystem -> (uninit timers, mouse, ...))
  exit()
Some paths still lead to a plain exit(), like failures in cache1d.c or mdsprite.c

git-svn-id: https://svn.eduke32.com/eduke32@2022 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2011-09-15 17:03:29 +00:00
parent 25d64ceaca
commit 9fd471a56a
3 changed files with 9 additions and 14 deletions

View file

@ -760,12 +760,10 @@ CANCEL:
}
// clearfilenames();
ExtUnInit();
// uninitengine();
uninitsystem();
// clearfilenames();
uninitengine();
// not reached...
// Bprintf("Memory status: %d(%d) bytes\n",cachesize,artsize);
// Bprintf("%s\n",kensig);
return(0);
@ -3964,7 +3962,8 @@ end_yax: ;
{
message("out of memory!");
ExtUnInit();
uninitsystem();
// clearfilenames();
uninitengine();
exit(1);
}
@ -6776,10 +6775,8 @@ CANCEL:
ExtUnInit();
// clearfilenames();
uninittimer();
uninitinput();
// uninitengine();
uninitsystem();
uninitengine();
exit(0);
}
@ -6814,10 +6811,8 @@ CANCEL:
{
initprintf("%d * %d not supported in this graphics mode\n",xdim,ydim);
ExtUnInit();
uninitinput();
uninittimer();
uninitsystem();
// clearfilenames();
uninitengine();
exit(1);
}

View file

@ -374,7 +374,6 @@ int32_t initsystem(void)
void uninitsystem(void)
{
uninitinput();
uninitmouse();
uninittimer();
if (appicon)

View file

@ -8765,8 +8765,9 @@ int32_t ExtPreInit(int32_t argc,const char **argv)
static int32_t osdcmd_quit(const osdfuncparm_t *parm)
{
UNREFERENCED_PARAMETER(parm);
clearfilenames();
ExtUnInit();
// clearfilenames();
uninitengine();
exit(0);