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
58841098
Commit
58841098
authored
Oct 15, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: compilation fix for 10.5 and 10.6
parent
3f82ec23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
modules/gui/macosx/CompatibilityFixes.h
modules/gui/macosx/CompatibilityFixes.h
+3
-7
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+6
-2
No files found.
modules/gui/macosx/CompatibilityFixes.h
View file @
58841098
...
...
@@ -80,13 +80,6 @@ extern OSErr UpdateSystemActivity(UInt8 activity);
-
(
NSArray
*
)
pathComponents
;
@end
IOReturn
IOPMAssertionCreateWithName
(
CFStringRef
AssertionType
,
IOPMAssertionLevel
AssertionLevel
,
CFStringRef
AssertionName
,
IOPMAssertionID
*
AssertionID
);
#define kIOPMAssertionTypePreventUserIdleDisplaySleep CFSTR("PreventUserIdleDisplaySleep");
#define kIOPMAssertionTypePreventUserIdleSystemSleep CFSTR("PreventUserIdleSystemSleep");
#endif
#pragma mark -
...
...
@@ -116,4 +109,7 @@ enum {
-
(
BOOL
)
isDirectionInvertedFromDevice
;
@end
#define kIOPMAssertionTypePreventUserIdleDisplaySleep CFSTR("PreventUserIdleDisplaySleep")
#define kIOPMAssertionTypePreventUserIdleSystemSleep CFSTR("PreventUserIdleSystemSleep")
#endif
modules/gui/macosx/intf.m
View file @
58841098
...
...
@@ -1598,8 +1598,9 @@ unsigned int CocoaKeyToVLC( unichar i_key )
systemSleepAssertionID
=
0
;
}
#ifdef __x86_64__
/* prevent the system from sleeping using the 10.5 API to be as compatible as possible */
/* work-around a bug in 10.7.4 and 10.7.5, so check for 10.7.x < 10.7.4
, 10.8 and 10.6
*/
/* work-around a bug in 10.7.4 and 10.7.5, so check for 10.7.x < 10.7.4
and 10.8
*/
if
((
NSAppKitVersionNumber
>=
1115
.
2
&&
NSAppKitVersionNumber
<
1138
.
45
)
||
OSX_MOUNTAIN_LION
)
{
CFStringRef
reasonForActivity
=
CFStringCreateWithCString
(
kCFAllocatorDefault
,
"VLC media playback"
,
kCFStringEncodingUTF8
);
if
([
self
activeVideoPlayback
])
{
...
...
@@ -1611,12 +1612,15 @@ unsigned int CocoaKeyToVLC( unichar i_key )
}
CFRelease
(
reasonForActivity
);
}
else
{
/* fall-back on the 10.5 mode, which also works on 10.7.4 and 10.7.5 */
#endif
/* fall-back on the 10.5 mode, which also works on 10.6, 10.7.4 and 10.7.5 */
if
([
self
activeVideoPlayback
])
success
=
IOPMAssertionCreate
(
kIOPMAssertionTypeNoDisplaySleep
,
kIOPMAssertionLevelOn
,
&
systemSleepAssertionID
);
else
success
=
IOPMAssertionCreate
(
kIOPMAssertionTypeNoIdleSleep
,
kIOPMAssertionLevelOn
,
&
systemSleepAssertionID
);
#ifdef __x86_64__
}
#endif
if
(
success
==
kIOReturnSuccess
)
msg_Dbg
(
VLCIntf
,
"prevented sleep through IOKit (%i)"
,
systemSleepAssertionID
);
...
...
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