mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
(svn r1076) Feature: Patch setting to autosave the game on exit
If you set autosave_on_exit = true in openttd.cfg, your game will be saved as exit.sav in the autosave folder and you won't be asked if you want to quit the game any more.
This commit is contained in:
@@ -1146,6 +1146,14 @@ bool EmergencySave()
|
||||
return true;
|
||||
}
|
||||
|
||||
void DoExitSave()
|
||||
{
|
||||
char buf[200];
|
||||
sprintf(buf, "%s%sexit.sav", _path.autosave_dir, PATHSEP);
|
||||
debug(buf);
|
||||
SaveOrLoad(buf, SL_SAVE);
|
||||
}
|
||||
|
||||
// not used right now, but could be used if extensions of savegames are garbled
|
||||
/*int GetSavegameType(char *file)
|
||||
{
|
||||
|
Reference in New Issue
Block a user