[vlc-devel] [PATCH 1/3] libvlc: improve libvlc_video_set_key_input prototype

Steve Lhomme robux4 at ycbcr.xyz
Mon Dec 2 15:44:38 CET 2019


Patchset LGTM

On 2019-12-02 15:28, Alexandre Janniaux wrote:
> Use booleans instead of unsigned when taking a boolean value.
> ---
>   include/vlc/libvlc_media_player.h | 2 +-
>   lib/video.c                       | 4 ++--
>   2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
> index 7c72c9774b..2a5dc57b22 100644
> --- a/include/vlc/libvlc_media_player.h
> +++ b/include/vlc/libvlc_media_player.h
> @@ -1414,7 +1414,7 @@ LIBVLC_API bool libvlc_get_fullscreen( libvlc_media_player_t *p_mi );
>    * \param on true to handle key press events, false to ignore them.
>    */
>   LIBVLC_API
> -void libvlc_video_set_key_input( libvlc_media_player_t *p_mi, unsigned on );
> +void libvlc_video_set_key_input( libvlc_media_player_t *p_mi, bool on );
>   
>   /**
>    * Enable or disable mouse click events handling. By default, those events are
> diff --git a/lib/video.c b/lib/video.c
> index 6f8e6d7f59..dd6f514ffd 100644
> --- a/lib/video.c
> +++ b/lib/video.c
> @@ -117,9 +117,9 @@ void libvlc_toggle_fullscreen( libvlc_media_player_t *p_mi )
>       free (pp_vouts);
>   }
>   
> -void libvlc_video_set_key_input( libvlc_media_player_t *p_mi, unsigned on )
> +void libvlc_video_set_key_input( libvlc_media_player_t *p_mi, bool on )
>   {
> -    var_SetBool (p_mi, "keyboard-events", !!on);
> +    var_SetBool (p_mi, "keyboard-events", on);
>   }
>   
>   void libvlc_video_set_mouse_input( libvlc_media_player_t *p_mi, unsigned on )
> -- 
> 2.24.0
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list