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
f0ad5b5c
Commit
f0ad5b5c
authored
Aug 23, 2018
by
Ken Thomases
Committed by
Alexandre Julliard
Aug 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winemac: Use fallback implementation for screen dimensions in GetDeviceCaps().
Signed-off-by:
Ken Thomases
<
ken@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
68075cf7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
33 deletions
+6
-33
gdi.c
dlls/winemac.drv/gdi.c
+6
-33
No files found.
dlls/winemac.drv/gdi.c
View file @
f0ad5b5c
...
...
@@ -42,10 +42,6 @@ static inline MACDRV_PDEVICE *get_macdrv_dev(PHYSDEV dev)
static
CGRect
desktop_rect
;
/* virtual desktop rectangle */
static
int
horz_size
;
/* horz. size of screen in millimeters */
static
int
vert_size
;
/* vert. size of screen in millimeters */
static
int
horz_res
;
/* width in pixels of screen */
static
int
vert_res
;
/* height in pixels of screen */
static
int
desktop_horz_res
;
/* width in pixels of virtual desktop */
static
int
desktop_vert_res
;
/* height in pixels of virtual desktop */
static
int
bits_per_pixel
;
/* pixel depth of screen */
static
int
device_data_valid
;
/* do the above variables have up-to-date values? */
...
...
@@ -133,9 +129,6 @@ static void device_init(void)
{
CFStringRef
pixelEncoding
=
CGDisplayModeCopyPixelEncoding
(
mode
);
horz_res
=
CGDisplayModeGetWidth
(
mode
);
vert_res
=
CGDisplayModeGetHeight
(
mode
);
if
(
pixelEncoding
)
{
if
(
CFEqual
(
pixelEncoding
,
CFSTR
(
IO32BitDirectPixels
)))
...
...
@@ -149,21 +142,8 @@ static void device_init(void)
CGDisplayModeRelease
(
mode
);
}
else
{
horz_res
=
CGDisplayPixelsWide
(
mainDisplay
);
vert_res
=
CGDisplayPixelsHigh
(
mainDisplay
);
}
if
(
retina_on
)
{
horz_res
*=
2
;
vert_res
*=
2
;
}
compute_desktop_rect
();
desktop_horz_res
=
desktop_rect
.
size
.
width
;
desktop_vert_res
=
desktop_rect
.
size
.
height
;
device_data_valid
=
TRUE
;
}
...
...
@@ -260,25 +240,18 @@ static INT macdrv_GetDeviceCaps(PHYSDEV dev, INT cap)
case
VERTSIZE
:
ret
=
vert_size
;
break
;
case
HORZRES
:
ret
=
horz_res
;
break
;
case
VERTRES
:
ret
=
vert_res
;
break
;
case
DESKTOPHORZRES
:
ret
=
desktop_horz_res
;
break
;
case
DESKTOPVERTRES
:
ret
=
desktop_vert_res
;
break
;
case
BITSPIXEL
:
ret
=
bits_per_pixel
;
break
;
case
HORZRES
:
case
VERTRES
:
default:
LeaveCriticalSection
(
&
device_data_section
);
dev
=
GET_NEXT_PHYSDEV
(
dev
,
pGetDeviceCaps
);
return
dev
->
funcs
->
pGetDeviceCaps
(
dev
,
cap
);
ret
=
dev
->
funcs
->
pGetDeviceCaps
(
dev
,
cap
);
if
((
cap
==
HORZRES
||
cap
==
VERTRES
)
&&
retina_on
)
ret
*=
2
;
return
ret
;
}
TRACE
(
"cap %d -> %d
\n
"
,
cap
,
ret
);
...
...
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