expo: Move menu-item selection into a function
The current implementation supports a 'pointer' object which points to
the currently highlighted menu item. We want to support highlighting the
label of the menu item instead, e.g. with inverse video. In this case we
will need to 'unhighlight' the old item and highlight the new one.
As a first step, move the pointer logic into a function. This fixes a
bug where the item is hidden when it should not be.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/test/boot/expo.c b/test/boot/expo.c
index c0ef03b..453316e 100644
--- a/test/boot/expo.c
+++ b/test/boot/expo.c
@@ -378,7 +378,7 @@
ut_asserteq(-4, prev1->obj.dim.x);
ut_asserteq(menu->obj.dim.y + 32, prev1->obj.dim.y);
- ut_asserteq(false, prev1->obj.flags & SCENEOF_HIDE);
+ ut_asserteq(true, prev1->obj.flags & SCENEOF_HIDE);
expo_destroy(exp);