1
mirror of https://github.com/mpv-player/mpv synced 2024-11-18 21:16:10 +01:00

lua: wake up the core when setting OSD

The OSD is marked as changed, but the core isn't notified and this
doesn't immediately wakeup. (Possibly the OSD code should wakeup the
core instead, but maybe that woudl be overkill.)

Observed when using "mp.use_suspend = false" in the OSC, and pausing,
and moving the mouse pointer out of the window. The last part of the
fade remained visible for longer than intended.
This commit is contained in:
wm4 2014-08-15 23:32:31 +02:00
parent 364e06261a
commit 318e8da250

View File

@ -873,6 +873,7 @@ static int script_set_osd_ass(lua_State *L)
int res_y = luaL_checkinteger(L, 2); int res_y = luaL_checkinteger(L, 2);
const char *text = luaL_checkstring(L, 3); const char *text = luaL_checkstring(L, 3);
osd_set_external(mpctx->osd, res_x, res_y, (char *)text); osd_set_external(mpctx->osd, res_x, res_y, (char *)text);
mp_input_wakeup(mpctx->input);
return 0; return 0;
} }