Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d99f6821
Commit
d99f6821
authored
Sep 05, 2018
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Don't return screen resolution on printer devices.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
fc62dac4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
driver.c
dlls/gdi32/driver.c
+2
-2
dc.c
dlls/gdi32/tests/dc.c
+6
-0
No files found.
dlls/gdi32/driver.c
View file @
d99f6821
...
@@ -355,7 +355,7 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
...
@@ -355,7 +355,7 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
case
SCALINGFACTORY
:
return
0
;
case
SCALINGFACTORY
:
return
0
;
case
VREFRESH
:
return
GetDeviceCaps
(
dev
->
hdc
,
TECHNOLOGY
)
==
DT_RASDISPLAY
?
1
:
0
;
case
VREFRESH
:
return
GetDeviceCaps
(
dev
->
hdc
,
TECHNOLOGY
)
==
DT_RASDISPLAY
?
1
:
0
;
case
DESKTOPHORZRES
:
case
DESKTOPHORZRES
:
if
(
pGetSystemMetrics
)
if
(
GetDeviceCaps
(
dev
->
hdc
,
TECHNOLOGY
)
==
DT_RASDISPLAY
&&
pGetSystemMetrics
)
{
{
DPI_AWARENESS_CONTEXT
context
;
DPI_AWARENESS_CONTEXT
context
;
UINT
ret
;
UINT
ret
;
...
@@ -366,7 +366,7 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
...
@@ -366,7 +366,7 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
}
}
return
GetDeviceCaps
(
dev
->
hdc
,
HORZRES
);
return
GetDeviceCaps
(
dev
->
hdc
,
HORZRES
);
case
DESKTOPVERTRES
:
case
DESKTOPVERTRES
:
if
(
pGetSystemMetrics
)
if
(
GetDeviceCaps
(
dev
->
hdc
,
TECHNOLOGY
)
==
DT_RASDISPLAY
&&
pGetSystemMetrics
)
{
{
DPI_AWARENESS_CONTEXT
context
;
DPI_AWARENESS_CONTEXT
context
;
UINT
ret
;
UINT
ret
;
...
...
dlls/gdi32/tests/dc.c
View file @
d99f6821
...
@@ -471,6 +471,12 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
...
@@ -471,6 +471,12 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
}
}
else
else
{
{
ok
(
GetDeviceCaps
(
ref_dc
,
DESKTOPHORZRES
)
==
GetDeviceCaps
(
ref_dc
,
HORZRES
),
"Got DESKTOPHORZRES %d on %s, expected %d
\n
"
,
GetDeviceCaps
(
ref_dc
,
DESKTOPHORZRES
),
descr
,
GetDeviceCaps
(
ref_dc
,
HORZRES
));
ok
(
GetDeviceCaps
(
ref_dc
,
DESKTOPVERTRES
)
==
GetDeviceCaps
(
ref_dc
,
VERTRES
),
"Got DESKTOPVERTRES %d on %s, expected %d
\n
"
,
GetDeviceCaps
(
ref_dc
,
DESKTOPVERTRES
),
descr
,
GetDeviceCaps
(
ref_dc
,
VERTRES
));
SetRect
(
&
ref_rect
,
0
,
0
,
GetDeviceCaps
(
ref_dc
,
DESKTOPHORZRES
),
SetRect
(
&
ref_rect
,
0
,
0
,
GetDeviceCaps
(
ref_dc
,
DESKTOPHORZRES
),
GetDeviceCaps
(
ref_dc
,
DESKTOPVERTRES
)
);
GetDeviceCaps
(
ref_dc
,
DESKTOPVERTRES
)
);
}
}
...
...
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