diff options
Diffstat (limited to 'sky/sky.cpp')
-rw-r--r-- | sky/sky.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sky/sky.cpp b/sky/sky.cpp index 55c6cb618f..e36076a41e 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -155,8 +155,16 @@ void SkyState::go() { if (introSkipped) _skyControl->restartGame(); + _lastSaveTime = _system->get_msecs(); + while (1) { delay(_systemVars.gameSpeed); + + if (_system->get_msecs() - _lastSaveTime > 5 * 60 * 1000) { + _lastSaveTime = _system->get_msecs(); + _skyControl->doAutoSave(); + } + if (_key_pressed == 63) { _key_pressed = 0; _skyControl->doControlPanel(); |