[vlc-commits] lib: libvlc_set_fullscreen() takes a boolean

Rémi Denis-Courmont git at videolan.org
Sun May 19 09:49:12 CEST 2019


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun May 19 10:41:41 2019 +0300| [5c432216bc3871c073d5459b91ddf25a435f4189] | committer: Rémi Denis-Courmont

lib: libvlc_set_fullscreen() takes a boolean

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=5c432216bc3871c073d5459b91ddf25a435f4189
---

 include/vlc/libvlc_media_player.h | 6 +++++-
 lib/video.c                       | 4 ++--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index f10fcf7a96..14e9a8b363 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -1378,10 +1378,14 @@ LIBVLC_API void libvlc_toggle_fullscreen( libvlc_media_player_t *p_mi );
  * to the root window <b>before</b> fullscreen mode is enabled. You will want
  * to reparent it back to its normal parent when disabling fullscreen.
  *
+ * \note This setting applies to any and all current or future active video
+ * tracks and windows for the given media player. The choice of fullscreen
+ * output for each window is left to the operating system.
+ *
  * \param p_mi the media player
  * \param b_fullscreen boolean for fullscreen status
  */
-LIBVLC_API void libvlc_set_fullscreen( libvlc_media_player_t *p_mi, int b_fullscreen );
+LIBVLC_API void libvlc_set_fullscreen(libvlc_media_player_t *p_mi, bool b_fullscreen);
 
 /**
  * Get current fullscreen status.
diff --git a/lib/video.c b/lib/video.c
index 7f7ff279a2..4eee0b8d59 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -93,10 +93,10 @@ err:
  * Exported functions
  **********************************************************************/
 
-void libvlc_set_fullscreen( libvlc_media_player_t *p_mi, int b_fullscreen )
+void libvlc_set_fullscreen(libvlc_media_player_t *p_mi, bool b_fullscreen)
 {
     /* This will work even if the video is not currently active */
-    var_SetBool (p_mi, "fullscreen", !!b_fullscreen);
+    var_SetBool(p_mi, "fullscreen", b_fullscreen);
 
     /* Apply to current video outputs (if any) */
     size_t n;



More information about the vlc-commits mailing list