From 2cf75bf008e851831aa8f70ae47be5f980686244 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Fri, 23 Oct 2020 12:07:53 -0400 Subject: [PATCH] fire: exit out of the plugin with both PLA_EXIT and PLA_CANCEL Change-Id: I553fc5d02b7ee7004d791ba40cbd655f98c88f19 --- apps/plugins/fire.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c index 8873642f3c..fe76cac822 100644 --- a/apps/plugins/fire.c +++ b/apps/plugins/fire.c @@ -55,6 +55,7 @@ const struct button_mapping* plugin_contexts[]= { }; #define FIRE_QUIT PLA_CANCEL +#define FIRE_QUIT2 PLA_EXIT #define FIRE_SWITCH_FLAMES_TYPE PLA_LEFT #define FIRE_SWITCH_FLAMES_MOVING PLA_RIGHT @@ -176,7 +177,7 @@ static inline void fire_convolve(struct fire* fire) break; case 1: - mult -= 2; + mult -= 2; do{ pixel_value = ptr[FIRE_WIDTH-1] /* fire[y+1][x-1] */ + ptr[FIRE_WIDTH] /* fire[y+1][x] */ @@ -330,6 +331,7 @@ int main(void) switch(action){ case FIRE_QUIT: + case FIRE_QUIT2: cleanup(NULL); return PLUGIN_OK;