Commit 049c4188 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

vout: initialize "scale" before "zoom" (refs #4027)

The zoom callback depends on the scale variable...
parent 6bd7c460
......@@ -162,6 +162,19 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_Create( p_vout, "mouse-hide-timeout",
VLC_VAR_INTEGER | VLC_VAR_DOINHERIT );
/* Add variables to manage scaling video */
var_Create( p_vout, "autoscale", VLC_VAR_BOOL | VLC_VAR_DOINHERIT
| VLC_VAR_ISCOMMAND );
text.psz_string = _("Autoscale video");
var_Change( p_vout, "autoscale", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "autoscale", ScalingCallback, NULL );
var_Create( p_vout, "scale", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT
| VLC_VAR_ISCOMMAND );
text.psz_string = _("Scale factor");
var_Change( p_vout, "scale", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "scale", ScalingCallback, NULL );
/* Zoom object var */
var_Create( p_vout, "zoom", VLC_VAR_FLOAT | VLC_VAR_ISCOMMAND |
VLC_VAR_HASCHOICE | VLC_VAR_DOINHERIT );
......@@ -260,19 +273,6 @@ void vout_IntfInit( vout_thread_t *p_vout )
var_TriggerCallback( p_vout, "aspect-ratio" );
free( old_val.psz_string );
/* Add variables to manage scaling video */
var_Create( p_vout, "autoscale", VLC_VAR_BOOL | VLC_VAR_DOINHERIT
| VLC_VAR_ISCOMMAND );
text.psz_string = _("Autoscale video");
var_Change( p_vout, "autoscale", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "autoscale", ScalingCallback, NULL );
var_Create( p_vout, "scale", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT
| VLC_VAR_ISCOMMAND );
text.psz_string = _("Scale factor");
var_Change( p_vout, "scale", VLC_VAR_SETTEXT, &text, NULL );
var_AddCallback( p_vout, "scale", ScalingCallback, NULL );
/* Add a variable to indicate if the window should be on top of others */
var_Create( p_vout, "video-on-top", VLC_VAR_BOOL | VLC_VAR_DOINHERIT
| VLC_VAR_ISCOMMAND );
......
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