expo: Adjust how menu items are highlighted
At present when the user moves to a new menu item, the menu code
handles this immediately. This means it is not possible to use an expo
action to effect the same change.
Update this so that EXPOACT_POINT_ITEM is handled in cedit_do_action().
Expand the test to cover this.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/boot/bootflow_menu.c b/boot/bootflow_menu.c
index 268c93a..f9ebc52 100644
--- a/boot/bootflow_menu.c
+++ b/boot/bootflow_menu.c
@@ -180,6 +180,7 @@
{
struct bootflow *sel_bflow;
struct udevice *dev;
+ struct scene *scn;
struct expo *exp;
uint sel_id;
bool done;
@@ -209,6 +210,9 @@
ret = expo_set_scene_id(exp, MAIN);
if (ret)
return log_msg_ret("scn", ret);
+ scn = expo_lookup_scene_id(exp, MAIN);
+ if (!scn)
+ return log_msg_ret("scn", -ENOENT);
if (text_mode)
expo_set_text_mode(exp, text_mode);
@@ -224,6 +228,12 @@
sel_id = act.select.id;
done = true;
break;
+ case EXPOACT_POINT_ITEM:
+ ret = scene_menu_select_item(scn,
+ OBJ_MENU, act.select.id);
+ if (ret)
+ return log_msg_ret("bmp", ret);
+ break;
case EXPOACT_QUIT:
return -EPIPE;
default: