Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-gpu
Commits
9bf47274
Commit
9bf47274
authored
Feb 19, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Win32 global hotkeys: update to key items as strings
parent
fe4273de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
11 deletions
+13
-11
modules/control/globalhotkeys/win32.c
modules/control/globalhotkeys/win32.c
+13
-11
No files found.
modules/control/globalhotkeys/win32.c
View file @
9bf47274
...
@@ -130,9 +130,6 @@ static void Close( vlc_object_t *p_this )
...
@@ -130,9 +130,6 @@ static void Close( vlc_object_t *p_this )
static
void
*
Thread
(
void
*
p_data
)
static
void
*
Thread
(
void
*
p_data
)
{
{
MSG
message
;
MSG
message
;
UINT
i_key
,
i_keyMod
,
i_vk
;
ATOM
atom
;
char
*
psz_hotkey
=
NULL
;
intf_thread_t
*
p_intf
=
p_data
;
intf_thread_t
*
p_intf
=
p_data
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
...
@@ -172,14 +169,19 @@ static void *Thread( void *p_data )
...
@@ -172,14 +169,19 @@ static void *Thread( void *p_data )
p_hotkey
->
psz_action
!=
NULL
;
p_hotkey
->
psz_action
!=
NULL
;
p_hotkey
++
)
p_hotkey
++
)
{
{
if
(
asprintf
(
&
psz_hotkey
,
"global-%s"
,
p_hotkey
->
psz_action
)
<
0
)
char
varname
[
12
+
strlen
(
p_hotkey
->
psz_action
)];
break
;
sprintf
(
varname
,
"global-key-%s"
,
p_hotkey
->
psz_action
)
;
i_key
=
var_InheritInteger
(
p_intf
,
psz_hotkey
);
char
*
key
=
var_InheritString
(
p_intf
,
varname
);
if
(
key
==
NULL
)
continue
;
free
(
psz_hotkey
);
UINT
i_key
=
vlc_str2keycode
(
key
);
free
(
key
);
if
(
i_key
==
KEY_UNSET
)
continue
;
i_keyMod
=
0
;
UINT
i_keyMod
=
0
;
if
(
i_key
&
KEY_MODIFIER_SHIFT
)
i_keyMod
|=
MOD_SHIFT
;
if
(
i_key
&
KEY_MODIFIER_SHIFT
)
i_keyMod
|=
MOD_SHIFT
;
if
(
i_key
&
KEY_MODIFIER_ALT
)
i_keyMod
|=
MOD_ALT
;
if
(
i_key
&
KEY_MODIFIER_ALT
)
i_keyMod
|=
MOD_ALT
;
if
(
i_key
&
KEY_MODIFIER_CTRL
)
i_keyMod
|=
MOD_CONTROL
;
if
(
i_key
&
KEY_MODIFIER_CTRL
)
i_keyMod
|=
MOD_CONTROL
;
...
@@ -206,7 +208,7 @@ static void *Thread( void *p_data )
...
@@ -206,7 +208,7 @@ static void *Thread( void *p_data )
#define VK_PAGEDOWN 0x22
#define VK_PAGEDOWN 0x22
#endif
#endif
i_vk
=
0
;
UINT
i_vk
=
0
;
switch
(
i_key
&
~
KEY_MODIFIER
)
switch
(
i_key
&
~
KEY_MODIFIER
)
{
{
HANDLE
(
LEFT
);
HANDLE
(
LEFT
);
...
@@ -250,7 +252,7 @@ static void *Thread( void *p_data )
...
@@ -250,7 +252,7 @@ static void *Thread( void *p_data )
#undef HANDLE
#undef HANDLE
#undef HANDLE2
#undef HANDLE2
atom
=
GlobalAddAtomA
(
p_hotkey
->
psz_action
);
ATOM
atom
=
GlobalAddAtomA
(
p_hotkey
->
psz_action
);
if
(
!
atom
)
continue
;
if
(
!
atom
)
continue
;
if
(
!
RegisterHotKey
(
p_sys
->
hotkeyWindow
,
atom
,
i_keyMod
,
i_vk
)
)
if
(
!
RegisterHotKey
(
p_sys
->
hotkeyWindow
,
atom
,
i_keyMod
,
i_vk
)
)
...
@@ -266,7 +268,7 @@ static void *Thread( void *p_data )
...
@@ -266,7 +268,7 @@ static void *Thread( void *p_data )
p_hotkey
->
psz_action
!=
NULL
;
p_hotkey
->
psz_action
!=
NULL
;
p_hotkey
++
)
p_hotkey
++
)
{
{
atom
=
GlobalFindAtomA
(
p_hotkey
->
psz_action
);
ATOM
atom
=
GlobalFindAtomA
(
p_hotkey
->
psz_action
);
if
(
!
atom
)
continue
;
if
(
!
atom
)
continue
;
if
(
UnregisterHotKey
(
p_sys
->
hotkeyWindow
,
atom
)
)
if
(
UnregisterHotKey
(
p_sys
->
hotkeyWindow
,
atom
)
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment