From 127ed985dda9f9620e2e853000b41d83af9d0723 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 23 Jan 2008 22:33:46 +0000 Subject: sub_scale command now works with ass subtitles renderer git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@25843 b3059339-0415-0410-9bf9-f77b7e298cf2 --- command.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'command.c') diff --git a/command.c b/command.c index 7c37ff7f88..f2c33f417a 100644 --- a/command.c +++ b/command.c @@ -1796,17 +1796,44 @@ static int mp_property_sub_scale(m_option_t * prop, int action, void *arg, 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); } } -- cgit v1.2.3