summaryrefslogtreecommitdiff
path: root/saveload.c
diff options
context:
space:
mode:
authordominik <dominik@openttd.org>2004-12-13 22:10:12 +0000
committerdominik <dominik@openttd.org>2004-12-13 22:10:12 +0000
commit77e882c3bd01976039b01c1c662f2e61fc10f132 (patch)
tree4a420e366039274cda5a356049fa055e5d97bcbe /saveload.c
parent2b13b2d239c6ee0708e8ab417397c54ed6a11b54 (diff)
downloadopenttd-77e882c3bd01976039b01c1c662f2e61fc10f132.tar.xz
(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.
Diffstat (limited to 'saveload.c')
-rw-r--r--saveload.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/saveload.c b/saveload.c
index dda3eefc1..ffb6fd280 100644
--- a/saveload.c
+++ b/saveload.c
@@ -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)
{