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

View file

@ -374,7 +374,6 @@ int32_t initsystem(void)
void uninitsystem(void) void uninitsystem(void)
{ {
uninitinput(); uninitinput();
uninitmouse();
uninittimer(); uninittimer();
if (appicon) 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) static int32_t osdcmd_quit(const osdfuncparm_t *parm)
{ {
UNREFERENCED_PARAMETER(parm); UNREFERENCED_PARAMETER(parm);
clearfilenames();
ExtUnInit(); ExtUnInit();
// clearfilenames();
uninitengine(); uninitengine();
exit(0); exit(0);