From 9338a7ec6340b66853bbec9ff02d6d01d8ec429b Mon Sep 17 00:00:00 2001 From: James Tabor Date: Fri, 30 Jun 2017 23:23:33 +0000 Subject: [PATCH] [NtGDI] - Memory DC with no surface selected return true. WIP and part of CORE-12888. svn path=/trunk/; revision=75251 --- reactos/win32ss/gdi/ntgdi/fillshap.c | 4 ++-- reactos/win32ss/gdi/ntgdi/freetype.c | 12 +++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/reactos/win32ss/gdi/ntgdi/fillshap.c b/reactos/win32ss/gdi/ntgdi/fillshap.c index 15d743ac296..c23e934b25c 100644 --- a/reactos/win32ss/gdi/ntgdi/fillshap.c +++ b/reactos/win32ss/gdi/ntgdi/fillshap.c @@ -597,7 +597,7 @@ IntRectangle(PDC dc, psurf = dc->dclevel.pSurface; if (!psurf) { - ret = FALSE; + ret = TRUE; goto cleanup; } @@ -1085,7 +1085,7 @@ NtGdiExtFloodFill( if (!dc->dclevel.pSurface) { - Ret = FALSE; + Ret = TRUE; goto cleanup; } diff --git a/reactos/win32ss/gdi/ntgdi/freetype.c b/reactos/win32ss/gdi/ntgdi/freetype.c index 87227c0e606..898f58c765f 100644 --- a/reactos/win32ss/gdi/ntgdi/freetype.c +++ b/reactos/win32ss/gdi/ntgdi/freetype.c @@ -5147,6 +5147,13 @@ GreExtTextOutW( goto good; } + if (!dc->dclevel.pSurface) + { + /* Memory DC with no surface selected */ + DC_UnlockDc(dc); + return TRUE; + } + if (lprc && (fuOptions & (ETO_OPAQUE | ETO_CLIPPED))) { IntLPtoDP(dc, (POINT *)lprc, 2); @@ -5172,11 +5179,6 @@ GreExtTextOutW( BrushOrigin.x = 0; BrushOrigin.y = 0; - if (!dc->dclevel.pSurface) - { - goto fail; - } - if ((fuOptions & ETO_OPAQUE) && lprc) { DestRect.left = lprc->left;