diff options
author | wm4 <wm4@nowhere> | 2014-02-11 00:57:40 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2014-02-11 00:57:40 +0100 |
commit | 212d4e6061463e44e9333d7d0b99f10733bee22e (patch) | |
tree | 88426d29abad9316aaa06d056c644522c95f5957 /player/lua/defaults.lua | |
parent | 33c6cbef3ab2be9ff8b818441b5cda101b913f15 (diff) | |
download | mpv-212d4e6061463e44e9333d7d0b99f10733bee22e.tar.bz2 mpv-212d4e6061463e44e9333d7d0b99f10733bee22e.tar.xz |
lua: some minor API changes
Diffstat (limited to 'player/lua/defaults.lua')
-rw-r--r-- | player/lua/defaults.lua | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index 88270253c8..1ab1c4264a 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -1,3 +1,6 @@ +function mp.get_script_name() + return mp.script_name +end local callbacks = {} -- each script has its own section, so that they don't conflict @@ -133,7 +136,7 @@ local event_handlers = {} function mp.register_event(name, cb) event_handlers[name] = cb - mp.request_event(name, true) + return mp.request_event(name, true) end -- default handlers @@ -169,7 +172,7 @@ _G.mp_event_loop = function() -- Resume playloop - important especially if an error happened while -- suspended, and the error was handled, but no resume was done. if wait > 0 then - mp.resume("all") + mp.resume_all() end local e = mp.wait_event(wait) -- Empty the event queue while suspended; otherwise, each |