Commit 2e76eb81 authored by Francois Cartegnie's avatar Francois Cartegnie

add spu text scaling actions

parent fcec9fa7
......@@ -173,6 +173,9 @@ typedef enum vlc_action {
ACTIONID_AUDIO_TRACK,
ACTIONID_SUBTITLE_TRACK,
ACTIONID_SUBTITLE_TOGGLE,
ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL,
ACTIONID_SUBTITLE_TEXT_SCALE_UP,
ACTIONID_SUBTITLE_TEXT_SCALE_DOWN,
ACTIONID_INTF_TOGGLE_FSC,
ACTIONID_INTF_HIDE,
ACTIONID_INTF_BOSS,
......
......@@ -1092,6 +1092,28 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
break;
}
case ACTIONID_SUBTITLE_TEXT_SCALE_DOWN:
case ACTIONID_SUBTITLE_TEXT_SCALE_UP:
case ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL:
{
if( p_vout )
{
int i_scale;
if( i_action == ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL )
{
i_scale = 100;
}
else
{
i_scale = var_GetInteger( p_vout, "sub-text-scale" );
i_scale += ((i_action == ACTIONID_SUBTITLE_TEXT_SCALE_UP) ? 1 : -1) * 25;
i_scale = VLC_CLIP( i_scale, 10, 500 );
}
var_SetInteger( p_vout, "sub-text-scale", i_scale );
DisplayMessage( p_vout, _( "Subtitle text scale %d%%" ), i_scale );
}
}
/* Input + video output */
case ACTIONID_POSITION:
if( p_vout && vout_OSDEpg( p_vout, input_GetItem( p_input ) ) )
......
......@@ -260,7 +260,7 @@ found:
/*** VLC key map ***/
#define MAXACTION 20
#define MAXACTION 26
struct action
{
char name[MAXACTION];
......@@ -353,6 +353,9 @@ static const struct action actions[] =
{ "subsync-markaudio", ACTIONID_SUBSYNC_MARKAUDIO, },
{ "subsync-marksub", ACTIONID_SUBSYNC_MARKSUB, },
{ "subsync-reset", ACTIONID_SUBSYNC_RESET, },
{ "subtitle-text-scale-down", ACTIONID_SUBTITLE_TEXT_SCALE_DOWN, },
{ "subtitle-text-scale-normal", ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL, },
{ "subtitle-text-scale-up", ACTIONID_SUBTITLE_TEXT_SCALE_UP, },
{ "subtitle-toggle", ACTIONID_SUBTITLE_TOGGLE, },
{ "subtitle-track", ACTIONID_SUBTITLE_TRACK, },
{ "title-next", ACTIONID_TITLE_NEXT, },
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment