UltraRogue: add the autosave feature.
UltraRogue now automatically saves the game when SIGHUP or SIGTERM is received.
This commit is contained in:
parent
8c77aafa62
commit
6c46840eab
4 changed files with 62 additions and 0 deletions
|
|
@ -197,6 +197,8 @@ main(int argc, char *argv[])
|
|||
|
||||
food_left = (int) (food_left * scale);
|
||||
|
||||
md_onsignal_autosave();
|
||||
|
||||
/* Set up windows */
|
||||
|
||||
cw = newwin(LINES, COLS, 0, 0);
|
||||
|
|
@ -272,6 +274,12 @@ fatal(char *s)
|
|||
exit(100);
|
||||
}
|
||||
|
||||
void
|
||||
fatal_handler(int sig)
|
||||
{
|
||||
fatal("");
|
||||
}
|
||||
|
||||
/*
|
||||
rnd()
|
||||
Pick a very random number.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue