From 463f40fcd5a6f093465342e926b88fbfcf94d413 Mon Sep 17 00:00:00 2001 From: James Tabor Date: Thu, 4 Jun 2009 01:33:43 +0000 Subject: [PATCH] - More research is required to fix NtGdiSetPixelFormat, so removing disputed information. svn path=/trunk/; revision=41275 --- reactos/subsystems/win32/win32k/objects/wingl.c | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/reactos/subsystems/win32/win32k/objects/wingl.c b/reactos/subsystems/win32/win32k/objects/wingl.c index a46dbcec164..586df78b23d 100644 --- a/reactos/subsystems/win32/win32k/objects/wingl.c +++ b/reactos/subsystems/win32/win32k/objects/wingl.c @@ -162,6 +162,9 @@ NtGdiSetPixelFormat( ppdev = pdc->ppdev; + /* + WndObj is needed so exit on NULL pointer. + */ if (pWndObj) pso = pWndObj->psoOwner; else { @@ -169,18 +172,6 @@ NtGdiSetPixelFormat( goto Exit; } - if (!pso) - { - /* - Based on some rules! InfoDC to DC or, based on wiki information! - All pointers, it's a "must be!", (CONTAINING_RECORD +10h = SURFOBJ), the - pointer will start at SURFOBJ of the SURFACE structure. - */ - pso = (SURFOBJ *)pdc->dclevel.pSurface; - if (!pso) pso = pdc->pSurfInfo; - if (!pso) pso = ppdev->pSurface; - } - if (ppdev->flFlags & PDEV_META_DEVICE) { UNIMPLEMENTED;