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:
nhmall
2023-09-22 15:14:53 -04:00
parent c868feb383
commit 14faa682c4
11 changed files with 41 additions and 61 deletions

View File

@@ -311,7 +311,8 @@ check_version(
) {
if (complain) {
pline("Version mismatch for file \"%s\".", filename);
display_nhwindow(WIN_MESSAGE, TRUE);
if (WIN_MESSAGE != WIN_ERR)
display_nhwindow(WIN_MESSAGE, TRUE);
}
return FALSE;
} else if (
@@ -358,14 +359,17 @@ uptodate(NHFILE *nhfp, const char *name, unsigned long utdflags)
if (rlen == 0) {
if (verbose) {
pline("File \"%s\" is empty?", name);
wait_synch();
if ((utdflags & UTD_WITHOUT_WAITSYNCH_PERFILE) == 0)
wait_synch();
}
return FALSE;
}
if (!check_version(&vers_info, name, verbose, utdflags)) {
if (verbose)
wait_synch();
if (verbose) {
if ((utdflags & UTD_WITHOUT_WAITSYNCH_PERFILE) == 0)
wait_synch();
}
return FALSE;
}
return TRUE;