summaryrefslogtreecommitdiffstats
path: root/apps/action.c
diff options
context:
space:
mode:
authorWilliam Wilgus <me.theuser@yahoo.com>2017-12-11 02:24:42 +0100
committerFranklin Wei <me@fwei.tk>2017-12-18 22:23:18 +0100
commit71e3f6c07727ec6784cf7f9cf01b5e2888b4522c (patch)
tree020ffa449ee762622d466e014877a5cf51fdabb3 /apps/action.c
parent786fbbfa20e106f9d19607d841e74116ee2b608a (diff)
downloadrockbox-71e3f6c07727ec6784cf7f9cf01b5e2888b4522c.tar.gz
rockbox-71e3f6c07727ec6784cf7f9cf01b5e2888b4522c.tar.bz2
rockbox-71e3f6c07727ec6784cf7f9cf01b5e2888b4522c.zip
Fix error with action subsystem and custom context mapping
I removed the mechanism to fall through to internally mapped contexts after plugin contexts were exhausted Change-Id: Id287248184fd67cb2a2242475296247ac86af807
Diffstat (limited to 'apps/action.c')
-rw-r--r--apps/action.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/apps/action.c b/apps/action.c
index 9b559cc0c2..9b665d22a9 100644
--- a/apps/action.c
+++ b/apps/action.c
@@ -591,7 +591,10 @@ static inline void action_code_lookup(action_last_t *last, action_cur_t *cur)
}
#endif
- cur->items = cur->get_context_map(context);
+ if ((context & CONTEXT_PLUGIN) && cur->get_context_map)
+ cur->items = cur->get_context_map(context);
+ else
+ cur->items = get_context_mapping(context);
if (cur->items != NULL)
{
@@ -854,15 +857,7 @@ static void init_act_cur(action_cur_t *cur,
cur->is_prebutton = false;
cur->items = NULL;
cur->timeout = timeout;
-
- if (get_context_map == NULL)/* standard mapping */
- {
- cur->get_context_map = get_context_mapping;
- }
- else /* user defined button mapping*/
- {
- cur->get_context_map = get_context_map;
- }
+ cur->get_context_map = get_context_map;
}
/*******************************************************