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
cdb0be72
Commit
cdb0be72
authored
Apr 27, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 28, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineps: Handle EMRI_DEVMODE record in spool files.
parent
4496c64a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
init.c
dlls/wineps.drv/init.c
+1
-1
printproc.c
dlls/wineps.drv/printproc.c
+25
-1
psdrv.h
dlls/wineps.drv/psdrv.h
+1
-0
No files found.
dlls/wineps.drv/init.c
View file @
cdb0be72
...
...
@@ -436,7 +436,7 @@ static BOOL CDECL PSDRV_DeleteDC( PHYSDEV dev )
/**********************************************************************
* ResetDC (WINEPS.@)
*/
static
BOOL
CDECL
PSDRV_ResetDC
(
PHYSDEV
dev
,
const
DEVMODEW
*
lpInitData
)
BOOL
CDECL
PSDRV_ResetDC
(
PHYSDEV
dev
,
const
DEVMODEW
*
lpInitData
)
{
PSDRV_PDEVICE
*
physDev
=
get_psdrv_dev
(
dev
);
...
...
dlls/wineps.drv/printproc.c
View file @
cdb0be72
...
...
@@ -3228,6 +3228,30 @@ BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE pp, WCHAR *doc_name)
switch
(
record
.
ulID
)
{
case
EMRI_DEVMODE
:
{
DEVMODEW
*
devmode
=
NULL
;
if
(
record
.
cjSize
)
{
devmode
=
malloc
(
record
.
cjSize
);
if
(
!
devmode
)
goto
cleanup
;
ret
=
ReadPrinter
(
spool_data
,
devmode
,
record
.
cjSize
,
&
r
);
if
(
ret
&&
r
!=
record
.
cjSize
)
{
SetLastError
(
ERROR_INVALID_DATA
);
ret
=
FALSE
;
}
}
if
(
ret
)
ret
=
PSDRV_ResetDC
(
&
data
->
pdev
->
dev
,
devmode
);
free
(
devmode
);
if
(
!
ret
)
goto
cleanup
;
break
;
}
case
EMRI_METAFILE_DATA
:
pos
.
QuadPart
=
record
.
cjSize
;
ret
=
SeekPrinter
(
spool_data
,
pos
,
NULL
,
FILE_CURRENT
,
FALSE
);
...
...
@@ -3242,7 +3266,7 @@ BOOL WINAPI PrintDocumentOnPrintProcessor(HANDLE pp, WCHAR *doc_name)
{
cur
.
QuadPart
+=
record
.
cjSize
;
ret
=
ReadPrinter
(
spool_data
,
&
pos
,
sizeof
(
pos
),
&
r
);
if
(
r
!=
sizeof
(
pos
))
if
(
r
et
&&
r
!=
sizeof
(
pos
))
{
SetLastError
(
ERROR_INVALID_DATA
);
ret
=
FALSE
;
...
...
dlls/wineps.drv/psdrv.h
View file @
cdb0be72
...
...
@@ -467,6 +467,7 @@ extern INT CDECL PSDRV_StartDoc( PHYSDEV dev, const DOCINFOW *doc ) DECLSPEC_HID
extern
BOOL
CDECL
PSDRV_StrokeAndFillPath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
PSDRV_StrokePath
(
PHYSDEV
dev
)
DECLSPEC_HIDDEN
;
extern
BOOL
CDECL
PSDRV_ResetDC
(
PHYSDEV
dev
,
const
DEVMODEW
*
lpInitData
)
DECLSPEC_HIDDEN
;
extern
void
PSDRV_MergeDevmodes
(
PSDRV_DEVMODE
*
dm1
,
const
PSDRV_DEVMODE
*
dm2
,
PRINTERINFO
*
pi
)
DECLSPEC_HIDDEN
;
extern
BOOL
PSDRV_GetFontMetrics
(
void
)
DECLSPEC_HIDDEN
;
...
...
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