summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSolomon Peachy <pizza@shaftnet.org>2020-10-23 12:07:53 -0400
committerSolomon Peachy <pizza@shaftnet.org>2020-10-23 16:09:19 +0000
commit2cf75bf008e851831aa8f70ae47be5f980686244 (patch)
tree55839c2eec31914b3fd3aa540fb81c32a851d950
parent3a7a46d1c02ecc633d65035b9c536858c1fccc3a (diff)
downloadrockbox-2cf75bf008e851831aa8f70ae47be5f980686244.tar.gz
rockbox-2cf75bf008e851831aa8f70ae47be5f980686244.zip
fire: exit out of the plugin with both PLA_EXIT and PLA_CANCEL
Change-Id: I553fc5d02b7ee7004d791ba40cbd655f98c88f19
-rw-r--r--apps/plugins/fire.c4
1 files changed, 3 insertions, 1 deletions
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[]= {
55}; 55};
56 56
57#define FIRE_QUIT PLA_CANCEL 57#define FIRE_QUIT PLA_CANCEL
58#define FIRE_QUIT2 PLA_EXIT
58#define FIRE_SWITCH_FLAMES_TYPE PLA_LEFT 59#define FIRE_SWITCH_FLAMES_TYPE PLA_LEFT
59#define FIRE_SWITCH_FLAMES_MOVING PLA_RIGHT 60#define FIRE_SWITCH_FLAMES_MOVING PLA_RIGHT
60 61
@@ -176,7 +177,7 @@ static inline void fire_convolve(struct fire* fire)
176 break; 177 break;
177 178
178 case 1: 179 case 1:
179 mult -= 2; 180 mult -= 2;
180 do{ 181 do{
181 pixel_value = ptr[FIRE_WIDTH-1] /* fire[y+1][x-1] */ 182 pixel_value = ptr[FIRE_WIDTH-1] /* fire[y+1][x-1] */
182 + ptr[FIRE_WIDTH] /* fire[y+1][x] */ 183 + ptr[FIRE_WIDTH] /* fire[y+1][x] */
@@ -330,6 +331,7 @@ int main(void)
330 331
331 switch(action){ 332 switch(action){
332 case FIRE_QUIT: 333 case FIRE_QUIT:
334 case FIRE_QUIT2:
333 cleanup(NULL); 335 cleanup(NULL);
334 return PLUGIN_OK; 336 return PLUGIN_OK;
335 337