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
4b2e143f
Commit
4b2e143f
authored
Jun 12, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vout_macosx: restore compilation support for OS X 10.5 and 10.6
parent
405a83cd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
modules/video_output/macosx.m
modules/video_output/macosx.m
+16
-5
No files found.
modules/video_output/macosx.m
View file @
4b2e143f
...
...
@@ -53,6 +53,17 @@
-
(
BOOL
)
isFullscreen
;
@end
/* compilation support for 10.5 and 10.6 */
#define OSX_LION NSAppKitVersionNumber >= 1115.2
#ifndef MAC_OS_X_VERSION_10_7
@interface
NSView
(
IntroducedInLion
)
-
(
NSRect
)
convertRectToBacking
:(
NSRect
)
aRect
;
-
(
void
)
setWantsBestResolutionOpenGLSurface
:(
BOOL
)
aBool
;
@endif
#endif
/**
* Forward declarations
*/
...
...
@@ -391,7 +402,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
{
NSRect
bounds
;
/* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
if
(
[
sys
->
glView
respondsToSelector
:
@selector
(
convertRectToBacking
:)]
)
if
(
OSX_LION
)
bounds
=
[
sys
->
glView
convertRectToBacking
:[
sys
->
glView
bounds
]];
else
bounds
=
[
sys
->
glView
bounds
];
...
...
@@ -512,7 +523,7 @@ static void OpenglSwap (vlc_gl_t *gl)
return
nil
;
/* enable HiDPI support on OS X 10.7 and later */
if
(
[
self
respondsToSelector
:
@selector
(
setWantsBestResolutionOpenGLSurface
:)]
)
if
(
OSX_LION
)
[
self
setWantsBestResolutionOpenGLSurface
:
YES
];
/* Swap buffers only during the vertical retrace of the monitor.
...
...
@@ -533,7 +544,7 @@ static void OpenglSwap (vlc_gl_t *gl)
NSView
*
parentView
=
[
value
pointerValue
];
NSRect
frame
;
/* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
if
(
[
parentView
respondsToSelector
:
@selector
(
convertRectToBacking
:)]
)
if
(
OSX_LION
)
frame
=
[
parentView
convertRectToBacking
:[
parentView
bounds
]];
else
frame
=
[
parentView
bounds
];
...
...
@@ -635,7 +646,7 @@ static void OpenglSwap (vlc_gl_t *gl)
NSRect
bounds
;
/* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
if
(
[
self
respondsToSelector
:
@selector
(
convertRectToBacking
:)]
)
if
(
OSX_LION
)
bounds
=
[
self
convertRectToBacking
:[
self
bounds
]];
else
bounds
=
[
self
bounds
];
...
...
@@ -773,7 +784,7 @@ static void OpenglSwap (vlc_gl_t *gl)
BOOL
b_inside
;
/* on HiDPI displays, the point bounds don't equal the actual pixel based bounds */
if
(
[
self
respondsToSelector
:
@selector
(
convertRectToBacking
:)]
)
if
(
OSX_LION
)
s_rect
=
[
self
convertRectToBacking
:[
self
bounds
]];
else
s_rect
=
[
self
bounds
];
...
...
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