Splits saveslot_t/savesettings_t into a stable, version-independent in-memory struct (save/slot/, save/settings/) and a separate frozen per-schema-version struct (saveslotver1_t/savesettingsver1_t) used only for JSON serialization, converted between manually. Every write now stamps a "version" field (SAVE_SLOT_CURRENT/SAVE_SETTINGS_CURRENT), and every read requires it to match exactly, rejecting anything else - laying the groundwork for a real migration path instead of silently misreading old/incompatible save data.
16 lines
313 B
C
16 lines
313 B
C
/**
|
|
* Copyright (c) 2026 Dominic Masters
|
|
*
|
|
* This software is released under the MIT License.
|
|
* https://opensource.org/licenses/MIT
|
|
*/
|
|
|
|
#pragma once
|
|
#include "time/timeepoch.h"
|
|
#include "save/savedevice.h"
|
|
#include "yyjson.h"
|
|
|
|
#define SAVE_SETTINGS_VER_1 1
|
|
|
|
#define SAVE_SETTINGS_CURRENT SAVE_SETTINGS_VER_1
|