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
d170f05e
Commit
d170f05e
authored
Dec 20, 2012
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Dec 20, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps.drv: Ignore requested resolutions not supported by device.
parent
d5f27e19
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
6 deletions
+29
-6
init.c
dlls/wineps.drv/init.c
+29
-6
No files found.
dlls/wineps.drv/init.c
View file @
d170f05e
...
...
@@ -151,20 +151,43 @@ BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved )
static
void
PSDRV_UpdateDevCaps
(
PSDRV_PDEVICE
*
physDev
)
{
PAGESIZE
*
page
;
INT
width
=
0
,
height
=
0
;
RESOLUTION
*
res
;
INT
width
=
0
,
height
=
0
,
resx
=
0
,
resy
=
0
;
if
(
physDev
->
Devmode
->
dmPublic
.
dmFields
&
DM_PRINTQUALITY
)
if
(
physDev
->
Devmode
->
dmPublic
.
dmFields
&
(
DM_PRINTQUALITY
|
DM_YRESOLUTION
|
DM_LOGPIXELS
)
)
{
physDev
->
logPixelsX
=
physDev
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmPrintQuality
;
physDev
->
logPixelsY
=
physDev
->
logPixelsX
;
if
(
physDev
->
Devmode
->
dmPublic
.
dmFields
&
DM_PRINTQUALITY
)
resx
=
resy
=
physDev
->
Devmode
->
dmPublic
.
u1
.
s1
.
dmPrintQuality
;
if
(
physDev
->
Devmode
->
dmPublic
.
dmFields
&
DM_YRESOLUTION
)
resy
=
physDev
->
Devmode
->
dmPublic
.
dmYResolution
;
if
(
physDev
->
Devmode
->
dmPublic
.
dmFields
&
DM_LOGPIXELS
)
resx
=
resy
=
physDev
->
Devmode
->
dmPublic
.
dmLogPixels
;
LIST_FOR_EACH_ENTRY
(
res
,
&
physDev
->
pi
->
ppd
->
Resolutions
,
RESOLUTION
,
entry
)
{
if
(
res
->
resx
==
resx
&&
res
->
resy
==
resy
)
{
physDev
->
logPixelsX
=
resx
;
physDev
->
logPixelsY
=
resy
;
break
;
}
}
if
(
&
res
->
entry
==
&
physDev
->
pi
->
ppd
->
Resolutions
)
{
WARN
(
"Requested resolution %dx%d is not supported by device
\n
"
,
resx
,
resy
);
physDev
->
logPixelsX
=
physDev
->
pi
->
ppd
->
DefaultResolution
;
physDev
->
logPixelsY
=
physDev
->
logPixelsX
;
}
}
else
{
WARN
(
"Using default device resolution %d
\n
"
,
physDev
->
pi
->
ppd
->
DefaultResolution
);
physDev
->
logPixelsX
=
physDev
->
pi
->
ppd
->
DefaultResolution
;
physDev
->
logPixelsY
=
physDev
->
logPixelsX
;
}
if
(
physDev
->
Devmode
->
dmPublic
.
dmFields
&
DM_YRESOLUTION
)
physDev
->
logPixelsY
=
physDev
->
Devmode
->
dmPublic
.
dmYResolution
;
if
(
physDev
->
Devmode
->
dmPublic
.
dmFields
&
DM_PAPERSIZE
)
{
LIST_FOR_EACH_ENTRY
(
page
,
&
physDev
->
pi
->
ppd
->
PageSizes
,
PAGESIZE
,
entry
)
{
...
...
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