pub const VERSION: u8 = 3;Expand description
Current record format version.
Version 1 held a 0..=100 brightness percentage that no game used. Version 2
replaced it with the [Brightness] step (the save byte of
[Brightness::to_byte]) and added the [ScreenOffset] bytes after the
checksum. Version 3 adds GAME_BYTES_LEN game-owned bytes after the
screen offset and brings those two offset bytes under the checksum.
Profile::decode reads versions 1 and 2 and gives every field they lack
its default (the picture options for version 1, zeroed game bytes for both);
Profile::encode writes version 3.
An executable built before version 3 refuses a version 3 record with
CodecError::UnsupportedVersion and falls back to its shipped defaults,
exactly as it does for a torn record. A record carries no way for older code
to skip a layout it does not know, so there is no partial load: keep a game
and its save on the same SDK, or accept a settings reset on rollback.