diff options
Diffstat (limited to 'apps/plugins/lua/rockaux.c')
-rw-r--r-- | apps/plugins/lua/rockaux.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/apps/plugins/lua/rockaux.c b/apps/plugins/lua/rockaux.c index 562d1654a7..734b6a8324 100644 --- a/apps/plugins/lua/rockaux.c +++ b/apps/plugins/lua/rockaux.c @@ -24,6 +24,7 @@ #include "plugin.h" #define _ROCKCONF_H_ /* Protect against unwanted include */ #include "lua.h" +#include "lib/pluginlib_actions.h" extern long strtol(const char *nptr, char **endptr, int base); @@ -164,3 +165,21 @@ int filetol(int fd, long *num) return retn; } +int get_plugin_action(int timeout, bool with_remote) +{ + static const struct button_mapping *m1[] = { pla_main_ctx }; + int btn; + +#ifndef HAVE_REMOTE_LCD + (void) with_remote; +#else + static const struct button_mapping *m2[] = { pla_main_ctx, pla_remote_ctx }; + + if (with_remote) + btn = pluginlib_getaction(timeout, m2, 2); + else +#endif + btn = pluginlib_getaction(timeout, m1, 1); + + return btn; +} |