mouse: Update mouse_get_click() to use struct vid_pos

Change the API to use struct vid_pos instead of separate x/y pointers.

Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass
2025-10-03 06:41:11 -06:00
parent 6695d7c033
commit 00692afa1c
4 changed files with 23 additions and 28 deletions

View File

@@ -23,7 +23,7 @@ int mouse_get_event(struct udevice *dev, struct mouse_event *evt)
return 0;
}
int mouse_get_click(struct udevice *dev, int *xp, int *yp)
int mouse_get_click(struct udevice *dev, struct vid_pos *pos)
{
struct mouse_uc_priv *uc_priv = dev_get_uclass_priv(dev);
struct mouse_event event;
@@ -53,11 +53,7 @@ int mouse_get_click(struct udevice *dev, int *xp, int *yp)
/* If we just detected a click, return it */
if (pending) {
if (xp)
*xp = uc_priv->click_pos.x;
if (yp)
*yp = uc_priv->click_pos.y;
*pos = uc_priv->click_pos;
return 0;
}
}