- call SDL_Quit() from main() instead of atexit()

This should help with crash reporting during SDL shutdown
This commit is contained in:
alexey.lysiuk 2019-10-11 11:56:38 +03:00 committed by drfrag
parent a5d3be2569
commit b5d2cc4778

View file

@ -174,7 +174,6 @@ int main (int argc, char **argv)
fprintf (stderr, "Could not initialize SDL:\n%s\n", SDL_GetError());
return -1;
}
atexit (SDL_Quit); // This one should NOT be in the engine's list of exit handlers!
printf("\n");
@ -196,5 +195,10 @@ int main (int argc, char **argv)
}
I_StartupJoysticks();
return D_DoomMain ();
const int result = D_DoomMain();
SDL_Quit();
return result;
}