expo: Provide a way to position things relative to display
It is often necessary to centre objects within the display area. Add a
special position value to indicate this.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/boot/scene.c b/boot/scene.c
index 237f2bc..fa8f540 100644
--- a/boot/scene.c
+++ b/boot/scene.c
@@ -364,6 +364,11 @@
{
int width, height;
+ if (bbox->x1 == SCENEOB_DISPLAY_MAX)
+ bbox->x1 = xsize ?: 1280;
+ if (bbox->y1 == SCENEOB_DISPLAY_MAX)
+ bbox->y1 = ysize ?: 1024;
+
width = bbox->x1 - bbox->x0;
height = bbox->y1 - bbox->y0;