]> git.sesse.net Git - vlc/commitdiff
Win32 global hotkeys: vlc_GetActionId() needs "key-" prefix
authorHannes Domani <ssbssa@yahoo.de>
Tue, 27 Dec 2011 19:02:11 +0000 (20:02 +0100)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 27 Dec 2011 20:02:16 +0000 (21:02 +0100)
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
modules/control/globalhotkeys/win32.c

index 055b32a6ecb438d2ac178a24427eeddfc610fddb..62ab7a547c7870972224d865faf235ef2c866e14 100644 (file)
@@ -294,13 +294,15 @@ LRESULT CALLBACK WMHOTKEYPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
     {
         case WM_HOTKEY:
             {
-                char psz_atomName[40];
+                char psz_atomName[44];
 
                 LONG_PTR ret = GetWindowLongPtr( hwnd, GWLP_USERDATA );
                 intf_thread_t *p_intf = (intf_thread_t*)ret;
+                strcpy( psz_atomName, "key-" );
 
                 if( !GlobalGetAtomNameA(
-                        wParam, psz_atomName, sizeof( psz_atomName ) ) )
+                        wParam, psz_atomName + 4,
+                        sizeof( psz_atomName ) - 4 ) )
                     return 0;
 
                 /* search for key associated with VLC */