summaryrefslogtreecommitdiff
path: root/apps/plugins/fire.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/fire.c')
-rw-r--r--apps/plugins/fire.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/apps/plugins/fire.c b/apps/plugins/fire.c
index fff39b38c9..e1362dc900 100644
--- a/apps/plugins/fire.c
+++ b/apps/plugins/fire.c
@@ -51,20 +51,27 @@ GREY_INFO_STRUCT
51 51
52/* Key assignement */ 52/* Key assignement */
53const struct button_mapping* plugin_contexts[]= { 53const struct button_mapping* plugin_contexts[]= {
54 generic_increase_decrease, 54 pla_main_ctx,
55 generic_directions,
56#if defined(HAVE_REMOTE_LCD) 55#if defined(HAVE_REMOTE_LCD)
57 remote_directions, 56 pla_remote_ctx,
58#endif 57#endif
59 generic_actions
60}; 58};
61#define PLA_ARRAY_COUNT sizeof(plugin_contexts)/sizeof(plugin_contexts[0])
62 59
63#define FIRE_QUIT PLA_QUIT 60#define FIRE_QUIT PLA_CANCEL
64#define FIRE_SWITCH_FLAMES_TYPE PLA_LEFT 61#define FIRE_SWITCH_FLAMES_TYPE PLA_LEFT
65#define FIRE_SWITCH_FLAMES_MOVING PLA_RIGHT 62#define FIRE_SWITCH_FLAMES_MOVING PLA_RIGHT
66#define FIRE_INCREASE_MULT PLA_INC 63
67#define FIRE_DECREASE_MULT PLA_DEC 64#ifdef HAVE_SCROLLWHEEL
65#define FIRE_INCREASE_MULT PLA_SCROLL_FWD
66#define FIRE_INCREASE_MULT_REP PLA_SCROLL_FWD_REPEAT
67#define FIRE_DECREASE_MULT PLA_SCROLL_BACK
68#define FIRE_DECREASE_MULT_REP PLA_SCROLL_BACK_REPEAT
69#else
70#define FIRE_INCREASE_MULT PLA_UP
71#define FIRE_INCREASE_MULT_REP PLA_UP_REPEAT
72#define FIRE_DECREASE_MULT PLA_DOWN
73#define FIRE_DECREASE_MULT_REP PLA_DOWN_REPEAT
74#endif
68 75
69#define MIN_FLAME_VALUE 0 76#define MIN_FLAME_VALUE 0
70#define COOL_MAX (440/LCD_HEIGHT+2) 77#define COOL_MAX (440/LCD_HEIGHT+2)
@@ -319,7 +326,8 @@ int main(void)
319 fire_draw(&fire); 326 fire_draw(&fire);
320 rb->yield(); 327 rb->yield();
321 328
322 action = pluginlib_getaction(0, plugin_contexts, PLA_ARRAY_COUNT); 329 action = pluginlib_getaction(0, plugin_contexts,
330 ARRAYLEN(plugin_contexts));
323 331
324 switch(action){ 332 switch(action){
325 case FIRE_QUIT: 333 case FIRE_QUIT: