Commit fde88311 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Global Hotkeys: simplify and clean code

parent 59f25dc0
...@@ -290,19 +290,18 @@ LRESULT CALLBACK WMHOTKEYPROC( HWND hwnd, UINT uMsg, WPARAM wParam, ...@@ -290,19 +290,18 @@ LRESULT CALLBACK WMHOTKEYPROC( HWND hwnd, UINT uMsg, WPARAM wParam,
{ {
case WM_HOTKEY: case WM_HOTKEY:
{ {
int i;
char psz_atomName[40]; char psz_atomName[40];
intf_thread_t *p_intf = intf_thread_t *p_intf =
(intf_thread_t*)GetWindowLongPtr( hwnd, GWLP_USERDATA ); (intf_thread_t*)GetWindowLongPtr( hwnd, GWLP_USERDATA );
struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys; struct hotkey *p_hotkeys = p_intf->p_libvlc->p_hotkeys;
i = GlobalGetAtomNameA( if( !GlobalGetAtomNameA(
wParam, psz_atomName, sizeof( psz_atomName ) ); wParam, psz_atomName, sizeof( psz_atomName ) ) )
if( !i ) return 0; return 0;
/* search for key associated with VLC */ /* search for key associated with VLC */
for( i = 0; p_hotkeys[i].psz_action != NULL; i++ ) for( int i = 0; p_hotkeys[i].psz_action != NULL; i++ )
{ {
if( strcmp( p_hotkeys[i].psz_action, psz_atomName ) ) if( strcmp( p_hotkeys[i].psz_action, psz_atomName ) )
continue; continue;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment