X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fvideo_output%2Fvout_intf.c;h=fc8369ebbd58d4a6d19bf13978cbfd789526cc1e;hb=114b922fa7bbe06f4acfcc3d7af9c47ef534b1a2;hp=33364817694459bdb54585a2e1135cbc58bfcbb1;hpb=a52793e9241068899a36f4e73a125a2fbb81e1a9;p=vlc diff --git a/src/video_output/vout_intf.c b/src/video_output/vout_intf.c index 3336481769..fc8369ebbd 100644 --- a/src/video_output/vout_intf.c +++ b/src/video_output/vout_intf.c @@ -44,8 +44,6 @@ #include #include #include -#include - #include #include #include "../libvlc.h" @@ -370,6 +368,7 @@ void vout_IntfInit( vout_thread_t *p_vout ) var_Create( p_vout, "mouse-button-down", VLC_VAR_INTEGER ); var_Create( p_vout, "mouse-moved", VLC_VAR_BOOL ); var_Create( p_vout, "mouse-clicked", VLC_VAR_BOOL ); + var_Create( p_vout, "mouse-object", VLC_VAR_BOOL ); var_Create( p_vout, "intf-change", VLC_VAR_BOOL ); var_SetBool( p_vout, "intf-change", true ); @@ -699,13 +698,7 @@ static void InitWindowSize( vout_thread_t *p_vout, unsigned *pi_width, static int ZoomCallback( vlc_object_t *p_this, char const *psz_cmd, vlc_value_t oldval, vlc_value_t newval, void *p_data ) { - vout_thread_t *p_vout = (vout_thread_t *)p_this; - (void)psz_cmd; (void)oldval; (void)newval; (void)p_data; - InitWindowSize( p_vout, &p_vout->i_window_width, - &p_vout->i_window_height ); - vout_Control( p_vout, VOUT_SET_SIZE, p_vout->i_window_width, - p_vout->i_window_height ); - return VLC_SUCCESS; + return var_SetFloat( p_this, "scale", newval.f_float ); } static int CropCallback( vlc_object_t *p_this, char const *psz_cmd, @@ -986,14 +979,12 @@ static int FullscreenCallback( vlc_object_t *p_this, char const *psz_cmd, { vout_thread_t *p_vout = (vout_thread_t *)p_this; vlc_value_t val; - (void)psz_cmd; (void)oldval; (void)p_data; + (void)psz_cmd; (void)p_data; + if( oldval.b_bool == newval.b_bool ) + return VLC_SUCCESS; /* no-op */ p_vout->i_changes |= VOUT_FULLSCREEN_CHANGE; - /* Modify libvlc as well because the vout might have to be restarted */ - var_Create( p_vout->p_libvlc, "fullscreen", VLC_VAR_BOOL ); - var_Set( p_vout->p_libvlc, "fullscreen", newval ); - val.b_bool = true; var_Set( p_vout, "intf-change", val ); return VLC_SUCCESS;