[vlc-devel] [PATCH 1/2] player: vout: Update IsFullscreen and IsWallpaperModeEnabled for fixing toggle hotkey

vvaakshay at gmail.com vvaakshay at gmail.com
Tue Jan 14 17:00:13 CET 2020


From: akshayaky <akymaster007 at gmail.com>

    now the player returns state of the first vout instead of player state

    this commit fixes:
       -the fullscreen hotkey not exiting fullscreen
       -wallpaper mode hotkey not disabling wallpaper mode

    this commit fixes issue #22418
---
 src/player/vout.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/player/vout.c b/src/player/vout.c
index b28599288f..4bb6412c91 100644
--- a/src/player/vout.c
+++ b/src/player/vout.c
@@ -100,7 +100,10 @@ vlc_player_vout_RemoveListener(vlc_player_t *player,
 bool
 vlc_player_vout_IsFullscreen(vlc_player_t *player)
 {
-    return var_GetBool(player, "fullscreen");
+    vout_thread_t *vout = vlc_player_vout_Hold(player);
+    bool fs =  var_GetBool(vout, "fullscreen");
+    vout_Release(vout);
+    return fs;
 }
 
 static int
@@ -185,7 +188,10 @@ vlc_player_vout_SetFullscreen(vlc_player_t *player, bool enabled)
 bool
 vlc_player_vout_IsWallpaperModeEnabled(vlc_player_t *player)
 {
-    return var_GetBool(player, "video-wallpaper");
+    vout_thread_t *vout = vlc_player_vout_Hold(player);
+    bool wm =  var_GetBool(vout, "video-wallpaper");
+    vout_Release(vout);
+    return wm;
 }
 
 void
-- 
2.17.1



More information about the vlc-devel mailing list