hotkeys: change text scale increments (refs #21432)

This commit is contained in:
Francois Cartegnie 2018-11-08 14:05:13 +01:00
parent a39eb8df51
commit d20f77eb38
1 changed files with 3 additions and 1 deletions

View File

@ -1396,7 +1396,9 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
else
{
i_scale = var_GetInteger( p_playlist, "sub-text-scale" );
i_scale += ((i_action == ACTIONID_SUBTITLE_TEXT_SCALE_UP) ? 1 : -1) * 25;
unsigned increment = ((i_scale > 100 ? i_scale - 100 : 100 - i_scale) / 25) <= 1 ? 10 : 25;
i_scale += ((i_action == ACTIONID_SUBTITLE_TEXT_SCALE_UP) ? 1 : -1) * increment;
i_scale -= i_scale % increment;
i_scale = VLC_CLIP( i_scale, 25, 500 );
}
var_SetInteger( p_playlist, "sub-text-scale", i_scale );