aboutsummaryrefslogtreecommitdiffhomepage
path: root/player/lua
diff options
context:
space:
mode:
authorGravatar wm4 <wm4@nowhere>2016-11-22 14:47:50 +0100
committerGravatar wm4 <wm4@nowhere>2016-11-22 15:54:44 +0100
commitf30c5d09f4478ca40ceabc90d57fea68965778df (patch)
tree13ee64c5b6554cb2c46d0998185f51f4a7c30a25 /player/lua
parent745862131f2e03bfb7b8fae4499d84522f0cc1a2 (diff)
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.
Diffstat (limited to 'player/lua')
-rw-r--r--player/lua/defaults.lua12
1 files changed, 6 insertions, 6 deletions
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)