On Mon, May 17, 2021 at 04:59:59PM +0800, Zhiyi Zhang wrote:
Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com
dlls/gdi32/mfdrv/dc.c | 12 ++++++ dlls/gdi32/mfdrv/init.c | 2 +- dlls/gdi32/mfdrv/metafiledrv.h | 1 + dlls/gdi32/tests/metafile.c | 79 ++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/mfdrv/dc.c b/dlls/gdi32/mfdrv/dc.c index 61417bfd462..1133102371a 100644 --- a/dlls/gdi32/mfdrv/dc.c +++ b/dlls/gdi32/mfdrv/dc.c @@ -85,6 +85,18 @@ INT CDECL MFDRV_OffsetClipRgn( PHYSDEV dev, INT x, INT y ) return MFDRV_MetaParam2( dev, META_OFFSETCLIPRGN, x, y ); }
+DWORD CDECL MFDRV_SetLayout( PHYSDEV dev, DWORD layout ) +{
- PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetLayout );
- if (!MFDRV_MetaParam2( dev, META_SETLAYOUT, HIWORD(layout), LOWORD(layout) ))
return GDI_ERROR;
- next->funcs->pSetLayout( next, layout );
- /* Always return LAYOUT_RTL according to tests */
- return LAYOUT_RTL;
+}
Since the mfdrv doesn't save the dc state, you should just return the result of MFDRV_MetaParam2() here. See SetMapMode below.
Huw.