From 0705f303d054ac636a53ca04d9e41172fd7c36bc Mon Sep 17 00:00:00 2001 From: Thomas Bluemel Date: Thu, 25 Dec 2003 21:14:24 +0000 Subject: [PATCH] disable gradient captions on resolutions <= 8bpp svn path=/trunk/; revision=7240 --- reactos/subsys/win32k/ntuser/misc.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/reactos/subsys/win32k/ntuser/misc.c b/reactos/subsys/win32k/ntuser/misc.c index 29f5a60552b..5d20aa519a9 100644 --- a/reactos/subsys/win32k/ntuser/misc.c +++ b/reactos/subsys/win32k/ntuser/misc.c @@ -1,4 +1,4 @@ -/* $Id: misc.c,v 1.37 2003/12/24 01:26:10 weiden Exp $ +/* $Id: misc.c,v 1.38 2003/12/25 21:14:24 weiden Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -24,6 +24,7 @@ #include #include #include +#include #define NDEBUG #include @@ -506,7 +507,22 @@ NtUserSystemParametersInfo( } case SPI_GETGRADIENTCAPTIONS: { - Status = MmCopyToCaller(pvParam, &GradientCaptions, sizeof(BOOL)); + HDC hDC; + PDC dc; + PSURFOBJ SurfObj; + BOOL Ret = GradientCaptions; + + hDC = IntGetScreenDC(); + if(hDC) + { + dc = DC_LockDc(hDC); + SurfObj = (PSURFOBJ)AccessUserObject((ULONG) dc->Surface); + if(SurfObj) + Ret = (SurfObj->iBitmapFormat > BMF_8BPP); + DC_UnlockDc(hDC); + } + + Status = MmCopyToCaller(pvParam, &Ret, sizeof(BOOL)); if(!NT_SUCCESS(Status)) { SetLastNtError(Status);