expo: Store mouse pointer and size in expo

Store the mouse pointer image and its dimensions in the expo structure
when mouse support is enabled. This avoids repeatedly looking up the
image and calculating its size.

Use struct vid_size to store the mouse pointer dimensions.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-10-03 12:30:41 -06:00
parent e6f6d8a1c4
commit ef117db9c3
4 changed files with 66 additions and 6 deletions

View File

@@ -55,19 +55,27 @@ __maybe_unused static int bootflow_handle_menu(struct bootstd_priv *std,
if (ret)
return log_msg_ret("bhs", ret);
expo_enter_mode(exp);
ret = -ERESTART;
do {
if (ret == -ERESTART) {
ret = expo_arrange(exp);
if (ret)
if (ret) {
expo_exit_mode(exp);
return log_msg_ret("bha", ret);
}
ret = expo_render(exp);
if (ret)
if (ret) {
expo_exit_mode(exp);
return log_msg_ret("bhr", ret);
}
}
ret = bootflow_menu_poll(exp, &seq);
} while (ret == -EAGAIN || ret == -ERESTART || ret == -EREMCHG);
expo_exit_mode(exp);
if (ret == -EPIPE) {
printf("Nothing chosen\n");
std->cur_bootflow = NULL;