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
1fa938c1
Commit
1fa938c1
authored
Apr 11, 2023
by
Piotr Caban
Committed by
Alexandre Julliard
Apr 11, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Factor out function for obtaining gdi object handle.
parent
507e5481
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
18 deletions
+8
-18
enhmetafile.c
dlls/gdi32/enhmetafile.c
+8
-18
No files found.
dlls/gdi32/enhmetafile.c
View file @
1fa938c1
...
...
@@ -768,6 +768,12 @@ static BOOL emr_produces_output(int type)
}
}
static
HGDIOBJ
get_object_handle
(
HANDLETABLE
*
handletable
,
DWORD
i
)
{
if
(
i
&
0x80000000
)
return
GetStockObject
(
i
&
0x7fffffff
);
return
handletable
->
objectHandle
[
i
];
}
/*****************************************************************************
* PlayEnhMetaFileRecord (GDI32.@)
...
...
@@ -899,19 +905,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
case
EMR_SELECTOBJECT
:
{
const
EMRSELECTOBJECT
*
pSelectObject
=
(
const
EMRSELECTOBJECT
*
)
mr
;
if
(
pSelectObject
->
ihObject
&
0x80000000
)
{
/* High order bit is set - it's a stock object
* Strip the high bit to get the index.
* See MSDN article Q142319
*/
SelectObject
(
hdc
,
GetStockObject
(
pSelectObject
->
ihObject
&
0x7fffffff
)
);
}
else
{
/* High order bit wasn't set - not a stock object
*/
SelectObject
(
hdc
,
(
handletable
->
objectHandle
)[
pSelectObject
->
ihObject
]
);
}
SelectObject
(
hdc
,
get_object_handle
(
handletable
,
pSelectObject
->
ihObject
)
);
break
;
}
case
EMR_DELETEOBJECT
:
...
...
@@ -1297,11 +1291,7 @@ BOOL WINAPI PlayEnhMetaFileRecord(
{
const
EMRSELECTPALETTE
*
lpSelectPal
=
(
const
EMRSELECTPALETTE
*
)
mr
;
if
(
lpSelectPal
->
ihPal
&
0x80000000
)
{
SelectPalette
(
hdc
,
GetStockObject
(
lpSelectPal
->
ihPal
&
0x7fffffff
),
TRUE
);
}
else
{
SelectPalette
(
hdc
,
(
handletable
->
objectHandle
)[
lpSelectPal
->
ihPal
],
TRUE
);
}
SelectPalette
(
hdc
,
get_object_handle
(
handletable
,
lpSelectPal
->
ihPal
),
TRUE
);
break
;
}
...
...
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