Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
fcd2a5f5
Commit
fcd2a5f5
authored
May 11, 2023
by
Brendan Shanks
Committed by
Alexandre Julliard
May 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Centralize setting retina-mode-dependent properties on WineContentView's layer.
parent
0576c636
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
cocoa_window.m
dlls/winemac.drv/cocoa_window.m
+9
-6
No files found.
dlls/winemac.drv/cocoa_window.m
View file @
fcd2a5f5
...
...
@@ -475,9 +475,7 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
if
(
self
)
{
[
self
setWantsLayer
:
YES
];
[
self
layer
].
minificationFilter
=
retina_on
?
kCAFilterLinear
:
kCAFilterNearest
;
[
self
layer
].
magnificationFilter
=
retina_on
?
kCAFilterLinear
:
kCAFilterNearest
;
[
self
layer
].
contentsScale
=
retina_on
?
2
.
0
:
1
.
0
;
[
self
setLayerRetinaProperties
:
retina_on
];
[
self
setAutoresizesSubviews
:
NO
];
}
return
self
;
...
...
@@ -677,6 +675,13 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
return
_metalView
;
}
-
(
void
)
setLayerRetinaProperties
:
(
int
)
mode
{
[
self
layer
].
contentsScale
=
mode
?
2
.
0
:
1
.
0
;
[
self
layer
].
minificationFilter
=
mode
?
kCAFilterLinear
:
kCAFilterNearest
;
[
self
layer
].
magnificationFilter
=
mode
?
kCAFilterLinear
:
kCAFilterNearest
;
}
-
(
void
)
setRetinaMode
:
(
int
)
mode
{
double
scale
=
mode
?
0
.
5
:
2
.
0
;
...
...
@@ -688,10 +693,8 @@ static CVReturn WineDisplayLinkCallback(CVDisplayLinkRef displayLink, const CVTi
[
self
setFrame
:
frame
];
[
self
setWantsBestResolutionOpenGLSurface
:
mode
];
[
self
updateGLContexts
];
[
self
setLayerRetinaProperties
:
mode
];
[
self
layer
].
contentsScale
=
mode
?
2
.
0
:
1
.
0
;
[
self
layer
].
minificationFilter
=
mode
?
kCAFilterLinear
:
kCAFilterNearest
;
[
self
layer
].
magnificationFilter
=
mode
?
kCAFilterLinear
:
kCAFilterNearest
;
[
super
setRetinaMode
:
mode
];
}
...
...
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