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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user