mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
command: disc-mouse-on-button property
This property indicates whether mouse cursor is located on button or not for disc naviation.
This commit is contained in:
@@ -202,18 +202,19 @@ static void handle_menu_input(stream_t *stream, const char *cmd)
|
||||
}
|
||||
}
|
||||
|
||||
static void handle_mouse_pos(stream_t *stream, int x, int y)
|
||||
static dvdnav_status_t handle_mouse_pos(stream_t *stream, int x, int y)
|
||||
{
|
||||
struct priv *priv = stream->priv;
|
||||
dvdnav_t *nav = priv->dvdnav;
|
||||
pci_t *pci = dvdnav_get_current_nav_pci(nav);
|
||||
|
||||
if (!pci)
|
||||
return;
|
||||
return DVDNAV_STATUS_ERR;
|
||||
|
||||
dvdnav_mouse_select(nav, pci, x, y);
|
||||
dvdnav_status_t status = dvdnav_mouse_select(nav, pci, x, y);
|
||||
priv->mousex = x;
|
||||
priv->mousey = y;
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -305,7 +306,7 @@ static void handle_cmd(stream_t *s, struct mp_nav_cmd *ev)
|
||||
handle_menu_input(s, ev->u.menu.action);
|
||||
break;
|
||||
case MP_NAV_CMD_MOUSE_POS:
|
||||
handle_mouse_pos(s, ev->u.mouse_pos.x, ev->u.mouse_pos.y);
|
||||
ev->mouse_on_button = handle_mouse_pos(s, ev->u.mouse_pos.x, ev->u.mouse_pos.y);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user