History

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.

Avi Halachmi (:avih) committed 5 years ago

Commit 0d5055f1 parent a7686674 files · +6 −22Browse files

Showing the changes to player/javascript (1 of 4 files). Show all

Unified · Split

player/javascript/defaults.js+1−0
@@ -663,6 +663,7 @@ mp.get_script_file = function() { return mp.script_file }; · 662 unmodified lines
663mp.get_script_directory = function() { return mp.script_path };663mp.get_script_directory = function() { return mp.script_path };
664mp.get_time = function() { return mp.get_time_ms() / 1000 };664mp.get_time = function() { return mp.get_time_ms() / 1000 };
665mp.utils.getcwd = function() { return mp.get_property("working-directory") };665mp.utils.getcwd = function() { return mp.get_property("working-directory") };
666mp.get_mouse_pos = function() { return mp.get_property_native("mouse-pos") };
666mp.dispatch_event = dispatch_event;667mp.dispatch_event = dispatch_event;
667mp.process_timers = process_timers;668mp.process_timers = process_timers;
668mp.notify_idle_observers = notify_idle_observers;669mp.notify_idle_observers = notify_idle_observers;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t