mirror of
https://github.com/mpv-player/mpv
synced 2025-03-30 15:29:56 +00:00
options: remove --(no-)mouseinput option
I have no idea why it exists, as it's redundant to --(no-)mouse-movements.
This commit is contained in:
parent
0509532d70
commit
68e331851a
@ -1250,14 +1250,11 @@
|
||||
1). A value of 1 means square pixels (correct for (almost?) all LCDs). See
|
||||
also ``--monitoraspect`` and ``--aspect``.
|
||||
|
||||
``--mouse-movements``
|
||||
``--mouse-movements``, ``--no-mouse-movements``
|
||||
Permit mpv to receive pointer events reported by the video output
|
||||
driver. Necessary to select the buttons in DVD menus. Supported for
|
||||
X11-based VOs (x11, xv, etc) and the gl, direct3d and corevideo VOs.
|
||||
|
||||
``--mouseinput``, ``--no-mouseinput``
|
||||
``--no-mouseinput`` disables mouse button press/release input.
|
||||
|
||||
``--no-msgcolor``
|
||||
Disable colorful console output on terminals.
|
||||
|
||||
|
@ -614,7 +614,6 @@ const m_option_t mp_opts[] = {
|
||||
#endif
|
||||
OPT_STRING("heartbeat-cmd", heartbeat_cmd, 0),
|
||||
OPT_FLOAT("heartbeat-interval", heartbeat_interval, CONF_MIN, 0),
|
||||
OPT_FLAG_CONSTANTS("mouseinput", vo.nomouse_input, 0, 1, 0),
|
||||
|
||||
OPT_CHOICE_OR_INT("screen", vo.screen_id, 0, 0, 32,
|
||||
({"default", -1})),
|
||||
@ -756,7 +755,6 @@ const struct MPOpts mp_default_opts = {
|
||||
.monitor_pixel_aspect = 1.0,
|
||||
.screen_id = -1,
|
||||
.fsscreen_id = -1,
|
||||
.nomouse_input = 0,
|
||||
.enable_mouse_movements = 1,
|
||||
.fsmode = 0,
|
||||
.panscan = 0.0f,
|
||||
|
@ -32,7 +32,6 @@ typedef struct mp_vo_opts {
|
||||
int keepaspect;
|
||||
int border;
|
||||
|
||||
int nomouse_input;
|
||||
int enable_mouse_movements;
|
||||
|
||||
int64_t WinID;
|
||||
|
@ -175,12 +175,12 @@ static void check_events(struct vo *vo)
|
||||
vo_mouse_movement(vo, cev.data.mouse.x, cev.data.mouse.y);
|
||||
break;
|
||||
case CACA_EVENT_MOUSE_PRESS:
|
||||
if (!vo->opts->nomouse_input)
|
||||
if (vo->opts->enable_mouse_movements)
|
||||
mp_input_put_key(vo->input_ctx,
|
||||
(MP_MOUSE_BTN0 + cev.data.mouse.button - 1) | MP_KEY_STATE_DOWN);
|
||||
break;
|
||||
case CACA_EVENT_MOUSE_RELEASE:
|
||||
if (!vo->opts->nomouse_input)
|
||||
if (vo->opts->enable_mouse_movements)
|
||||
mp_input_put_key(vo->input_ctx,
|
||||
(MP_MOUSE_BTN0 + cev.data.mouse.button - 1) | MP_KEY_STATE_UP);
|
||||
break;
|
||||
|
@ -279,7 +279,7 @@ static LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam,
|
||||
break;
|
||||
}
|
||||
|
||||
if (mouse_button && !vo->opts->nomouse_input) {
|
||||
if (mouse_button && vo->opts->enable_mouse_movements) {
|
||||
int x = GET_X_LPARAM(lParam);
|
||||
int y = GET_Y_LPARAM(lParam);
|
||||
mouse_button |= mod_state(vo);
|
||||
|
@ -1632,7 +1632,7 @@ static void vo_x11_selectinput_witherr(struct vo *vo,
|
||||
Window w,
|
||||
long event_mask)
|
||||
{
|
||||
if (vo->opts->nomouse_input)
|
||||
if (!vo->opts->enable_mouse_movements)
|
||||
event_mask &= ~(ButtonPressMask | ButtonReleaseMask);
|
||||
|
||||
XSelectInput(display, w, NoEventMask);
|
||||
|
Loading…
Reference in New Issue
Block a user