Commit 651b9c8b authored by Rémi Duraffort's avatar Rémi Duraffort

Factorize.

parent 35178153
...@@ -1041,15 +1041,14 @@ static void ButtonUpdate( demux_t *p_demux, bool b_mode ) ...@@ -1041,15 +1041,14 @@ static void ButtonUpdate( demux_t *p_demux, bool b_mode )
} }
vlc_mutex_lock( p_mutex ); vlc_mutex_lock( p_mutex );
val.i_int = hl.sx; var_Set( p_sys->p_input, "x-start", val ); var_SetInteger( p_sys->p_input, "x-start", hl.sx );
val.i_int = hl.ex; var_Set( p_sys->p_input, "x-end", val ); var_SetInteger( p_sys->p_input, "x-end", hl.ex );
val.i_int = hl.sy; var_Set( p_sys->p_input, "y-start", val ); var_SetInteger( p_sys->p_input, "y-start", hl.sy );
val.i_int = hl.ey; var_Set( p_sys->p_input, "y-end", val ); var_SetInteger( p_sys->p_input, "y-end", hl.ey );
val.p_address = (void *)p_sys->palette; var_SetAddress( p_sys->p_input, "menu-palette", p_sys->palette );
var_Set( p_sys->p_input, "menu-palette", val );
val.b_bool = true; var_Set( p_sys->p_input, "highlight", val ); var_SetBool( p_sys->p_input, "highlight", true );
vlc_mutex_unlock( p_mutex ); vlc_mutex_unlock( p_mutex );
msg_Dbg( p_demux, "buttonUpdate %d", i_button ); msg_Dbg( p_demux, "buttonUpdate %d", i_button );
...@@ -1061,8 +1060,7 @@ static void ButtonUpdate( demux_t *p_demux, bool b_mode ) ...@@ -1061,8 +1060,7 @@ static void ButtonUpdate( demux_t *p_demux, bool b_mode )
/* Show all */ /* Show all */
vlc_mutex_lock( p_mutex ); vlc_mutex_lock( p_mutex );
val.b_bool = false; var_SetBool( p_sys->p_input, "highlight", false );
var_Set( p_sys->p_input, "highlight", val );
vlc_mutex_unlock( p_mutex ); vlc_mutex_unlock( p_mutex );
} }
} }
......
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