[vlc-commits] hotkeys: Reset scale to screen when zooming

Hugo Beauzée-Luyssen git at videolan.org
Wed May 10 17:28:15 CEST 2017


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed May 10 17:14:04 2017 +0200| [e287366ad9d6d9b85e913b03be54ac15f4e8873a] | committer: Hugo Beauzée-Luyssen

hotkeys: Reset scale to screen when zooming

Fix #18258

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

 modules/control/hotkeys.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 6c52ce8848..c20ee7fa2c 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -1193,6 +1193,15 @@ static int PutAction( intf_thread_t *p_intf, input_thread_t *p_input,
         case ACTIONID_UNZOOM:
             if( p_vout )
             {
+                bool b_autoscale = var_GetBool( p_vout, "autoscale" );
+                if( b_autoscale )
+                {
+                    DisplayMessage( p_vout, _("Original Size") );
+                    var_SetBool( p_vout, "autoscale", false );
+                    var_SetFloat( p_vout, "zoom", 1.f );
+                    break;
+                }
+
                 vlc_value_t val={0}, val_list, text_list;
                 var_Get( p_vout, "zoom", &val );
                 if( var_Change( p_vout, "zoom", VLC_VAR_GETCHOICES,



More information about the vlc-commits mailing list