[ros-diffs] [gschneider] 37693: - PS_NULL might always be a LOGPEN, but can be retrieved as LOGPEN and EXTLOGPEN, distinguished by the supplied buffer size - Fixes 8 gdi32 pen winetests, finally all left failures are visible in one cmd window ; -)

gschneider at svn.reactos.org gschneider at svn.reactos.org
Thu Nov 27 21:31:38 CET 2008


Author: gschneider
Date: Thu Nov 27 14:31:37 2008
New Revision: 37693

URL: http://svn.reactos.org/svn/reactos?rev=37693&view=rev
Log:
- PS_NULL might always be a LOGPEN, but can be retrieved as LOGPEN and EXTLOGPEN, distinguished by the supplied buffer size
- Fixes 8 gdi32 pen winetests, finally all left failures are visible in one cmd window ;-)

Modified:
    trunk/reactos/subsystems/win32/win32k/objects/pen.c

Modified: trunk/reactos/subsystems/win32/win32k/objects/pen.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/objects/pen.c?rev=37693&r1=37692&r2=37693&view=diff
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/pen.c [iso-8859-1] (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/pen.c [iso-8859-1] Thu Nov 27 14:31:37 2008
@@ -209,8 +209,23 @@
    PLOGPEN pLogPen;
    PEXTLOGPEN pExtLogPen;
    INT cbRetCount;
-
-   if (pPenObject->flAttrs & GDIBRUSH_IS_OLDSTYLEPEN)
+   BOOLEAN isOldPen;
+
+   isOldPen = (pPenObject->flAttrs & GDIBRUSH_IS_OLDSTYLEPEN) > 0;
+   if ((pPenObject->ulPenStyle & PS_STYLE_MASK) == PS_NULL)
+   {
+      /* PS_NULL can be retrieved as LOGPEN or as EXTLOGPEN */
+      if (cbCount == sizeof(LOGPEN))
+      {
+         isOldPen = TRUE;
+      }
+      else if (cbCount == sizeof(EXTLOGPEN))
+      {
+         isOldPen = FALSE;
+      }
+   }
+
+   if (isOldPen)
    {
       cbRetCount = sizeof(LOGPEN);
       if (pBuffer)



More information about the Ros-diffs mailing list