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
5b166890
Commit
5b166890
authored
May 09, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
May 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Use standard DEVMODEW structure instead of PSDRV_DEVMODE when possible.
parent
91939284
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
169 additions
and
168 deletions
+169
-168
driver.c
dlls/wineps.drv/driver.c
+71
-71
init.c
dlls/wineps.drv/init.c
+13
-11
printproc.c
dlls/wineps.drv/printproc.c
+1
-2
ps.c
dlls/wineps.drv/ps.c
+3
-3
psdrv.h
dlls/wineps.drv/psdrv.h
+5
-5
unixlib.c
dlls/wineps.drv/unixlib.c
+76
-76
No files found.
dlls/wineps.drv/driver.c
View file @
5b166890
...
...
@@ -58,32 +58,32 @@ static inline int paper_size_from_points( float size )
return
size
*
254
/
72
;
}
INPUTSLOT
*
find_slot
(
PPD
*
ppd
,
const
PSDRV_DEVMODE
*
dm
)
INPUTSLOT
*
find_slot
(
PPD
*
ppd
,
const
DEVMODEW
*
dm
)
{
INPUTSLOT
*
slot
;
LIST_FOR_EACH_ENTRY
(
slot
,
&
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
if
(
slot
->
WinBin
==
dm
->
dm
Public
.
dm
DefaultSource
)
if
(
slot
->
WinBin
==
dm
->
dmDefaultSource
)
return
slot
;
return
NULL
;
}
PAGESIZE
*
find_pagesize
(
PPD
*
ppd
,
const
PSDRV_DEVMODE
*
dm
)
PAGESIZE
*
find_pagesize
(
PPD
*
ppd
,
const
DEVMODEW
*
dm
)
{
PAGESIZE
*
page
;
LIST_FOR_EACH_ENTRY
(
page
,
&
ppd
->
PageSizes
,
PAGESIZE
,
entry
)
if
(
page
->
WinPage
==
dm
->
dmP
ublic
.
dmP
aperSize
)
if
(
page
->
WinPage
==
dm
->
dmPaperSize
)
return
page
;
return
NULL
;
}
DUPLEX
*
find_duplex
(
PPD
*
ppd
,
const
PSDRV_DEVMODE
*
dm
)
DUPLEX
*
find_duplex
(
PPD
*
ppd
,
const
DEVMODEW
*
dm
)
{
DUPLEX
*
duplex
;
WORD
win_duplex
=
dm
->
dm
Public
.
dmFields
&
DM_DUPLEX
?
dm
->
dmPublic
.
dmDuplex
:
0
;
WORD
win_duplex
=
dm
->
dm
Fields
&
DM_DUPLEX
?
dm
->
dmDuplex
:
0
;
if
(
win_duplex
==
0
)
return
NULL
;
/* Not capable */
...
...
@@ -101,12 +101,12 @@ DUPLEX *find_duplex( PPD *ppd, const PSDRV_DEVMODE *dm )
* Updates dm1 with some fields from dm2
*
*/
void
PSDRV_MergeDevmodes
(
PSDRV_DEVMODE
*
dm1
,
const
PSDRV_DEVMODE
*
dm2
,
PRINTERINFO
*
pi
)
void
PSDRV_MergeDevmodes
(
PSDRV_DEVMODE
*
dm1
,
const
DEVMODEW
*
dm2
,
PRINTERINFO
*
pi
)
{
/* some sanity checks here on dm2 */
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_ORIENTATION
)
{
dm1
->
dmPublic
.
dmOrientation
=
dm2
->
dm
Public
.
dm
Orientation
;
if
(
dm2
->
dmFields
&
DM_ORIENTATION
)
{
dm1
->
dmPublic
.
dmOrientation
=
dm2
->
dmOrientation
;
TRACE
(
"Changing orientation to %d (%s)
\n
"
,
dm1
->
dmPublic
.
dmOrientation
,
dm1
->
dmPublic
.
dmOrientation
==
DMORIENT_PORTRAIT
?
...
...
@@ -116,13 +116,13 @@ void PSDRV_MergeDevmodes( PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2, PRINTERI
}
/* NB PaperWidth is always < PaperLength */
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PAPERSIZE
)
if
(
dm2
->
dmFields
&
DM_PAPERSIZE
)
{
PAGESIZE
*
page
=
find_pagesize
(
pi
->
ppd
,
dm2
);
if
(
page
)
{
dm1
->
dmPublic
.
dmPaperSize
=
dm2
->
dmP
ublic
.
dmP
aperSize
;
dm1
->
dmPublic
.
dmPaperSize
=
dm2
->
dmPaperSize
;
dm1
->
dmPublic
.
dmPaperWidth
=
paper_size_from_points
(
page
->
PaperDimension
->
x
);
dm1
->
dmPublic
.
dmPaperLength
=
paper_size_from_points
(
page
->
PaperDimension
->
y
);
dm1
->
dmPublic
.
dmFields
|=
DM_PAPERSIZE
|
DM_PAPERWIDTH
|
DM_PAPERLENGTH
;
...
...
@@ -137,19 +137,19 @@ void PSDRV_MergeDevmodes( PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2, PRINTERI
}
}
else
TRACE
(
"Trying to change to unsupported pagesize %d
\n
"
,
dm2
->
dmP
ublic
.
dmP
aperSize
);
TRACE
(
"Trying to change to unsupported pagesize %d
\n
"
,
dm2
->
dmPaperSize
);
}
else
if
((
dm2
->
dm
Public
.
dm
Fields
&
DM_PAPERLENGTH
)
&&
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PAPERWIDTH
))
{
dm1
->
dmPublic
.
dmPaperLength
=
dm2
->
dmP
ublic
.
dmP
aperLength
;
dm1
->
dmPublic
.
dmPaperWidth
=
dm2
->
dmP
ublic
.
dmP
aperWidth
;
else
if
((
dm2
->
dmFields
&
DM_PAPERLENGTH
)
&&
(
dm2
->
dmFields
&
DM_PAPERWIDTH
))
{
dm1
->
dmPublic
.
dmPaperLength
=
dm2
->
dmPaperLength
;
dm1
->
dmPublic
.
dmPaperWidth
=
dm2
->
dmPaperWidth
;
TRACE
(
"Changing PaperLength|Width to %dx%d
\n
"
,
dm2
->
dmP
ublic
.
dmP
aperLength
,
dm2
->
dmP
ublic
.
dmP
aperWidth
);
dm2
->
dmPaperLength
,
dm2
->
dmPaperWidth
);
dm1
->
dmPublic
.
dmFields
&=
~
DM_PAPERSIZE
;
dm1
->
dmPublic
.
dmFields
|=
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
);
}
else
if
(
dm2
->
dm
Public
.
dm
Fields
&
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
))
{
}
else
if
(
dm2
->
dmFields
&
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
))
{
/* You might think that this would be allowed if dm1 is in custom size
mode, but apparently Windows reverts to standard paper mode even in
this case */
...
...
@@ -158,71 +158,71 @@ void PSDRV_MergeDevmodes( PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2, PRINTERI
dm1
->
dmPublic
.
dmFields
|=
DM_PAPERSIZE
;
}
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_SCALE
)
{
dm1
->
dmPublic
.
dmScale
=
dm2
->
dm
Public
.
dm
Scale
;
TRACE
(
"Changing Scale to %d
\n
"
,
dm2
->
dm
Public
.
dm
Scale
);
if
(
dm2
->
dmFields
&
DM_SCALE
)
{
dm1
->
dmPublic
.
dmScale
=
dm2
->
dmScale
;
TRACE
(
"Changing Scale to %d
\n
"
,
dm2
->
dmScale
);
}
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_COPIES
)
{
dm1
->
dmPublic
.
dmCopies
=
dm2
->
dm
Public
.
dm
Copies
;
TRACE
(
"Changing Copies to %d
\n
"
,
dm2
->
dm
Public
.
dm
Copies
);
if
(
dm2
->
dmFields
&
DM_COPIES
)
{
dm1
->
dmPublic
.
dmCopies
=
dm2
->
dmCopies
;
TRACE
(
"Changing Copies to %d
\n
"
,
dm2
->
dmCopies
);
}
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DEFAULTSOURCE
)
if
(
dm2
->
dmFields
&
DM_DEFAULTSOURCE
)
{
INPUTSLOT
*
slot
=
find_slot
(
pi
->
ppd
,
dm2
);
if
(
slot
)
{
dm1
->
dmPublic
.
dmDefaultSource
=
dm2
->
dm
Public
.
dm
DefaultSource
;
dm1
->
dmPublic
.
dmDefaultSource
=
dm2
->
dmDefaultSource
;
TRACE
(
"Changing bin to '%s'
\n
"
,
slot
->
FullName
);
}
else
TRACE
(
"Trying to change to unsupported bin %d
\n
"
,
dm2
->
dm
Public
.
dm
DefaultSource
);
TRACE
(
"Trying to change to unsupported bin %d
\n
"
,
dm2
->
dmDefaultSource
);
}
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DEFAULTSOURCE
)
dm1
->
dmPublic
.
dmDefaultSource
=
dm2
->
dm
Public
.
dm
DefaultSource
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PRINTQUALITY
)
dm1
->
dmPublic
.
dmPrintQuality
=
dm2
->
dmP
ublic
.
dmP
rintQuality
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_COLOR
)
dm1
->
dmPublic
.
dmColor
=
dm2
->
dm
Public
.
dm
Color
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DUPLEX
&&
pi
->
ppd
->
DefaultDuplex
&&
pi
->
ppd
->
DefaultDuplex
->
WinDuplex
!=
0
)
dm1
->
dmPublic
.
dmDuplex
=
dm2
->
dm
Public
.
dm
Duplex
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_YRESOLUTION
)
dm1
->
dmPublic
.
dmYResolution
=
dm2
->
dm
Public
.
dm
YResolution
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_TTOPTION
)
dm1
->
dmPublic
.
dmTTOption
=
dm2
->
dm
Public
.
dm
TTOption
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_COLLATE
)
dm1
->
dmPublic
.
dmCollate
=
dm2
->
dm
Public
.
dm
Collate
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_FORMNAME
)
lstrcpynW
(
dm1
->
dmPublic
.
dmFormName
,
dm2
->
dm
Public
.
dm
FormName
,
CCHFORMNAME
);
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_BITSPERPEL
)
dm1
->
dmPublic
.
dmBitsPerPel
=
dm2
->
dm
Public
.
dm
BitsPerPel
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PELSWIDTH
)
dm1
->
dmPublic
.
dmPelsWidth
=
dm2
->
dmP
ublic
.
dmP
elsWidth
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PELSHEIGHT
)
dm1
->
dmPublic
.
dmPelsHeight
=
dm2
->
dmP
ublic
.
dmP
elsHeight
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DISPLAYFLAGS
)
dm1
->
dmPublic
.
dmDisplayFlags
=
dm2
->
dm
Public
.
dm
DisplayFlags
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DISPLAYFREQUENCY
)
dm1
->
dmPublic
.
dmDisplayFrequency
=
dm2
->
dm
Public
.
dm
DisplayFrequency
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_POSITION
)
dm1
->
dmPublic
.
dmPosition
=
dm2
->
dmP
ublic
.
dmP
osition
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_LOGPIXELS
)
dm1
->
dmPublic
.
dmLogPixels
=
dm2
->
dm
Public
.
dm
LogPixels
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_ICMMETHOD
)
dm1
->
dmPublic
.
dmICMMethod
=
dm2
->
dm
Public
.
dm
ICMMethod
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_ICMINTENT
)
dm1
->
dmPublic
.
dmICMIntent
=
dm2
->
dm
Public
.
dm
ICMIntent
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_MEDIATYPE
)
dm1
->
dmPublic
.
dmMediaType
=
dm2
->
dm
Public
.
dm
MediaType
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DITHERTYPE
)
dm1
->
dmPublic
.
dmDitherType
=
dm2
->
dm
Public
.
dm
DitherType
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PANNINGWIDTH
)
dm1
->
dmPublic
.
dmPanningWidth
=
dm2
->
dmP
ublic
.
dmP
anningWidth
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PANNINGHEIGHT
)
dm1
->
dmPublic
.
dmPanningHeight
=
dm2
->
dmP
ublic
.
dmP
anningHeight
;
if
(
dm2
->
dmFields
&
DM_DEFAULTSOURCE
)
dm1
->
dmPublic
.
dmDefaultSource
=
dm2
->
dmDefaultSource
;
if
(
dm2
->
dmFields
&
DM_PRINTQUALITY
)
dm1
->
dmPublic
.
dmPrintQuality
=
dm2
->
dmPrintQuality
;
if
(
dm2
->
dmFields
&
DM_COLOR
)
dm1
->
dmPublic
.
dmColor
=
dm2
->
dmColor
;
if
(
dm2
->
dmFields
&
DM_DUPLEX
&&
pi
->
ppd
->
DefaultDuplex
&&
pi
->
ppd
->
DefaultDuplex
->
WinDuplex
!=
0
)
dm1
->
dmPublic
.
dmDuplex
=
dm2
->
dmDuplex
;
if
(
dm2
->
dmFields
&
DM_YRESOLUTION
)
dm1
->
dmPublic
.
dmYResolution
=
dm2
->
dmYResolution
;
if
(
dm2
->
dmFields
&
DM_TTOPTION
)
dm1
->
dmPublic
.
dmTTOption
=
dm2
->
dmTTOption
;
if
(
dm2
->
dmFields
&
DM_COLLATE
)
dm1
->
dmPublic
.
dmCollate
=
dm2
->
dmCollate
;
if
(
dm2
->
dmFields
&
DM_FORMNAME
)
lstrcpynW
(
dm1
->
dmPublic
.
dmFormName
,
dm2
->
dmFormName
,
CCHFORMNAME
);
if
(
dm2
->
dmFields
&
DM_BITSPERPEL
)
dm1
->
dmPublic
.
dmBitsPerPel
=
dm2
->
dmBitsPerPel
;
if
(
dm2
->
dmFields
&
DM_PELSWIDTH
)
dm1
->
dmPublic
.
dmPelsWidth
=
dm2
->
dmPelsWidth
;
if
(
dm2
->
dmFields
&
DM_PELSHEIGHT
)
dm1
->
dmPublic
.
dmPelsHeight
=
dm2
->
dmPelsHeight
;
if
(
dm2
->
dmFields
&
DM_DISPLAYFLAGS
)
dm1
->
dmPublic
.
dmDisplayFlags
=
dm2
->
dmDisplayFlags
;
if
(
dm2
->
dmFields
&
DM_DISPLAYFREQUENCY
)
dm1
->
dmPublic
.
dmDisplayFrequency
=
dm2
->
dmDisplayFrequency
;
if
(
dm2
->
dmFields
&
DM_POSITION
)
dm1
->
dmPublic
.
dmPosition
=
dm2
->
dmPosition
;
if
(
dm2
->
dmFields
&
DM_LOGPIXELS
)
dm1
->
dmPublic
.
dmLogPixels
=
dm2
->
dmLogPixels
;
if
(
dm2
->
dmFields
&
DM_ICMMETHOD
)
dm1
->
dmPublic
.
dmICMMethod
=
dm2
->
dmICMMethod
;
if
(
dm2
->
dmFields
&
DM_ICMINTENT
)
dm1
->
dmPublic
.
dmICMIntent
=
dm2
->
dmICMIntent
;
if
(
dm2
->
dmFields
&
DM_MEDIATYPE
)
dm1
->
dmPublic
.
dmMediaType
=
dm2
->
dmMediaType
;
if
(
dm2
->
dmFields
&
DM_DITHERTYPE
)
dm1
->
dmPublic
.
dmDitherType
=
dm2
->
dmDitherType
;
if
(
dm2
->
dmFields
&
DM_PANNINGWIDTH
)
dm1
->
dmPublic
.
dmPanningWidth
=
dm2
->
dmPanningWidth
;
if
(
dm2
->
dmFields
&
DM_PANNINGHEIGHT
)
dm1
->
dmPublic
.
dmPanningHeight
=
dm2
->
dmPanningHeight
;
return
;
}
...
...
@@ -472,7 +472,7 @@ LONG WINAPI DrvDocumentPropertySheets(PROPSHEETUI_INFO *info, LPARAM lparam)
if
((
dph
->
fMode
&
DM_MODIFY
)
&&
dph
->
pdmIn
)
{
TRACE
(
"DM_MODIFY set. devIn->dmFields = %08lx
\n
"
,
dph
->
pdmIn
->
dmFields
);
PSDRV_MergeDevmodes
(
pi
->
Devmode
,
(
PSDRV_DEVMODE
*
)
dph
->
pdmIn
,
pi
);
PSDRV_MergeDevmodes
(
pi
->
Devmode
,
dph
->
pdmIn
,
pi
);
}
/* If DM_PROMPT is set, present modal dialog box */
...
...
dlls/wineps.drv/init.c
View file @
5b166890
...
...
@@ -325,7 +325,7 @@ static void PSDRV_UpdateDevCaps( print_ctx *ctx )
}
print_ctx
*
create_print_ctx
(
HDC
hdc
,
const
WCHAR
*
device
,
const
PSDRV_DEVMODE
*
devmode
)
const
DEVMODEW
*
devmode
)
{
PRINTERINFO
*
pi
=
PSDRV_FindPrinterInfo
(
device
);
print_ctx
*
ctx
;
...
...
@@ -347,21 +347,23 @@ print_ctx *create_print_ctx( HDC hdc, const WCHAR *device,
ctx
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
*
ctx
)
);
if
(
!
ctx
)
return
NULL
;
ctx
->
Devmode
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
PSDRV_DEVMODE
)
);
ctx
->
Devmode
=
HeapAlloc
(
GetProcessHeap
(),
0
,
pi
->
Devmode
->
dmPublic
.
dmSize
+
pi
->
Devmode
->
dmPublic
.
dmDriverExtra
);
if
(
!
ctx
->
Devmode
)
{
HeapFree
(
GetProcessHeap
(),
0
,
ctx
);
return
NULL
;
}
*
ctx
->
Devmode
=
*
pi
->
Devmode
;
memcpy
(
ctx
->
Devmode
,
pi
->
Devmode
,
pi
->
Devmode
->
dmPublic
.
dmSize
+
pi
->
Devmode
->
dmPublic
.
dmDriverExtra
);
ctx
->
pi
=
pi
;
ctx
->
logPixelsX
=
pi
->
ppd
->
DefaultResolution
;
ctx
->
logPixelsY
=
pi
->
ppd
->
DefaultResolution
;
if
(
devmode
)
{
dump_devmode
(
&
devmode
->
dmPublic
);
dump_devmode
(
devmode
);
PSDRV_MergeDevmodes
(
ctx
->
Devmode
,
devmode
,
pi
);
}
...
...
@@ -378,7 +380,7 @@ BOOL CDECL PSDRV_ResetDC( print_ctx *ctx, const DEVMODEW *lpInitData )
{
if
(
lpInitData
)
{
PSDRV_MergeDevmodes
(
ctx
->
Devmode
,
(
const
PSDRV_DEVMODE
*
)
lpInitData
,
ctx
->
pi
);
PSDRV_MergeDevmodes
(
ctx
->
Devmode
,
lpInitData
,
ctx
->
pi
);
PSDRV_UpdateDevCaps
(
ctx
);
}
return
TRUE
;
...
...
@@ -545,19 +547,19 @@ PRINTERINFO *PSDRV_FindPrinterInfo(LPCWSTR name)
if
(
GetLocaleInfoW
(
LOCALE_USER_DEFAULT
,
LOCALE_IPAPERSIZE
|
LOCALE_RETURN_NUMBER
,
(
LPWSTR
)
&
papersize
,
sizeof
(
papersize
)
/
sizeof
(
WCHAR
)))
{
PSDRV_DEVMODE
dm
;
DEVMODEW
dm
;
memset
(
&
dm
,
0
,
sizeof
(
dm
));
dm
.
dm
Public
.
dm
Fields
=
DM_PAPERSIZE
;
dm
.
dmP
ublic
.
dmP
aperSize
=
papersize
;
dm
.
dmFields
=
DM_PAPERSIZE
;
dm
.
dmPaperSize
=
papersize
;
PSDRV_MergeDevmodes
(
pi
->
Devmode
,
&
dm
,
pi
);
}
}
if
(
pi
->
ppd
->
DefaultPageSize
)
{
/* We'll let the ppd override the devmode */
PSDRV_DEVMODE
dm
;
DEVMODEW
dm
;
memset
(
&
dm
,
0
,
sizeof
(
dm
));
dm
.
dm
Public
.
dm
Fields
=
DM_PAPERSIZE
;
dm
.
dmP
ublic
.
dmP
aperSize
=
pi
->
ppd
->
DefaultPageSize
->
WinPage
;
dm
.
dmFields
=
DM_PAPERSIZE
;
dm
.
dmPaperSize
=
pi
->
ppd
->
DefaultPageSize
->
WinPage
;
PSDRV_MergeDevmodes
(
pi
->
Devmode
,
&
dm
,
pi
);
}
...
...
dlls/wineps.drv/printproc.c
View file @
5b166890
...
...
@@ -2980,8 +2980,7 @@ HANDLE WINAPI OpenPrintProcessor(WCHAR *port, PRINTPROCESSOROPENDATA *open_data)
return
NULL
;
}
SetGraphicsMode
(
hdc
,
GM_ADVANCED
);
data
->
ctx
=
create_print_ctx
(
hdc
,
open_data
->
pPrinterName
,
(
const
PSDRV_DEVMODE
*
)
open_data
->
pDevMode
);
data
->
ctx
=
create_print_ctx
(
hdc
,
open_data
->
pPrinterName
,
open_data
->
pDevMode
);
if
(
!
data
->
ctx
)
{
DeleteDC
(
hdc
);
...
...
dlls/wineps.drv/ps.c
View file @
5b166890
...
...
@@ -397,9 +397,9 @@ static void write_cups_job_ticket( print_ctx *ctx, const struct ticket_info *inf
INT
PSDRV_WriteHeader
(
print_ctx
*
ctx
,
LPCWSTR
title
)
{
char
*
buf
,
*
escaped_title
;
INPUTSLOT
*
slot
=
find_slot
(
ctx
->
pi
->
ppd
,
ctx
->
Devmode
);
PAGESIZE
*
page
=
find_pagesize
(
ctx
->
pi
->
ppd
,
ctx
->
Devmode
);
DUPLEX
*
duplex
=
find_duplex
(
ctx
->
pi
->
ppd
,
ctx
->
Devmode
);
INPUTSLOT
*
slot
=
find_slot
(
ctx
->
pi
->
ppd
,
&
ctx
->
Devmode
->
dmPublic
);
PAGESIZE
*
page
=
find_pagesize
(
ctx
->
pi
->
ppd
,
&
ctx
->
Devmode
->
dmPublic
);
DUPLEX
*
duplex
=
find_duplex
(
ctx
->
pi
->
ppd
,
&
ctx
->
Devmode
->
dmPublic
);
int
llx
,
lly
,
urx
,
ury
;
int
ret
,
len
;
const
char
*
dmOrientation
;
...
...
dlls/wineps.drv/psdrv.h
View file @
5b166890
...
...
@@ -370,7 +370,7 @@ typedef struct
}
print_ctx
;
extern
print_ctx
*
create_print_ctx
(
HDC
hdc
,
const
WCHAR
*
device
,
const
PSDRV_DEVMODE
*
devmode
)
DECLSPEC_HIDDEN
;
const
DEVMODEW
*
devmode
)
DECLSPEC_HIDDEN
;
/*
* Every glyph name in the Adobe Glyph List and the 35 core PostScript fonts
...
...
@@ -394,9 +394,9 @@ extern HINSTANCE PSDRV_hInstance DECLSPEC_HIDDEN;
extern
HANDLE
PSDRV_Heap
DECLSPEC_HIDDEN
;
extern
char
*
PSDRV_ANSIVector
[
256
]
DECLSPEC_HIDDEN
;
extern
INPUTSLOT
*
find_slot
(
PPD
*
ppd
,
const
PSDRV_DEVMODE
*
dm
)
DECLSPEC_HIDDEN
;
extern
PAGESIZE
*
find_pagesize
(
PPD
*
ppd
,
const
PSDRV_DEVMODE
*
dm
)
DECLSPEC_HIDDEN
;
extern
DUPLEX
*
find_duplex
(
PPD
*
ppd
,
const
PSDRV_DEVMODE
*
dm
)
DECLSPEC_HIDDEN
;
extern
INPUTSLOT
*
find_slot
(
PPD
*
ppd
,
const
DEVMODEW
*
dm
)
DECLSPEC_HIDDEN
;
extern
PAGESIZE
*
find_pagesize
(
PPD
*
ppd
,
const
DEVMODEW
*
dm
)
DECLSPEC_HIDDEN
;
extern
DUPLEX
*
find_duplex
(
PPD
*
ppd
,
const
DEVMODEW
*
dm
)
DECLSPEC_HIDDEN
;
/* GDI driver functions */
extern
BOOL
CDECL
PSDRV_Arc
(
print_ctx
*
ctx
,
INT
left
,
INT
top
,
INT
right
,
INT
bottom
,
...
...
@@ -437,7 +437,7 @@ extern BOOL CDECL PSDRV_StrokeAndFillPath( print_ctx *ctx ) DECLSPEC_HIDDEN;
extern
BOOL
CDECL
PSDRV_StrokePath
(
print_ctx
*
ctx
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
PSDRV_ResetDC
(
print_ctx
*
ctx
,
const
DEVMODEW
*
lpInitData
)
DECLSPEC_HIDDEN
;
extern
void
PSDRV_MergeDevmodes
(
PSDRV_DEVMODE
*
dm1
,
const
PSDRV_DEVMODE
*
dm2
,
extern
void
PSDRV_MergeDevmodes
(
PSDRV_DEVMODE
*
dm1
,
const
DEVMODEW
*
dm2
,
PRINTERINFO
*
pi
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetFontMetrics
(
void
)
DECLSPEC_HIDDEN
;
extern
PPD
*
PSDRV_ParsePPD
(
const
WCHAR
*
fname
,
HANDLE
printer
)
DECLSPEC_HIDDEN
;
...
...
dlls/wineps.drv/unixlib.c
View file @
5b166890
...
...
@@ -280,36 +280,36 @@ static inline int paper_size_from_points(float size)
return
size
*
254
/
72
;
}
static
INPUTSLOT
*
unix_find_slot
(
PPD
*
ppd
,
const
PSDRV_DEVMODE
*
dm
)
static
INPUTSLOT
*
unix_find_slot
(
PPD
*
ppd
,
const
DEVMODEW
*
dm
)
{
INPUTSLOT
*
slot
;
LIST_FOR_EACH_ENTRY
(
slot
,
&
ppd
->
InputSlots
,
INPUTSLOT
,
entry
)
if
(
slot
->
WinBin
==
dm
->
dm
Public
.
dm
DefaultSource
)
if
(
slot
->
WinBin
==
dm
->
dmDefaultSource
)
return
slot
;
return
NULL
;
}
static
PAGESIZE
*
unix_find_pagesize
(
PPD
*
ppd
,
const
PSDRV_DEVMODE
*
dm
)
static
PAGESIZE
*
unix_find_pagesize
(
PPD
*
ppd
,
const
DEVMODEW
*
dm
)
{
PAGESIZE
*
page
;
LIST_FOR_EACH_ENTRY
(
page
,
&
ppd
->
PageSizes
,
PAGESIZE
,
entry
)
if
(
page
->
WinPage
==
dm
->
dmP
ublic
.
dmP
aperSize
)
if
(
page
->
WinPage
==
dm
->
dmPaperSize
)
return
page
;
return
NULL
;
}
static
void
merge_devmodes
(
PSDRV_DEVMODE
*
dm1
,
const
PSDRV_DEVMODE
*
dm2
,
static
void
merge_devmodes
(
PSDRV_DEVMODE
*
dm1
,
const
DEVMODEW
*
dm2
,
struct
printer_info
*
pi
)
{
/* some sanity checks here on dm2 */
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_ORIENTATION
)
if
(
dm2
->
dmFields
&
DM_ORIENTATION
)
{
dm1
->
dmPublic
.
dmOrientation
=
dm2
->
dm
Public
.
dm
Orientation
;
dm1
->
dmPublic
.
dmOrientation
=
dm2
->
dmOrientation
;
TRACE
(
"Changing orientation to %d (%s)
\n
"
,
dm1
->
dmPublic
.
dmOrientation
,
dm1
->
dmPublic
.
dmOrientation
==
DMORIENT_PORTRAIT
?
...
...
@@ -319,13 +319,13 @@ static void merge_devmodes(PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2,
}
/* NB PaperWidth is always < PaperLength */
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PAPERSIZE
)
if
(
dm2
->
dmFields
&
DM_PAPERSIZE
)
{
PAGESIZE
*
page
=
unix_find_pagesize
(
pi
->
pi
->
ppd
,
dm2
);
if
(
page
)
{
dm1
->
dmPublic
.
dmPaperSize
=
dm2
->
dmP
ublic
.
dmP
aperSize
;
dm1
->
dmPublic
.
dmPaperSize
=
dm2
->
dmPaperSize
;
dm1
->
dmPublic
.
dmPaperWidth
=
paper_size_from_points
(
page
->
PaperDimension
->
x
);
dm1
->
dmPublic
.
dmPaperLength
=
paper_size_from_points
(
page
->
PaperDimension
->
y
);
dm1
->
dmPublic
.
dmFields
|=
DM_PAPERSIZE
|
DM_PAPERWIDTH
|
DM_PAPERLENGTH
;
...
...
@@ -340,21 +340,21 @@ static void merge_devmodes(PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2,
}
}
else
TRACE
(
"Trying to change to unsupported pagesize %d
\n
"
,
dm2
->
dmP
ublic
.
dmP
aperSize
);
TRACE
(
"Trying to change to unsupported pagesize %d
\n
"
,
dm2
->
dmPaperSize
);
}
else
if
((
dm2
->
dm
Public
.
dm
Fields
&
DM_PAPERLENGTH
)
&&
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PAPERWIDTH
))
else
if
((
dm2
->
dmFields
&
DM_PAPERLENGTH
)
&&
(
dm2
->
dmFields
&
DM_PAPERWIDTH
))
{
dm1
->
dmPublic
.
dmPaperLength
=
dm2
->
dmP
ublic
.
dmP
aperLength
;
dm1
->
dmPublic
.
dmPaperWidth
=
dm2
->
dmP
ublic
.
dmP
aperWidth
;
dm1
->
dmPublic
.
dmPaperLength
=
dm2
->
dmPaperLength
;
dm1
->
dmPublic
.
dmPaperWidth
=
dm2
->
dmPaperWidth
;
TRACE
(
"Changing PaperLength|Width to %dx%d
\n
"
,
dm2
->
dmP
ublic
.
dmP
aperLength
,
dm2
->
dmP
ublic
.
dmP
aperWidth
);
dm2
->
dmPaperLength
,
dm2
->
dmPaperWidth
);
dm1
->
dmPublic
.
dmFields
&=
~
DM_PAPERSIZE
;
dm1
->
dmPublic
.
dmFields
|=
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
);
}
else
if
(
dm2
->
dm
Public
.
dm
Fields
&
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
))
else
if
(
dm2
->
dmFields
&
(
DM_PAPERLENGTH
|
DM_PAPERWIDTH
))
{
/* You might think that this would be allowed if dm1 is in custom size
mode, but apparently Windows reverts to standard paper mode even in
...
...
@@ -364,75 +364,75 @@ static void merge_devmodes(PSDRV_DEVMODE *dm1, const PSDRV_DEVMODE *dm2,
dm1
->
dmPublic
.
dmFields
|=
DM_PAPERSIZE
;
}
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_SCALE
)
if
(
dm2
->
dmFields
&
DM_SCALE
)
{
dm1
->
dmPublic
.
dmScale
=
dm2
->
dm
Public
.
dm
Scale
;
TRACE
(
"Changing Scale to %d
\n
"
,
dm2
->
dm
Public
.
dm
Scale
);
dm1
->
dmPublic
.
dmScale
=
dm2
->
dmScale
;
TRACE
(
"Changing Scale to %d
\n
"
,
dm2
->
dmScale
);
}
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_COPIES
)
if
(
dm2
->
dmFields
&
DM_COPIES
)
{
dm1
->
dmPublic
.
dmCopies
=
dm2
->
dm
Public
.
dm
Copies
;
TRACE
(
"Changing Copies to %d
\n
"
,
dm2
->
dm
Public
.
dm
Copies
);
dm1
->
dmPublic
.
dmCopies
=
dm2
->
dmCopies
;
TRACE
(
"Changing Copies to %d
\n
"
,
dm2
->
dmCopies
);
}
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DEFAULTSOURCE
)
if
(
dm2
->
dmFields
&
DM_DEFAULTSOURCE
)
{
INPUTSLOT
*
slot
=
unix_find_slot
(
pi
->
pi
->
ppd
,
dm2
);
if
(
slot
)
{
dm1
->
dmPublic
.
dmDefaultSource
=
dm2
->
dm
Public
.
dm
DefaultSource
;
dm1
->
dmPublic
.
dmDefaultSource
=
dm2
->
dmDefaultSource
;
TRACE
(
"Changing bin to '%s'
\n
"
,
slot
->
FullName
);
}
else
{
TRACE
(
"Trying to change to unsupported bin %d
\n
"
,
dm2
->
dm
Public
.
dm
DefaultSource
);
TRACE
(
"Trying to change to unsupported bin %d
\n
"
,
dm2
->
dmDefaultSource
);
}
}
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DEFAULTSOURCE
)
dm1
->
dmPublic
.
dmDefaultSource
=
dm2
->
dm
Public
.
dm
DefaultSource
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PRINTQUALITY
)
dm1
->
dmPublic
.
dmPrintQuality
=
dm2
->
dmP
ublic
.
dmP
rintQuality
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_COLOR
)
dm1
->
dmPublic
.
dmColor
=
dm2
->
dm
Public
.
dm
Color
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DUPLEX
&&
pi
->
pi
->
ppd
->
DefaultDuplex
&&
pi
->
pi
->
ppd
->
DefaultDuplex
->
WinDuplex
!=
0
)
dm1
->
dmPublic
.
dmDuplex
=
dm2
->
dm
Public
.
dm
Duplex
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_YRESOLUTION
)
dm1
->
dmPublic
.
dmYResolution
=
dm2
->
dm
Public
.
dm
YResolution
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_TTOPTION
)
dm1
->
dmPublic
.
dmTTOption
=
dm2
->
dm
Public
.
dm
TTOption
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_COLLATE
)
dm1
->
dmPublic
.
dmCollate
=
dm2
->
dm
Public
.
dm
Collate
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_FORMNAME
)
lstrcpynW
(
dm1
->
dmPublic
.
dmFormName
,
dm2
->
dm
Public
.
dm
FormName
,
CCHFORMNAME
);
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_BITSPERPEL
)
dm1
->
dmPublic
.
dmBitsPerPel
=
dm2
->
dm
Public
.
dm
BitsPerPel
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PELSWIDTH
)
dm1
->
dmPublic
.
dmPelsWidth
=
dm2
->
dmP
ublic
.
dmP
elsWidth
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PELSHEIGHT
)
dm1
->
dmPublic
.
dmPelsHeight
=
dm2
->
dmP
ublic
.
dmP
elsHeight
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DISPLAYFLAGS
)
dm1
->
dmPublic
.
dmDisplayFlags
=
dm2
->
dm
Public
.
dm
DisplayFlags
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DISPLAYFREQUENCY
)
dm1
->
dmPublic
.
dmDisplayFrequency
=
dm2
->
dm
Public
.
dm
DisplayFrequency
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_POSITION
)
dm1
->
dmPublic
.
dmPosition
=
dm2
->
dmP
ublic
.
dmP
osition
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_LOGPIXELS
)
dm1
->
dmPublic
.
dmLogPixels
=
dm2
->
dm
Public
.
dm
LogPixels
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_ICMMETHOD
)
dm1
->
dmPublic
.
dmICMMethod
=
dm2
->
dm
Public
.
dm
ICMMethod
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_ICMINTENT
)
dm1
->
dmPublic
.
dmICMIntent
=
dm2
->
dm
Public
.
dm
ICMIntent
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_MEDIATYPE
)
dm1
->
dmPublic
.
dmMediaType
=
dm2
->
dm
Public
.
dm
MediaType
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_DITHERTYPE
)
dm1
->
dmPublic
.
dmDitherType
=
dm2
->
dm
Public
.
dm
DitherType
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PANNINGWIDTH
)
dm1
->
dmPublic
.
dmPanningWidth
=
dm2
->
dmP
ublic
.
dmP
anningWidth
;
if
(
dm2
->
dm
Public
.
dm
Fields
&
DM_PANNINGHEIGHT
)
dm1
->
dmPublic
.
dmPanningHeight
=
dm2
->
dmP
ublic
.
dmP
anningHeight
;
if
(
dm2
->
dmFields
&
DM_DEFAULTSOURCE
)
dm1
->
dmPublic
.
dmDefaultSource
=
dm2
->
dmDefaultSource
;
if
(
dm2
->
dmFields
&
DM_PRINTQUALITY
)
dm1
->
dmPublic
.
dmPrintQuality
=
dm2
->
dmPrintQuality
;
if
(
dm2
->
dmFields
&
DM_COLOR
)
dm1
->
dmPublic
.
dmColor
=
dm2
->
dmColor
;
if
(
dm2
->
dmFields
&
DM_DUPLEX
&&
pi
->
pi
->
ppd
->
DefaultDuplex
&&
pi
->
pi
->
ppd
->
DefaultDuplex
->
WinDuplex
!=
0
)
dm1
->
dmPublic
.
dmDuplex
=
dm2
->
dmDuplex
;
if
(
dm2
->
dmFields
&
DM_YRESOLUTION
)
dm1
->
dmPublic
.
dmYResolution
=
dm2
->
dmYResolution
;
if
(
dm2
->
dmFields
&
DM_TTOPTION
)
dm1
->
dmPublic
.
dmTTOption
=
dm2
->
dmTTOption
;
if
(
dm2
->
dmFields
&
DM_COLLATE
)
dm1
->
dmPublic
.
dmCollate
=
dm2
->
dmCollate
;
if
(
dm2
->
dmFields
&
DM_FORMNAME
)
lstrcpynW
(
dm1
->
dmPublic
.
dmFormName
,
dm2
->
dmFormName
,
CCHFORMNAME
);
if
(
dm2
->
dmFields
&
DM_BITSPERPEL
)
dm1
->
dmPublic
.
dmBitsPerPel
=
dm2
->
dmBitsPerPel
;
if
(
dm2
->
dmFields
&
DM_PELSWIDTH
)
dm1
->
dmPublic
.
dmPelsWidth
=
dm2
->
dmPelsWidth
;
if
(
dm2
->
dmFields
&
DM_PELSHEIGHT
)
dm1
->
dmPublic
.
dmPelsHeight
=
dm2
->
dmPelsHeight
;
if
(
dm2
->
dmFields
&
DM_DISPLAYFLAGS
)
dm1
->
dmPublic
.
dmDisplayFlags
=
dm2
->
dmDisplayFlags
;
if
(
dm2
->
dmFields
&
DM_DISPLAYFREQUENCY
)
dm1
->
dmPublic
.
dmDisplayFrequency
=
dm2
->
dmDisplayFrequency
;
if
(
dm2
->
dmFields
&
DM_POSITION
)
dm1
->
dmPublic
.
dmPosition
=
dm2
->
dmPosition
;
if
(
dm2
->
dmFields
&
DM_LOGPIXELS
)
dm1
->
dmPublic
.
dmLogPixels
=
dm2
->
dmLogPixels
;
if
(
dm2
->
dmFields
&
DM_ICMMETHOD
)
dm1
->
dmPublic
.
dmICMMethod
=
dm2
->
dmICMMethod
;
if
(
dm2
->
dmFields
&
DM_ICMINTENT
)
dm1
->
dmPublic
.
dmICMIntent
=
dm2
->
dmICMIntent
;
if
(
dm2
->
dmFields
&
DM_MEDIATYPE
)
dm1
->
dmPublic
.
dmMediaType
=
dm2
->
dmMediaType
;
if
(
dm2
->
dmFields
&
DM_DITHERTYPE
)
dm1
->
dmPublic
.
dmDitherType
=
dm2
->
dmDitherType
;
if
(
dm2
->
dmFields
&
DM_PANNINGWIDTH
)
dm1
->
dmPublic
.
dmPanningWidth
=
dm2
->
dmPanningWidth
;
if
(
dm2
->
dmFields
&
DM_PANNINGHEIGHT
)
dm1
->
dmPublic
.
dmPanningHeight
=
dm2
->
dmPanningHeight
;
}
static
void
update_dev_caps
(
PSDRV_PDEVICE
*
pdev
)
...
...
@@ -552,7 +552,7 @@ static BOOL CDECL reset_dc(PHYSDEV dev, const DEVMODEW *devmode)
if
(
devmode
)
{
merge_devmodes
(
pdev
->
devmode
,
(
const
PSDRV_DEVMODE
*
)
devmode
,
pdev
->
pi
);
merge_devmodes
(
pdev
->
devmode
,
devmode
,
pdev
->
pi
);
update_dev_caps
(
pdev
);
}
return
TRUE
;
...
...
@@ -1286,7 +1286,7 @@ static struct printer_info *find_printer_info(const WCHAR *name)
}
static
PSDRV_PDEVICE
*
create_physdev
(
HDC
hdc
,
const
WCHAR
*
device
,
const
PSDRV_DEVMODE
*
devmode
)
const
DEVMODEW
*
devmode
)
{
struct
printer_info
*
pi
=
find_printer_info
(
device
);
PSDRV_PDEVICE
*
pdev
;
...
...
@@ -1308,21 +1308,22 @@ static PSDRV_PDEVICE *create_physdev(HDC hdc, const WCHAR *device,
pdev
=
malloc
(
sizeof
(
*
pdev
));
if
(
!
pdev
)
return
NULL
;
pdev
->
devmode
=
malloc
(
sizeof
(
PSDRV_DEVMODE
)
);
pdev
->
devmode
=
malloc
(
pi
->
pi
->
Devmode
->
dmPublic
.
dmSize
+
pi
->
pi
->
Devmode
->
dmPublic
.
dmDriverExtra
);
if
(
!
pdev
->
devmode
)
{
free
(
pdev
);
return
NULL
;
}
*
pdev
->
devmode
=
*
pi
->
pi
->
Devmode
;
memcpy
(
pdev
->
devmode
,
pi
->
pi
->
Devmode
,
pi
->
pi
->
Devmode
->
dmPublic
.
dmSize
+
pi
->
pi
->
Devmode
->
dmPublic
.
dmDriverExtra
);
pdev
->
pi
=
pi
;
pdev
->
log_pixels_x
=
pi
->
pi
->
ppd
->
DefaultResolution
;
pdev
->
log_pixels_y
=
pi
->
pi
->
ppd
->
DefaultResolution
;
if
(
devmode
)
{
dump_devmode
(
&
devmode
->
dmPublic
);
dump_devmode
(
devmode
);
merge_devmodes
(
pdev
->
devmode
,
devmode
,
pi
);
}
...
...
@@ -1339,8 +1340,7 @@ static BOOL CDECL create_dc(PHYSDEV *dev, const WCHAR *device,
TRACE
(
"(%s %s %p)
\n
"
,
debugstr_w
(
device
),
debugstr_w
(
output
),
devmode
);
if
(
!
device
)
return
FALSE
;
if
(
!
(
pdev
=
create_physdev
((
*
dev
)
->
hdc
,
device
,
(
const
PSDRV_DEVMODE
*
)
devmode
)))
return
FALSE
;
if
(
!
(
pdev
=
create_physdev
((
*
dev
)
->
hdc
,
device
,
devmode
)))
return
FALSE
;
push_dc_driver
(
dev
,
&
pdev
->
dev
,
&
psdrv_funcs
);
return
TRUE
;
}
...
...
@@ -1350,7 +1350,7 @@ static BOOL CDECL create_compatible_dc(PHYSDEV orig, PHYSDEV *dev)
PSDRV_PDEVICE
*
pdev
,
*
orig_dev
=
get_psdrv_dev
(
orig
);
if
(
!
(
pdev
=
create_physdev
((
*
dev
)
->
hdc
,
orig_dev
->
pi
->
name
,
orig_dev
->
devmode
)))
return
FALSE
;
&
orig_dev
->
devmode
->
dmPublic
)))
return
FALSE
;
push_dc_driver
(
dev
,
&
pdev
->
dev
,
&
psdrv_funcs
);
return
TRUE
;
}
...
...
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