Commit 2d273fc3 authored by Laurent Aimar's avatar Laurent Aimar

Updated hotkeys after deinterlace changes.

The deinterlace hotkey now turns of/off deinterlacing.
parent 3f0b08b9
...@@ -594,31 +594,37 @@ static int PutAction( intf_thread_t *p_intf, int i_action ) ...@@ -594,31 +594,37 @@ static int PutAction( intf_thread_t *p_intf, int i_action )
} }
else if( i_action == ACTIONID_DEINTERLACE && p_vout ) else if( i_action == ACTIONID_DEINTERLACE && p_vout )
{ {
vlc_value_t val={0}, val_list, text_list; int i_deinterlace = var_GetInteger( p_vout, "deinterlace" );
var_Get( p_vout, "deinterlace-mode", &val ); if( i_deinterlace != 0 )
if( var_Change( p_vout, "deinterlace-mode", VLC_VAR_GETLIST,
&val_list, &text_list ) >= 0 )
{ {
int i; var_SetInteger( p_vout, "deinterlace", 0 );
for( i = 0; i < val_list.p_list->i_count; i++ ) vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
"%s", _("Deinterlace off") );
}
else
{
var_SetInteger( p_vout, "deinterlace", 1 );
char *psz_mode = var_GetString( p_vout, "deinterlace-mode" );
vlc_value_t vlist, tlist;
if( psz_mode && !var_Change( p_vout, "deinterlace-mode", VLC_VAR_GETCHOICES, &vlist, &tlist ) >= 0 )
{ {
if( !strcmp( val_list.p_list->p_values[i].psz_string, const char *psz_text = NULL;
val.psz_string ) ) for( int i = 0; i < vlist.p_list->i_count; i++ )
{ {
i++; if( !strcmp( vlist.p_list->p_values[i].psz_string, psz_mode ) )
break; {
psz_text = tlist.p_list->p_values[i].psz_string;
break;
}
} }
} vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
if( i == val_list.p_list->i_count ) i = 0; "%s (%s)", _("Deinterlace on"), psz_text ? psz_text : psz_mode );
var_SetString( p_vout, "deinterlace-mode",
val_list.p_list->p_values[i].psz_string );
vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
_("Deinterlace mode: %s"),
text_list.p_list->p_values[i].psz_string );
var_FreeList( &val_list, &text_list ); var_FreeList( &vlist, &tlist );
}
free( psz_mode );
} }
free( val.psz_string );
} }
else if( ( i_action == ACTIONID_ZOOM || else if( ( i_action == ACTIONID_ZOOM ||
i_action == ACTIONID_UNZOOM ) && p_vout ) i_action == ACTIONID_UNZOOM ) && p_vout )
......
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