add option idlecheckpoint
New experimental option This requires platform support to be useful. Currently an implementation for Windows TTY console is included. A Unix TTY implementation should be achievable I would think, but I haven't pursued that, at least not yet (contributions welcome). I'm not sure whether Qt or X11 interfaces offer a similar timeout capability.. How it works: When idlecheckpoint in on, if the wait for a new input is idle for 10 seconds (length of time to waite is controlled by IDLECHECKPOINT_WAIT_TIME #define in hack.h), save_currentstate() is called to bring everything up-to-date should a hangup or crash occur. The input wait then continues/resumes. The save_currentstate() call is only executed once per input request.
This commit is contained in:
@@ -681,6 +681,16 @@ typedef unsigned char uchar;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* experimential; if the platform/window-port supports it; when the game has
|
||||
* started to wait for player input, and the wait lasts longer than
|
||||
* IDLECHECKPOINT_WAIT_TIME seconds (defined in hack.h or *conf.h), the game
|
||||
* will perform an update to the checkpoint file.
|
||||
* Currently has support in:
|
||||
* WIN32CON
|
||||
*/
|
||||
|
||||
/* #define IDLECHECKPOINT */
|
||||
|
||||
/* End of Section 4 */
|
||||
|
||||
#ifdef TTY_TILES_ESCCODES
|
||||
|
||||
Reference in New Issue
Block a user