win32: hold .0 file open exclusively
-prevents problems with internal recover if second copy of game is started up with the same player name.
This commit is contained in:
@@ -647,6 +647,9 @@ E void FDECL(free_saved_games, (char**));
|
||||
#ifdef SELF_RECOVER
|
||||
E boolean NDECL(recover_savefile);
|
||||
#endif
|
||||
#ifdef HOLD_LOCKFILE_OPEN
|
||||
E void NDECL(really_close);
|
||||
#endif
|
||||
|
||||
/* ### fountain.c ### */
|
||||
|
||||
@@ -1236,9 +1239,6 @@ E char *FDECL(get_username, (int *));
|
||||
E void FDECL(nt_regularize, (char *));
|
||||
E int NDECL((*nt_kbhit));
|
||||
E void FDECL(Delay, (int));
|
||||
# if !defined(WIN_CE)
|
||||
E boolean FDECL(is_NetHack_process, (int));
|
||||
# endif /* !WIN_CE */
|
||||
# endif /* WIN32 */
|
||||
#endif /* MICRO || WIN32 */
|
||||
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#define PC_LOCKING /* Prevent overwrites of aborted or in-progress games */
|
||||
/* without first receiving confirmation. */
|
||||
|
||||
#define HOLD_LOCKFILE_OPEN /* Keep an exclusive lock on the .0 file */
|
||||
|
||||
#define SELF_RECOVER /* Allow the game itself to recover from an aborted game */
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user