Stop writing gamedata/config/profiles in I_Error

This commit is contained in:
Sally Coolatta 2024-05-12 14:51:03 -04:00
parent df28169031
commit caf6231fed

View file

@ -1738,11 +1738,7 @@ void I_Error(const char *error, ...)
if (errorcount == 7) if (errorcount == 7)
SDL_Quit(); SDL_Quit();
if (errorcount == 8) if (errorcount == 8)
{ G_DirtyGameData();
M_SaveConfig(NULL);
G_DirtyGameData(); // done first in case an error is in G_SaveGameData
G_SaveGameData();
}
if (errorcount > 20) if (errorcount > 20)
{ {
va_start(argptr, error); va_start(argptr, error);
@ -1776,9 +1772,10 @@ void I_Error(const char *error, ...)
I_OutputMsg("\nI_Error(): %s\n", buffer); I_OutputMsg("\nI_Error(): %s\n", buffer);
// --- // ---
M_SaveConfig(NULL); // save game config, cvars.. // FUCK OFF, stop allocating memory to write entire gamedata & configs
G_DirtyGameData(); // done first in case an error is in G_SaveGameData // when the program needs to shut down ASAP and we already save
G_SaveGameData(); // Tails 12-08-2002 // these all the time! Just set the dirty bit and GET OUT!
G_DirtyGameData();
// Shutdown. Here might be other errors. // Shutdown. Here might be other errors.