Only request a palette slice, if we haven't already

This should - in theory - allow other plugins to just use `LEDPaletteTheme`,
without having many copies of the palette.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/389/head
Gergely Nagy 8 years ago
parent 7b8ae3c9c0
commit 34c5297875

@ -33,6 +33,7 @@ void
LEDPaletteTheme::begin (void) { LEDPaletteTheme::begin (void) {
USE_PLUGINS (&::EEPROMSettings); USE_PLUGINS (&::EEPROMSettings);
if (!paletteBase)
paletteBase = ::EEPROMSettings.requestSlice (16 * sizeof (cRGB)); paletteBase = ::EEPROMSettings.requestSlice (16 * sizeof (cRGB));
} }

Loading…
Cancel
Save