Merge branch 'master' of https://github.com/reactos/reactos
authorjimtabor <james.tabor@reactos.org>
Mon, 9 Dec 2019 17:19:18 +0000 (11:19 -0600)
committerjimtabor <james.tabor@reactos.org>
Mon, 9 Dec 2019 17:19:18 +0000 (11:19 -0600)
1  2 
win32ss/user/rtl/text.c

diff --combined win32ss/user/rtl/text.c
@@@ -1263,18 -1263,8 +1263,8 @@@ INT WINAPI DrawTextExWorker( HDC hdc
        if (flags & DT_SINGLELINE)
        {
  #ifdef __REACTOS__
-         if (flags & DT_VCENTER)
-         {
-             if (flags & DT_CALCRECT)
-             {
-                 if (rect->bottom - rect->top < size.cy / 2)
-                     y = rect->top + (invert_y ? size.cy : -size.cy) / 2;
-             }
-             else
-             {
-                 y = rect->top + (rect->bottom - rect->top + (invert_y ? size.cy : -size.cy)) / 2;
-             }
-         }
+         if (flags & DT_VCENTER) y = rect->top +
+             (rect->bottom - rect->top + (invert_y ? size.cy : -size.cy)) / 2;
          else if (flags & DT_BOTTOM)
              y = rect->bottom + (invert_y ? 0 : -size.cy);
  #else
  #ifndef _WIN32K_
      if (!(flags & DT_NOCLIP) )
      {
 -       SelectClipRgn(hdc, hrgn);
 +       SelectClipRgn(hdc, hrgn); // This should be NtGdiExtSelectClipRgn, but due to ReactOS build rules this option is next:
 +       GdiFlush();               // Flush the batch and level up! See CORE-16498.
         if (hrgn)
         {
            DeleteObject(hrgn);