Previously we requested a slice in `onSetup()`, but this had a major, problematic implication: if we went from a sketch with `EEPROM-Keymap`, but withot `LED-Palette-Theme` enabled to one with it, the EEPROM layout was not compatible, no matter what the order of plugins in `KALEIDOSCOPE_INIT_PLUGINS` were. This happened because `EEPROM-Keymap` requested space *after* `onSetup()` already ran. To fix this issue, request a slice in `.reserveThemes`, only if we didn't request a slice yet. This way the EEPROM layout is decided by the order of initialization in `setup()`, and we do not sneakily steal a slice in `onSetup()`. This is required to address keyboardio/Chrysalis#270. Signed-off-by: Gergely Nagy <algernon@keyboard.io>pull/557/head
parent
0cdfbcbc64
commit
8a4f3a7fb9
Loading…
Reference in new issue