diff options
author | Avi Halachmi (:avih) <avihpit@yahoo.com> | 2020-11-16 18:15:18 +0200 |
---|---|---|
committer | avih <avih@users.noreply.github.com> | 2020-11-16 20:29:58 +0200 |
commit | 0d5055fe93e35770235902e11ff39b3231e6e1b8 (patch) | |
tree | 72f0cc55a1cb20b60d4e00d97b714245c975b7d9 /player/lua.c | |
parent | a7686679564de584eaa720a6f682c8bd8ad062e6 (diff) | |
download | mpv-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/lua.c')
-rw-r--r-- | player/lua.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/player/lua.c b/player/lua.c index 363e1a52fd..2eb163ef16 100644 --- a/player/lua.c +++ b/player/lua.c @@ -991,16 +991,6 @@ static int script_raw_abort_async_command(lua_State *L) return 0; } -static int script_get_mouse_pos(lua_State *L) -{ - struct MPContext *mpctx = get_mpctx(L); - int px, py; - mp_input_get_mouse_pos(mpctx->input, &px, &py); - lua_pushnumber(L, px); - lua_pushnumber(L, py); - return 2; -} - static int script_get_time(lua_State *L) { struct script_ctx *ctx = get_ctx(L); @@ -1242,7 +1232,6 @@ static const struct fn_entry main_fns[] = { AF_ENTRY(set_property_native), FN_ENTRY(raw_observe_property), FN_ENTRY(raw_unobserve_property), - FN_ENTRY(get_mouse_pos), FN_ENTRY(get_time), FN_ENTRY(input_set_section_mouse_area), FN_ENTRY(format_time), |