diff options
Diffstat (limited to '')
-rw-r--r-- | ui.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ui.c b/ui.c index d6f79c2..b3f3b09 100644 --- a/ui.c +++ b/ui.c @@ -960,7 +960,8 @@ void uiRead(void) { static const time_t Signatures[] = { 0x6C72696774616301, // no heat, unread, unreadWarm - 0x6C72696774616302, + 0x6C72696774616302, // no self.pos + 0x6C72696774616303, }; static size_t signatureVersion(time_t signature) { @@ -981,7 +982,8 @@ int uiSave(const char *name) { FILE *file = dataOpen(name, "w"); if (!file) return -1; - if (writeTime(file, Signatures[1])) return -1; + if (writeTime(file, Signatures[2])) return -1; + if (writeTime(file, self.pos)) return -1; for (uint num = 0; num < windows.len; ++num) { const struct Window *window = windows.ptrs[num]; if (writeString(file, idNames[window->id])) return -1; @@ -1032,6 +1034,10 @@ void uiLoad(const char *name) { } size_t version = signatureVersion(signature); + if (version > 1) { + self.pos = readTime(file); + } + char *buf = NULL; size_t cap = 0; while (0 < readString(file, &buf, &cap)) { |