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
5e507b3e
Commit
5e507b3e
authored
Oct 11, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Oct 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix METADC handling in PlayMetaFile.
parent
043cc241
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
15 deletions
+22
-15
metafile.c
dlls/gdi32/metafile.c
+22
-15
No files found.
dlls/gdi32/metafile.c
View file @
5e507b3e
...
@@ -360,6 +360,7 @@ HMETAFILE WINAPI CopyMetaFileA( HMETAFILE hSrcMetaFile, LPCSTR lpFilename )
...
@@ -360,6 +360,7 @@ HMETAFILE WINAPI CopyMetaFileA( HMETAFILE hSrcMetaFile, LPCSTR lpFilename )
*/
*/
BOOL
WINAPI
PlayMetaFile
(
HDC
hdc
,
HMETAFILE
hmf
)
BOOL
WINAPI
PlayMetaFile
(
HDC
hdc
,
HMETAFILE
hmf
)
{
{
BOOL
metadc
=
GetObjectType
(
hdc
)
==
OBJ_METADC
;
METAHEADER
*
mh
=
get_metafile_bits
(
hmf
);
METAHEADER
*
mh
=
get_metafile_bits
(
hmf
);
METARECORD
*
mr
;
METARECORD
*
mr
;
HANDLETABLE
*
ht
;
HANDLETABLE
*
ht
;
...
@@ -372,16 +373,19 @@ BOOL WINAPI PlayMetaFile( HDC hdc, HMETAFILE hmf )
...
@@ -372,16 +373,19 @@ BOOL WINAPI PlayMetaFile( HDC hdc, HMETAFILE hmf )
if
(
!
mh
)
return
FALSE
;
if
(
!
mh
)
return
FALSE
;
/* save DC */
if
(
!
metadc
)
hPen
=
GetCurrentObject
(
hdc
,
OBJ_PEN
);
hBrush
=
GetCurrentObject
(
hdc
,
OBJ_BRUSH
);
hPal
=
GetCurrentObject
(
hdc
,
OBJ_PAL
);
hRgn
=
NtGdiCreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
!
GetClipRgn
(
hdc
,
hRgn
))
{
{
DeleteObject
(
hRgn
);
/* save DC */
hRgn
=
0
;
hPen
=
GetCurrentObject
(
hdc
,
OBJ_PEN
);
hBrush
=
GetCurrentObject
(
hdc
,
OBJ_BRUSH
);
hPal
=
GetCurrentObject
(
hdc
,
OBJ_PAL
);
hRgn
=
NtGdiCreateRectRgn
(
0
,
0
,
0
,
0
);
if
(
!
GetClipRgn
(
hdc
,
hRgn
))
{
DeleteObject
(
hRgn
);
hRgn
=
0
;
}
}
}
/* create the handle table */
/* create the handle table */
...
@@ -414,12 +418,15 @@ BOOL WINAPI PlayMetaFile( HDC hdc, HMETAFILE hmf )
...
@@ -414,12 +418,15 @@ BOOL WINAPI PlayMetaFile( HDC hdc, HMETAFILE hmf )
PlayMetaFileRecord
(
hdc
,
ht
,
mr
,
mh
->
mtNoObjects
);
PlayMetaFileRecord
(
hdc
,
ht
,
mr
,
mh
->
mtNoObjects
);
}
}
/* restore DC */
if
(
!
metadc
)
SelectObject
(
hdc
,
hPen
);
{
SelectObject
(
hdc
,
hBrush
);
/* restore DC */
SelectPalette
(
hdc
,
hPal
,
FALSE
);
SelectObject
(
hdc
,
hPen
);
ExtSelectClipRgn
(
hdc
,
hRgn
,
RGN_COPY
);
SelectObject
(
hdc
,
hBrush
);
DeleteObject
(
hRgn
);
SelectPalette
(
hdc
,
hPal
,
FALSE
);
ExtSelectClipRgn
(
hdc
,
hRgn
,
RGN_COPY
);
DeleteObject
(
hRgn
);
}
/* free objects in handle table */
/* free objects in handle table */
for
(
i
=
0
;
i
<
mh
->
mtNoObjects
;
i
++
)
for
(
i
=
0
;
i
<
mh
->
mtNoObjects
;
i
++
)
...
...
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