diff options
Diffstat (limited to 'apps/plugins/demystify.c')
-rw-r--r-- | apps/plugins/demystify.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/plugins/demystify.c b/apps/plugins/demystify.c index 1ea9806a7b..3164eefb23 100644 --- a/apps/plugins/demystify.c +++ b/apps/plugins/demystify.c | |||
@@ -52,7 +52,8 @@ const struct button_mapping *plugin_contexts[] | |||
52 | remote_directions | 52 | remote_directions |
53 | #endif | 53 | #endif |
54 | }; | 54 | }; |
55 | 55 | #define NB_ACTION_CONTEXTS \ | |
56 | sizeof(plugin_contexts)/sizeof(struct button_mapping*) | ||
56 | #ifdef HAVE_LCD_COLOR | 57 | #ifdef HAVE_LCD_COLOR |
57 | struct line_color | 58 | struct line_color |
58 | { | 59 | { |
@@ -380,8 +381,8 @@ int plugin_main(void) | |||
380 | rb->yield(); | 381 | rb->yield(); |
381 | else | 382 | else |
382 | rb->sleep(sleep_time); | 383 | rb->sleep(sleep_time); |
383 | 384 | action = pluginlib_getaction(rb, TIMEOUT_NOBLOCK, | |
384 | action = pluginlib_getaction(rb, TIMEOUT_NOBLOCK, plugin_contexts, 3); | 385 | plugin_contexts, NB_ACTION_CONTEXTS); |
385 | switch(action) | 386 | switch(action) |
386 | { | 387 | { |
387 | case DEMYSTIFY_QUIT: | 388 | case DEMYSTIFY_QUIT: |