From 9fef17180f1ba38633915c2fe4a2258b0223688b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Sat, 3 Oct 2015 13:30:15 +0000 Subject: [PATCH] [WIN32SS:GDI] Convert COLOR16 values to byte range before calling XLATEOBJ_iXlate. This fixes gradient colors in some applications, as for example in Code::Blocks. Patch by Vort. This is a fix for code written in revision r8117, so old !! CORE-8652 #comment Committed in r69430, thanks guys! svn path=/trunk/; revision=69430 --- reactos/win32ss/gdi/eng/gradient.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/win32ss/gdi/eng/gradient.c b/reactos/win32ss/gdi/eng/gradient.c index 8ec2de7a19f..626323b7ed3 100644 --- a/reactos/win32ss/gdi/eng/gradient.c +++ b/reactos/win32ss/gdi/eng/gradient.c @@ -161,7 +161,7 @@ IntEngGradientFillRect( do { RECTL FillRect; - ULONG Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red, v1->Green, v1->Blue)); + ULONG Color = XLATEOBJ_iXlate(pxlo, RGB(v1->Red >> 8, v1->Green >> 8, v1->Blue >> 8)); EnumMore = CLIPOBJ_bEnum(pco, (ULONG) sizeof(RectEnum), (PVOID) &RectEnum); for (i = 0; i < RectEnum.c && RectEnum.arcl[i].top <= rcSG.bottom; i++)