From f30c5d09f4478ca40ceabc90d57fea68965778df Mon Sep 17 00:00:00 2001 From: wm4 Date: Tue, 22 Nov 2016 14:47:50 +0100 Subject: client API: turn mpv_suspend() and mpv_resume() into stubs As threatened by the API changes document. This commit also removes or stubs equivalent calls in IPC and Lua scripting. The stubs are left to maintain ABI compatibility. The semantics of the API functions have been close enough to doing nothing that this probably won't even break existing API users. Probably. --- player/lua/defaults.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'player/lua/defaults.lua') diff --git a/player/lua/defaults.lua b/player/lua/defaults.lua index c65fda7c9b..08616c5638 100644 --- a/player/lua/defaults.lua +++ b/player/lua/defaults.lua @@ -452,10 +452,15 @@ end mp.use_suspend = false +local suspend_warned = false + function mp.dispatch_events(allow_wait) local more_events = true if mp.use_suspend then - mp.suspend() + if not suspend_warned then + mp.msg.error("mp.use_suspend is now ignored.") + suspend_warned = true + end end while mp.keep_running do local wait = 0 @@ -475,11 +480,6 @@ function mp.dispatch_events(allow_wait) end end local e = mp.wait_event(wait) - -- Empty the event queue while suspended; otherwise, each - -- event will keep us waiting until the core suspends again. - if mp.use_suspend then - mp.suspend() - end more_events = false if e.event ~= "none" then call_event_handlers(e) -- cgit v1.2.3