- 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
parent 3a54b10697
commit 08a66abde9

View file

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