From 68e331851ad206b7504353e864d5720c9d0d73e1 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sun, 8 Sep 2013 02:12:36 +0200 Subject: options: remove --(no-)mouseinput option I have no idea why it exists, as it's redundant to --(no-)mouse-movements. --- DOCS/man/en/options.rst | 5 +---- mpvcore/options.c | 2 -- mpvcore/options.h | 1 - video/out/vo_caca.c | 4 ++-- video/out/w32_common.c | 2 +- video/out/x11_common.c | 2 +- 6 files changed, 5 insertions(+), 11 deletions(-) diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst index 15fea36bd6..46b894f931 100644 --- a/DOCS/man/en/options.rst +++ b/DOCS/man/en/options.rst @@ -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. diff --git a/mpvcore/options.c b/mpvcore/options.c index b84c0d4999..9f87186066 100644 --- a/mpvcore/options.c +++ b/mpvcore/options.c @@ -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, diff --git a/mpvcore/options.h b/mpvcore/options.h index 99291b9a38..a0fe23f050 100644 --- a/mpvcore/options.h +++ b/mpvcore/options.h @@ -32,7 +32,6 @@ typedef struct mp_vo_opts { int keepaspect; int border; - int nomouse_input; int enable_mouse_movements; int64_t WinID; diff --git a/video/out/vo_caca.c b/video/out/vo_caca.c index 4d457eb57b..c71527d445 100644 --- a/video/out/vo_caca.c +++ b/video/out/vo_caca.c @@ -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; diff --git a/video/out/w32_common.c b/video/out/w32_common.c index 78ea91fa1b..c2d0ac5535 100644 --- a/video/out/w32_common.c +++ b/video/out/w32_common.c @@ -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); diff --git a/video/out/x11_common.c b/video/out/x11_common.c index c8716d0a55..7c06ebf121 100644 --- a/video/out/x11_common.c +++ b/video/out/x11_common.c @@ -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); -- cgit v1.2.3