Merge branch 'i-error-got-damn-it' into 'master'

Stop writing gamedata/config/profiles in I_Error

See merge request KartKrew/Kart!2379
This commit is contained in:
Eidolon 2024-05-18 01:37:55 +00:00
commit c44790749d

View file

@ -1736,11 +1736,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);
@ -1774,9 +1770,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.