diff --git a/reactos/subsystems/win32/win32k/include/dc.h b/reactos/subsystems/win32/win32k/include/dc.h index b13dc5a7188..5f83a8dc0e2 100644 --- a/reactos/subsystems/win32/win32k/include/dc.h +++ b/reactos/subsystems/win32/win32k/include/dc.h @@ -9,6 +9,11 @@ // Get/SetBounds/Rect support. #define DCB_WINDOWMGR 0x8000 // Queries the Windows bounding rectangle instead of the application's + /* DCPATH flPath */ +#define DCPATH_ACTIVE 0x0001 +#define DCPATH_SAVE 0x0002 +#define DCPATH_CLOCKWISE 0x0004 + /* DC flags */ #define DC_SAVED 0x0002 /* It is a saved DC */ #define DC_DIRTY 0x0004 /* hVisRgn has to be updated */ diff --git a/reactos/subsystems/win32/win32k/objects/dc.c b/reactos/subsystems/win32/win32k/objects/dc.c index 8de840a2269..80e4ced854b 100644 --- a/reactos/subsystems/win32/win32k/objects/dc.c +++ b/reactos/subsystems/win32/win32k/objects/dc.c @@ -2187,6 +2187,8 @@ NtGdiGetAndSetDCDword( switch (u) { case GdtGetSetCopyCount: + SafeResult = dc->ulCopyCount; + dc->ulCopyCount = dwIn; break; case GdiGetSetTextAlign: SafeResult = Dc_Attr->lTextAlign; @@ -2213,9 +2215,31 @@ NtGdiGetAndSetDCDword( { SetLastWin32Error(ERROR_INVALID_PARAMETER); Ret = FALSE; + break; } - SafeResult = dc->w.ArcDirection; - dc->w.ArcDirection = dwIn; + if ( Dc_Attr->dwLayout & LAYOUT_RTL ) + { + SafeResult = AD_CLOCKWISE - ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0); + if ( dwIn == AD_CLOCKWISE ) + { + dc->DcLevel.flPath |= DCPATH_CLOCKWISE; + break; + } + dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE; + } + else + { + SafeResult = ((dc->DcLevel.flPath & DCPATH_CLOCKWISE) != 0) + AD_COUNTERCLOCKWISE; + if ( dwIn == AD_COUNTERCLOCKWISE) + { + dc->DcLevel.flPath |= DCPATH_CLOCKWISE; + break; + } + dc->DcLevel.flPath &= ~DCPATH_CLOCKWISE; + } + + SafeResult = dc->w.ArcDirection; // Fixme + dc->w.ArcDirection = dwIn; // Fixme break; default: SetLastWin32Error(ERROR_INVALID_PARAMETER);