[vlc-devel] [PATCH 21/22] globalhotkeys/win32: use vlc_actions_do

Hugo Beauzée-Luyssen hugo at beauzee.fr
Thu Aug 3 15:10:54 CEST 2017


From: Thomas Guillem <thomas at gllm.fr>

---
 modules/control/globalhotkeys/win32.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/modules/control/globalhotkeys/win32.c b/modules/control/globalhotkeys/win32.c
index c3b02e642a..b0fe5b7a07 100644
--- a/modules/control/globalhotkeys/win32.c
+++ b/modules/control/globalhotkeys/win32.c
@@ -299,12 +299,7 @@ LRESULT CALLBACK WMHOTKEYPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
 
                 /* search for key associated with VLC */
                 vlc_action_id_t action = vlc_actions_get_id( psz_atomName );
-                if( action != ACTIONID_NONE )
-                {
-                    var_SetInteger( p_intf->obj.libvlc,
-                            "key-action", action );
-                    return 1;
-                }
+                return vlc_actions_do( p_intf, action, true ) == VLC_SUCCESS ? 1 : 0;
             }
             break;
 
-- 
2.11.0



More information about the vlc-devel mailing list