Reset the map when switching to the effect

Since we keep the eventHandler on at all times, even when we are not active,
clear the map when switching to the layer. It's easier this way than trying to
turn the eventHandler off.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
pull/365/head
Gergely Nagy 8 years ago committed by Gergely Nagy
parent c01e7d864a
commit ebe4edcc1b

@ -39,6 +39,11 @@ namespace KaleidoscopePlugins {
LEDMode::begin ();
}
void
StalkerEffect::init (void) {
memset (map, 0, sizeof (map));
}
Key
StalkerEffect::eventHandlerHook (Key mappedKey, byte row, byte col, uint8_t keyState) {
if (row >= ROWS || col >= COLS)

@ -33,6 +33,7 @@ namespace KaleidoscopePlugins {
StalkerEffect (void);
virtual void begin (void) final;
virtual void init (void) final;
virtual void update (void) final;
static void configure (ColorComputer *colorComputer);

Loading…
Cancel
Save