improve selectsave handling for Windows
If there were outdated savefiles encountered during startup, each individual one was getting a wait_synch that required a <return> even though a message window wasn't being used at that point. Allow suppression of the individual per-file wait_synch() calls on Windows, so that a single one can be done once the selectsave processing is overwith. This was a little messy because an indicator had to flow down through validate(), uptodate(), etc. There shouldn't be any change in how things behave on any non-Windows platforms.
This commit is contained in:
@@ -34,44 +34,6 @@ static struct stat hbuf;
|
||||
static int eraseoldlocks(void);
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
int
|
||||
uptodate(int fd)
|
||||
{
|
||||
#ifdef WANT_GETHDATE
|
||||
if(fstat(fd, &buf)) {
|
||||
pline("Cannot get status of saved level? ");
|
||||
return(0);
|
||||
}
|
||||
if(buf.st_mtime < hbuf.st_mtime) {
|
||||
pline("Saved level is out of date. ");
|
||||
return(0);
|
||||
}
|
||||
#else
|
||||
#if (defined(MICRO)) && !defined(NO_FSTAT)
|
||||
if(fstat(fd, &buf)) {
|
||||
if(gm.moves > 1) pline("Cannot get status of saved level? ");
|
||||
else pline("Cannot get status of saved game.");
|
||||
return(0);
|
||||
}
|
||||
if(comp_times(buf.st_mtime)) {
|
||||
if(gm.moves > 1) pline("Saved level is out of date.");
|
||||
else pline("Saved game is out of date. ");
|
||||
/* This problem occurs enough times we need to give the player
|
||||
* some more information about what causes it, and how to fix.
|
||||
*/
|
||||
#ifdef MSDOS
|
||||
pline("Make sure that your system's date and time are correct.");
|
||||
pline("They must be more current than NetHack.EXE's date/time stamp.");
|
||||
#endif /* MSDOS */
|
||||
return(0);
|
||||
}
|
||||
#endif /* MICRO */
|
||||
#endif /* WANT_GETHDATE */
|
||||
return(1);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(PC_LOCKING)
|
||||
#if !defined(SELF_RECOVER)
|
||||
static int
|
||||
|
||||
Reference in New Issue
Block a user