]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
expo: Set up menu fully in bootflow_menu_start()
authorSimon Glass <sjg@chromium.org>
Fri, 2 May 2025 14:46:57 +0000 (08:46 -0600)
committerSimon Glass <sjg@chromium.org>
Fri, 30 May 2025 08:49:33 +0000 (09:49 +0100)
Apply the theme, calculate dimensions, highlight the menu and arrange
the scene correctly, so that everything is ready to go when the expo
is rendered.

Signed-off-by: Simon Glass <sjg@chromium.org>
boot/bootflow_menu.c

index 56a34ac8ed58b9d0701b98f3ffeee28ea58fa79f..43f074f19f5c3889173a13c226db540a6caa735d 100644 (file)
@@ -212,10 +212,6 @@ int bootflow_menu_add_all(struct expo *exp)
                        return log_msg_ret("bao", ret);
        }
 
-       ret = scene_arrange(scn);
-       if (ret)
-               return log_msg_ret("arr", ret);
-
        return 0;
 }
 
@@ -296,7 +292,9 @@ int bootflow_menu_setup(struct bootstd_priv *std, bool text_mode,
 int bootflow_menu_start(struct bootstd_priv *std, bool text_mode,
                        struct expo **expp)
 {
+       struct scene *scn;
        struct expo *exp;
+       uint scene_id;
        int ret;
 
        ret = bootflow_menu_setup(std, text_mode, &exp);
@@ -317,6 +315,18 @@ int bootflow_menu_start(struct bootstd_priv *std, bool text_mode,
        if (ret)
                return log_msg_ret("bmd", ret);
 
+       ret = expo_first_scene_id(exp);
+       if (ret < 0)
+               return log_msg_ret("scn", ret);
+       scene_id = ret;
+       scn = expo_lookup_scene_id(exp, scene_id);
+
+       scene_set_highlight_id(scn, OBJ_MENU);
+
+       ret = scene_arrange(scn);
+       if (ret)
+               return log_msg_ret("arr", ret);
+
        *expp = exp;
 
        return 0;