[MPlayer-dev-eng] text_font_scale_factor
Alban Bedel
albeu at free.fr
Mon Jul 9 13:36:15 CEST 2007
On Mon, 9 Jul 2007 12:25:39 +0300
"Anatoli Marinov" <anatoli.marinov at gmail.com> wrote:
> Thanks Alban,
> See the attacked file. It has all fixes.
Commited with a few fix for things I forgot previously:
> { MP_CMD_SUB_LOG, "sub_log", 0, { {-1,{0}} } },
> + { MP_CMD_SUB_SCALE, "sub_scale",1, { {MP_CMD_ARG_FLOAT,{0}}, {-1,{0}} } },
> { MP_CMD_GET_PERCENT_POS, "get_percent_pos", 0, { {-1,{0}} } },
The second arg to allow setting instead of adjusting was missing, I also
updated the docs accordingly.
> + case M_PROPERTY_SET:
> + if (!arg)
> + return M_PROPERTY_ERROR;
> + text_font_scale_factor = *(float *) arg;
> + M_PROPERTY_CLAMP(prop, text_font_scale_factor);
> + force_load_font = 1;
> + return M_PROPERTY_OK;
The argument should be clamped before setting it to allow the caller
to directly read back the value really set.
While at it I also moved the function to keep the same order as in
the property array.
Albeu
More information about the MPlayer-dev-eng
mailing list