Mercurial > mplayer.hg
changeset 25815:8920f8a26c05
sub_scale command now works with ass subtitles renderer
author | ben |
---|---|
date | Wed, 23 Jan 2008 22:33:46 +0000 |
parents | 4ba9b9bdf123 |
children | 7ccdc98df1a0 |
files | command.c |
diffstat | 1 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/command.c Wed Jan 23 21:18:32 2008 +0000 +++ b/command.c Wed Jan 23 22:33:46 2008 +0000 @@ -1796,17 +1796,44 @@ if (!arg) return M_PROPERTY_ERROR; M_PROPERTY_CLAMP(prop, *(float *) arg); +#ifdef USE_ASS + if (ass_enabled) { + ass_font_scale = *(float *) arg; + ass_force_reload = 1; + } + else { +#endif text_font_scale_factor = *(float *) arg; force_load_font = 1; +#ifdef USE_ASS + } +#endif return M_PROPERTY_OK; case M_PROPERTY_STEP_UP: case M_PROPERTY_STEP_DOWN: +#ifdef USE_ASS + if (ass_enabled) { + ass_font_scale += (arg ? *(float *) arg : 0.1)* + (action == M_PROPERTY_STEP_UP ? 1.0 : -1.0); + M_PROPERTY_CLAMP(prop, ass_font_scale); + ass_force_reload = 1; + } + else { +#endif text_font_scale_factor += (arg ? *(float *) arg : 0.1)* (action == M_PROPERTY_STEP_UP ? 1.0 : -1.0); M_PROPERTY_CLAMP(prop, text_font_scale_factor); force_load_font = 1; +#ifdef USE_ASS + } +#endif return M_PROPERTY_OK; default: +#ifdef USE_ASS + if (ass_enabled) + return m_property_float_ro(prop, action, arg, ass_font_scale); + else +#endif return m_property_float_ro(prop, action, arg, text_font_scale_factor); } }