[PATCH] Fix FP1616 macro

Daniel Martin consume.noise at gmail.com
Wed Oct 31 04:26:15 PDT 2012


Do not add the fractional part to the integral.

Signed-off-by: Daniel Martin <consume.noise at gmail.com>
---
 include/eventconvert.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/eventconvert.h b/include/eventconvert.h
index 4c56d53..cf86eb3 100644
--- a/include/eventconvert.h
+++ b/include/eventconvert.h
@@ -29,7 +29,7 @@
 #include "events.h"
 #include "eventstr.h"
 
-#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac) * (1 << 16))
+#define FP1616(integral, frac) ((integral) * (1 << 16) + (frac))
 
 _X_EXPORT int EventToCore(InternalEvent *event, xEvent **core, int *count);
 _X_EXPORT int EventToXI(InternalEvent *ev, xEvent **xi, int *count);
-- 
1.8.0



More information about the xorg-devel mailing list