summaryrefslogtreecommitdiffstats
path: root/player/javascript.c
diff options
context:
space:
mode:
authorAvi Halachmi (:avih) <avihpit@yahoo.com>2020-11-16 18:15:18 +0200
committeravih <avih@users.noreply.github.com>2020-11-16 20:29:58 +0200
commit0d5055fe93e35770235902e11ff39b3231e6e1b8 (patch)
tree72f0cc55a1cb20b60d4e00d97b714245c975b7d9 /player/javascript.c
parenta7686679564de584eaa720a6f682c8bd8ad062e6 (diff)
downloadmpv-0d5055fe93e35770235902e11ff39b3231e6e1b8.tar.bz2
mpv-0d5055fe93e35770235902e11ff39b3231e6e1b8.tar.xz
lua/js: mp.get_mouse_pos: use the mouse-pos property
mp.get_mouse_pos() is undocumented and is no longer required - the property can be used officially by any client now, however, osc.lua uses it, and also some user scripts learnt to rely on it, so we keep it - as a trivial wrapper around the new mouse-pos property.
Diffstat (limited to 'player/javascript.c')
-rw-r--r--player/javascript.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/player/javascript.c b/player/javascript.c
index 7cffcbe119..8cb263e123 100644
--- a/player/javascript.c
+++ b/player/javascript.c
@@ -781,16 +781,6 @@ static void push_nums_obj(js_State *J, const char * const names[],
}
}
-// args: none, return: object with properties x, y
-static void script_get_mouse_pos(js_State *J)
-{
- int x, y;
- mp_input_get_mouse_pos(jctx(J)->mpctx->input, &x, &y);
- const char * const names[] = {"x", "y", NULL};
- const double vals[] = {x, y};
- push_nums_obj(J, names, vals);
-}
-
// args: input-section-name, x0, y0, x1, y1
static void script_input_set_section_mouse_area(js_State *J)
{
@@ -1181,7 +1171,6 @@ static const struct fn_entry main_fns[] = {
FN_ENTRY(get_wakeup_pipe, 0),
FN_ENTRY(_hook_add, 3),
FN_ENTRY(_hook_continue, 1),
- FN_ENTRY(get_mouse_pos, 0),
FN_ENTRY(input_set_section_mouse_area, 5),
FN_ENTRY(last_error, 0),
FN_ENTRY(_set_last_error, 1),