diff options
Diffstat (limited to 'player')
-rw-r--r-- | player/command.c | 6 | ||||
-rw-r--r-- | player/lua.c | 4 | ||||
-rw-r--r-- | player/osd.c | 2 | ||||
-rw-r--r-- | player/sub.c | 6 |
4 files changed, 8 insertions, 10 deletions
diff --git a/player/command.c b/player/command.c index 950d6dd80c..42938af140 100644 --- a/player/command.c +++ b/player/command.c @@ -2719,7 +2719,7 @@ static int mp_property_osd_w(void *ctx, struct m_property *prop, int action, void *arg) { MPContext *mpctx = ctx; - struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd, OSDTYPE_OSD); + struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd); return m_property_int_ro(action, arg, vo_res.w); } @@ -2727,7 +2727,7 @@ static int mp_property_osd_h(void *ctx, struct m_property *prop, int action, void *arg) { MPContext *mpctx = ctx; - struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd, OSDTYPE_OSD); + struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd); return m_property_int_ro(action, arg, vo_res.h); } @@ -2735,7 +2735,7 @@ static int mp_property_osd_par(void *ctx, struct m_property *prop, int action, void *arg) { MPContext *mpctx = ctx; - struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd, OSDTYPE_OSD); + struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd); return m_property_double_ro(action, arg, vo_res.display_par); } diff --git a/player/lua.c b/player/lua.c index 680577554c..84d7295640 100644 --- a/player/lua.c +++ b/player/lua.c @@ -978,7 +978,7 @@ static int script_set_osd_ass(lua_State *L) static int script_get_osd_size(lua_State *L) { struct MPContext *mpctx = get_mpctx(L); - struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd, OSDTYPE_EXTERNAL); + struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd); double aspect = 1.0 * vo_res.w / MPMAX(vo_res.h, 1) / (vo_res.display_par ? vo_res.display_par : 1); lua_pushnumber(L, vo_res.w); @@ -990,7 +990,7 @@ static int script_get_osd_size(lua_State *L) static int script_get_osd_margins(lua_State *L) { struct MPContext *mpctx = get_mpctx(L); - struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd, OSDTYPE_EXTERNAL); + struct mp_osd_res vo_res = osd_get_vo_res(mpctx->osd); lua_pushnumber(L, vo_res.ml); lua_pushnumber(L, vo_res.mt); lua_pushnumber(L, vo_res.mr); diff --git a/player/osd.c b/player/osd.c index 2a09911ac7..1baf9fb45e 100644 --- a/player/osd.c +++ b/player/osd.c @@ -561,6 +561,6 @@ void update_osd_msg(struct MPContext *mpctx) text = talloc_asprintf_append(text, "%s%s", text ? "\n" : "", mpctx->osd_msg_text); } - osd_set_text(osd, OSDTYPE_OSD, text); + osd_set_text(osd, text); talloc_free(text); } diff --git a/player/sub.c b/player/sub.c index 69c1dbbd19..6d01e0ca5d 100644 --- a/player/sub.c +++ b/player/sub.c @@ -71,8 +71,7 @@ void uninit_sub(struct MPContext *mpctx, struct track *track) reset_subtitles(mpctx, track); sub_select(track->d_sub, false); int order = get_order(mpctx, track); - if (order >= 0 && order <= 1) - osd_set_sub(mpctx->osd, OSDTYPE_SUB + order, NULL); + osd_set_sub(mpctx->osd, order, NULL); } } @@ -182,8 +181,7 @@ void reinit_sub(struct MPContext *mpctx, struct track *track) sub_select(track->d_sub, true); int order = get_order(mpctx, track); - if (order >= 0 && order <= 1) - osd_set_sub(mpctx->osd, OSDTYPE_SUB + order, track->d_sub); + osd_set_sub(mpctx->osd, order, track->d_sub); sub_control(track->d_sub, SD_CTRL_SET_TOP, &(bool){!!order}); } |