summaryrefslogtreecommitdiff
path: root/saveload.c
diff options
context:
space:
mode:
Diffstat (limited to 'saveload.c')
-rw-r--r--saveload.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/saveload.c b/saveload.c
index e02693ba8..7a9f7ba29 100644
--- a/saveload.c
+++ b/saveload.c
@@ -1402,8 +1402,6 @@ static void* SaveFileToDisk(void *arg)
const SaveLoadFormat *fmt;
uint32 hdr[2];
- if (arg != NULL) OTTD_SendThreadMessage(MSG_OTTD_SAVETHREAD_START);
-
/* XXX - Setup setjmp error handler if an error occurs anywhere deep during
* loading/saving execute a longjmp() and continue execution here */
if (setjmp(_sl.excpt)) {
@@ -1536,10 +1534,12 @@ SaveOrLoadResult SaveOrLoad(const char *filename, int mode)
SlSaveChunks();
SlWriteFill(); // flush the save buffer
+ SaveFileStart();
if (_network_server ||
(save_thread = OTTDCreateThread(&SaveFileToDisk, (void*)"")) == NULL) {
DEBUG(misc, 1) ("[Sl] Cannot create savegame thread, reverting to single-threaded mode...");
SaveFileToDisk(NULL);
+ SaveFileDone();
}
} else { /* LOAD game */