Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
1fe559b7
Commit
1fe559b7
authored
May 19, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: wait until the app finished launching to init SPMediaKeyTap
parent
e6978351
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+10
-10
No files found.
modules/gui/macosx/intf.m
View file @
1fe559b7
...
...
@@ -547,16 +547,6 @@ static VLCMain *_o_sharedMainInstance = nil;
[
o_remote
setClickCountEnabledButtons
:
kRemoteButtonPlay
];
[
o_remote
setDelegate
:
_o_sharedMainInstance
];
/* init media key support */
o_mediaKeyController
=
[[
SPMediaKeyTap
alloc
]
initWithDelegate
:
self
];
b_mediaKeySupport
=
config_GetInt
(
VLCIntf
,
"macosx-mediakeys"
);
[
o_mediaKeyController
startWatchingMediaKeys
];
[
o_mediaKeyController
setShouldInterceptMediaKeyEvents
:
b_mediaKeySupport
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
coreChangedMediaKeySupportSetting
:
)
name
:
@"VLCMediaKeySupportSettingChanged"
object
:
nil
];
[[
NSUserDefaults
standardUserDefaults
]
registerDefaults
:[
NSDictionary
dictionaryWithObjectsAndKeys
:
[
SPMediaKeyTap
defaultMediaKeyUserBundleIdentifiers
],
kMediaKeyUsingBundleIdentifiersDefaultsKey
,
nil
]];
/* yeah, we are done */
nib_main_loaded
=
TRUE
;
}
...
...
@@ -583,6 +573,16 @@ static VLCMain *_o_sharedMainInstance = nil;
{
if
(
!
p_intf
)
return
;
/* init media key support */
o_mediaKeyController
=
[[
SPMediaKeyTap
alloc
]
initWithDelegate
:
self
];
b_mediaKeySupport
=
config_GetInt
(
VLCIntf
,
"macosx-mediakeys"
);
[
o_mediaKeyController
startWatchingMediaKeys
];
[
o_mediaKeyController
setShouldInterceptMediaKeyEvents
:
b_mediaKeySupport
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
coreChangedMediaKeySupportSetting
:
)
name
:
@"VLCMediaKeySupportSettingChanged"
object
:
nil
];
[[
NSUserDefaults
standardUserDefaults
]
registerDefaults
:[
NSDictionary
dictionaryWithObjectsAndKeys
:
[
SPMediaKeyTap
defaultMediaKeyUserBundleIdentifiers
],
kMediaKeyUsingBundleIdentifiersDefaultsKey
,
nil
]];
[
self
_removeOldPreferences
];
/* Handle sleep notification */
...
...
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