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:
@@ -812,7 +812,7 @@ dorecover(NHFILE *nhfp)
|
||||
}
|
||||
restoreinfo.mread_flags = 0;
|
||||
rewind_nhfile(nhfp); /* return to beginning of file */
|
||||
(void) validate(nhfp, (char *) 0);
|
||||
(void) validate(nhfp, (char *) 0, FALSE);
|
||||
get_plname_from_file(nhfp, gp.plname);
|
||||
|
||||
getlev(nhfp, 0, (xint8) 0);
|
||||
@@ -1456,7 +1456,7 @@ restore_menu(
|
||||
#endif /* SELECTSAVED */
|
||||
|
||||
int
|
||||
validate(NHFILE *nhfp, const char *name)
|
||||
validate(NHFILE *nhfp, const char *name, boolean without_waitsynch_perfile)
|
||||
{
|
||||
readLenType rlen = 0;
|
||||
struct savefile_info sfi;
|
||||
@@ -1465,6 +1465,8 @@ validate(NHFILE *nhfp, const char *name)
|
||||
|
||||
if (nhfp->structlevel)
|
||||
utdflags |= UTD_CHECKSIZES;
|
||||
if (without_waitsynch_perfile)
|
||||
utdflags |= UTD_WITHOUT_WAITSYNCH_PERFILE;
|
||||
if (!(reslt = uptodate(nhfp, name, utdflags)))
|
||||
return 1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user