Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
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
Commits
e34ebba5
Commit
e34ebba5
authored
Apr 14, 2007
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mac OS X gui: Pause playback when going to sleep.
parent
aefd2b47
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
0 deletions
+16
-0
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+16
-0
No files found.
modules/gui/macosx/intf.m
View file @
e34ebba5
...
@@ -745,6 +745,10 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -745,6 +745,10 @@ static VLCMain *_o_sharedMainInstance = nil;
if
([
o_update
shouldCheckForUpdate
])
if
([
o_update
shouldCheckForUpdate
])
[
NSThread
detachNewThreadSelector
:
@selector
(
checkForUpdate
)
toTarget
:
o_update
withObject
:
NULL
];
[
NSThread
detachNewThreadSelector
:
@selector
(
checkForUpdate
)
toTarget
:
o_update
withObject
:
NULL
];
/* Handle sleep notification */
[[[
NSWorkspace
sharedWorkspace
]
notificationCenter
]
addObserver
:
self
selector
:
@selector
(
computerWillSleep
:
)
name:
NSWorkspaceWillSleepNotification
object
:
nil
];
}
}
/* Listen to the remote in exclusive mode, only when VLC is the active
/* Listen to the remote in exclusive mode, only when VLC is the active
...
@@ -758,6 +762,18 @@ static VLCMain *_o_sharedMainInstance = nil;
...
@@ -758,6 +762,18 @@ static VLCMain *_o_sharedMainInstance = nil;
[
o_remote
stopListening
:
self
];
[
o_remote
stopListening
:
self
];
}
}
/* Triggered when the computer goes to sleep */
-
(
void
)
computerWillSleep
:
(
NSNotification
*
)
notification
{
/* Pause */
if
(
p_intf
->
p_sys
->
i_play_status
==
PLAYING_S
)
{
vlc_value_t
val
;
val
.
i_int
=
config_GetInt
(
p_intf
,
"key-play-pause"
);
var_Set
(
p_intf
->
p_libvlc
,
"key-pressed"
,
val
);
}
}
/* Helper method for the remote control interface in order to trigger forward/backward and volume
/* Helper method for the remote control interface in order to trigger forward/backward and volume
increase/decrease as long as the user holds the left/right, plus/minus button */
increase/decrease as long as the user holds the left/right, plus/minus button */
-
(
void
)
executeHoldActionForRemoteButton
:
(
NSNumber
*
)
buttonIdentifierNumber
-
(
void
)
executeHoldActionForRemoteButton
:
(
NSNumber
*
)
buttonIdentifierNumber
...
...
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