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 7 years ago
parent 7b8ae3c9c0
commit 34c5297875

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

Loading…
Cancel
Save