game save ui completely locked while saving in progress

This commit is contained in:
minjaesong
2021-09-15 11:34:13 +09:00
parent 22190be6d8
commit ae29f7ebea
7 changed files with 33 additions and 14 deletions

View File

@@ -131,10 +131,11 @@ class GameSavingThread(val disk: VirtualDisk, val outFile: File, val ingame: Ter
}
}
Echo("Writing actors...")
// Write Actors //
actorsList.forEach {
actorsList.forEachIndexed { count, it ->
Echo("Writing actors... ${count+1}/${actorsList.size}")
val actorContent = EntryFile(WriteActor.encodeToByteArray64(it))
val actor = DiskEntry(it.referenceID.toLong(), 0, creation_t, time_t, actorContent)
addFile(disk, actor)
@@ -143,6 +144,8 @@ class GameSavingThread(val disk: VirtualDisk, val outFile: File, val ingame: Ter
}
Echo("Writing file to disk...")
disk.entries[0]!!.modificationDate = time_t
// entry zero MUST NOT be used to get lastPlayDate, but we'll update it anyway
// use entry -1 for that purpose!