summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/action.c2
-rw-r--r--apps/action.h1
-rw-r--r--apps/plugins/lib/pluginlib_actions.c12
-rw-r--r--apps/plugins/pictureflow/pictureflow.c13
4 files changed, 16 insertions, 12 deletions
diff --git a/apps/action.c b/apps/action.c
index 21198889d2..5810003744 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -197,7 +197,7 @@ static int get_action_worker(int context, int timeout,
if (button & BUTTON_REMOTE)
context |= CONTEXT_REMOTE;
#endif
- if ((context & CONTEXT_CUSTOM) && get_context_map)
+ if ((context & CONTEXT_PLUGIN) && get_context_map)
items = get_context_map(context);
else
items = get_context_mapping(context);
diff --git a/apps/action.h b/apps/action.h
index 9869fb30b1..616fad57e9 100644
--- a/apps/action.h
+++ b/apps/action.h
@@ -30,6 +30,7 @@
#define CONTEXT_REMOTE 0x80000000 /* | this against another context to get remote buttons for that context */
#define CONTEXT_CUSTOM 0x40000000 /* | this against anything to get your context number */
#define CONTEXT_CUSTOM2 0x20000000 /* as above */
+#define CONTEXT_PLUGIN 0x10000000 /* for plugins using get_custom_action */
#define LAST_ITEM_IN_LIST { CONTEXT_STOPSEARCHING, BUTTON_NONE, BUTTON_NONE }
#define LAST_ITEM_IN_LIST__NEXTLIST(a) { a, BUTTON_NONE, BUTTON_NONE }
diff --git a/apps/plugins/lib/pluginlib_actions.c b/apps/plugins/lib/pluginlib_actions.c
index 550cd56d48..e870c79b9c 100644
--- a/apps/plugins/lib/pluginlib_actions.c
+++ b/apps/plugins/lib/pluginlib_actions.c
@@ -71,7 +71,7 @@ const struct button_mapping remote_directions[] =
#else
#error pluginlib_actions: Unsupported remote keypad
#endif
- {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
+ {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE}
};
#endif /* HAVE_REMOTE_LCD */
@@ -174,7 +174,7 @@ const struct button_mapping generic_directions[] =
#else
#error pluginlib_actions: Unsupported keypad
#endif
- {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
+ {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE}
};
const struct button_mapping generic_left_right_fire[] =
@@ -296,7 +296,7 @@ const struct button_mapping generic_left_right_fire[] =
#else
#error pluginlib_actions: Unsupported keypad
#endif
- {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
+ {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE}
};
/* these were taken from the bubbles plugin, so may need tweaking */
@@ -457,7 +457,7 @@ const struct button_mapping generic_actions[] =
#else
#error pluginlib_actions: Unsupported keypad
#endif
- {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
+ {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE}
};
const struct button_mapping generic_increase_decrease[] =
@@ -537,7 +537,7 @@ const struct button_mapping generic_increase_decrease[] =
#else
#error pluginlib_actions: Unsupported keypad
#endif
- {CONTEXT_CUSTOM,BUTTON_NONE,BUTTON_NONE}
+ {CONTEXT_PLUGIN,BUTTON_NONE,BUTTON_NONE}
};
static struct button_mapping **plugin_context_order;
@@ -560,5 +560,5 @@ int pluginlib_getaction(int timeout,
plugin_context_order = (struct button_mapping **)plugin_contexts;
plugin_context_count = count;
last_context = 0;
- return rb->get_custom_action(CONTEXT_CUSTOM,timeout,get_context_map);
+ return rb->get_custom_action(CONTEXT_PLUGIN,timeout,get_context_map);
}
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index a7a4205fa2..de9859897c 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -70,6 +70,10 @@ const struct button_mapping pf_context_album_scroll[] =
{PF_PREV_REPEAT, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_NONE},
{PF_NEXT, BUTTON_RIGHT, BUTTON_NONE},
{PF_NEXT_REPEAT, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_NONE},
+ {ACTION_NONE, BUTTON_LEFT|BUTTON_REL, BUTTON_LEFT},
+ {ACTION_NONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT},
+ {ACTION_NONE, BUTTON_LEFT|BUTTON_REPEAT, BUTTON_LEFT},
+ {ACTION_NONE, BUTTON_RIGHT|BUTTON_REPEAT, BUTTON_RIGHT},
#endif
#if CONFIG_KEYPAD == ONDIO_PAD
{PF_SELECT, BUTTON_UP|BUTTON_REL, BUTTON_UP},
@@ -77,9 +81,8 @@ const struct button_mapping pf_context_album_scroll[] =
{ACTION_NONE, BUTTON_UP, BUTTON_NONE},
{ACTION_NONE, BUTTON_DOWN, BUTTON_NONE},
{ACTION_NONE, BUTTON_DOWN|BUTTON_REPEAT, BUTTON_NONE},
- {ACTION_NONE, BUTTON_RIGHT|BUTTON_REL, BUTTON_RIGHT},
#endif
- LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_CUSTOM|1)
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_PLUGIN|1)
};
#endif /* !defined(HAVE_SCROLLWHEEL) */
@@ -132,7 +135,7 @@ const struct button_mapping pf_context_buttons[] =
#if CONFIG_KEYPAD == IAUDIO_M3_PAD
LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD|CONTEXT_REMOTE)
#else
- LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_STD)
+ LAST_ITEM_IN_LIST__NEXTLIST(CONTEXT_TREE)
#endif
};
const struct button_mapping *pf_contexts[] =
@@ -681,7 +684,7 @@ const struct custom_format format_transposed = {
static const struct button_mapping* get_context_map(int context)
{
- return pf_contexts[context & ~CONTEXT_CUSTOM];
+ return pf_contexts[context & ~CONTEXT_PLUGIN];
}
/* Create the lookup table with the scaling values for the reflections */
@@ -2596,7 +2599,7 @@ int main(void)
rb->yield();
/*/ Handle buttons */
- button = rb->get_custom_action(CONTEXT_CUSTOM
+ button = rb->get_custom_action(CONTEXT_PLUGIN
#if !defined(HAVE_SCROLLWHEEL)
|(pf_state == pf_show_tracks ? 1 : 0)
#endif