gdi32: Move common SetLayout() code to nulldrv_SetLayout().
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
aadf11fb4f
commit
1543be811d
|
@ -1922,17 +1922,7 @@ DWORD WINAPI SetLayout(HDC hdc, DWORD layout)
|
||||||
if (dc)
|
if (dc)
|
||||||
{
|
{
|
||||||
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetLayout );
|
PHYSDEV physdev = GET_DC_PHYSDEV( dc, pSetLayout );
|
||||||
layout = physdev->funcs->pSetLayout( physdev, layout );
|
oldlayout = physdev->funcs->pSetLayout( physdev, layout );
|
||||||
if (layout != GDI_ERROR)
|
|
||||||
{
|
|
||||||
oldlayout = dc->layout;
|
|
||||||
dc->layout = layout;
|
|
||||||
if (layout != oldlayout)
|
|
||||||
{
|
|
||||||
if (layout & LAYOUT_RTL) dc->MapMode = MM_ANISOTROPIC;
|
|
||||||
DC_UpdateXforms( dc );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
release_dc_ptr( dc );
|
release_dc_ptr( dc );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -795,7 +795,18 @@ static void CDECL nulldrv_SetDeviceClipping( PHYSDEV dev, HRGN rgn )
|
||||||
|
|
||||||
static DWORD CDECL nulldrv_SetLayout( PHYSDEV dev, DWORD layout )
|
static DWORD CDECL nulldrv_SetLayout( PHYSDEV dev, DWORD layout )
|
||||||
{
|
{
|
||||||
return layout;
|
DC *dc = get_nulldrv_dc( dev );
|
||||||
|
DWORD old_layout;
|
||||||
|
|
||||||
|
old_layout = dc->layout;
|
||||||
|
dc->layout = layout;
|
||||||
|
if (layout != old_layout)
|
||||||
|
{
|
||||||
|
if (layout & LAYOUT_RTL) dc->MapMode = MM_ANISOTROPIC;
|
||||||
|
DC_UpdateXforms( dc );
|
||||||
|
}
|
||||||
|
|
||||||
|
return old_layout;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BOOL CDECL nulldrv_SetDeviceGammaRamp( PHYSDEV dev, void *ramp )
|
static BOOL CDECL nulldrv_SetDeviceGammaRamp( PHYSDEV dev, void *ramp )
|
||||||
|
|
|
@ -334,12 +334,14 @@ BOOL CDECL EMFDRV_ScaleWindowExtEx( PHYSDEV dev, INT xNum, INT xDenom, INT yNum,
|
||||||
|
|
||||||
DWORD CDECL EMFDRV_SetLayout( PHYSDEV dev, DWORD layout )
|
DWORD CDECL EMFDRV_SetLayout( PHYSDEV dev, DWORD layout )
|
||||||
{
|
{
|
||||||
|
PHYSDEV next = GET_NEXT_PHYSDEV( dev, pSetMapMode );
|
||||||
EMRSETLAYOUT emr;
|
EMRSETLAYOUT emr;
|
||||||
|
|
||||||
emr.emr.iType = EMR_SETLAYOUT;
|
emr.emr.iType = EMR_SETLAYOUT;
|
||||||
emr.emr.nSize = sizeof(emr);
|
emr.emr.nSize = sizeof(emr);
|
||||||
emr.iMode = layout;
|
emr.iMode = layout;
|
||||||
return EMFDRV_WriteRecord( dev, &emr.emr ) ? layout : GDI_ERROR;
|
if (!EMFDRV_WriteRecord( dev, &emr.emr )) return GDI_ERROR;
|
||||||
|
return next->funcs->pSetLayout( next, layout );
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL CDECL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform)
|
BOOL CDECL EMFDRV_SetWorldTransform( PHYSDEV dev, const XFORM *xform)
|
||||||
|
|
Loading…
Reference in New Issue