From 79965b20dbc390205067b35ccebf5c0d896db4e4 Mon Sep 17 00:00:00 2001 From: Timo Kreuzer Date: Thu, 13 Nov 2014 11:12:56 +0000 Subject: [PATCH] [WIN32K] Round to nearest integer in FIX2LONG, used in XFORMOBJ APIs. Fixes rounding errors when doing coordinate transformation. svn path=/trunk/; revision=65392 --- reactos/win32ss/gdi/ntgdi/xformobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/win32ss/gdi/ntgdi/xformobj.c b/reactos/win32ss/gdi/ntgdi/xformobj.c index 6d7ca2db370..dbd8e22501b 100644 --- a/reactos/win32ss/gdi/ntgdi/xformobj.c +++ b/reactos/win32ss/gdi/ntgdi/xformobj.c @@ -13,7 +13,7 @@ #include C_ASSERT(sizeof(FIX) == sizeof(LONG)); -#define FIX2LONG(x) ((x) >> 4) +#define FIX2LONG(x) (((x) + 8) >> 4) #define LONG2FIX(x) ((x) << 4) #define FLOATOBJ_Equal _FLOATOBJ_Equal