aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/getevents.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-09-09 14:11:17 +0000
committermarha <marha@users.sourceforge.net>2009-09-09 14:11:17 +0000
commit11f7ab896d77da81bff9e56a48e7280e5e57a2ee (patch)
treecc0f1b6d34483d0434cb99fe6f3c4a2bf43ec499 /xorg-server/dix/getevents.c
parent02dae3f63f25349271b42a22f2b284e9c7b06c31 (diff)
downloadvcxsrv-11f7ab896d77da81bff9e56a48e7280e5e57a2ee.tar.gz
vcxsrv-11f7ab896d77da81bff9e56a48e7280e5e57a2ee.tar.bz2
vcxsrv-11f7ab896d77da81bff9e56a48e7280e5e57a2ee.zip
Resynchronised with released branch.
Diffstat (limited to 'xorg-server/dix/getevents.c')
-rw-r--r--xorg-server/dix/getevents.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index e19d0ce11..1ff868190 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -63,7 +63,11 @@
#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */
#ifdef _MSC_VER
-#define lroundf(val) ((int)(val<0.0f)?val-.5f:val+.5f)
+float roundf(float f)
+{
+ return ((f<0.0f) ? ceil(f-.5) : floor (f+.5));
+}
+#define lroundf(val) ((int)roundf(val))
#endif
/* Number of motion history events to store. */
@@ -130,13 +134,6 @@ key_autorepeats(DeviceIntPtr pDev, int key_code)
(1 << (key_code & 7)));
}
-#ifdef _MSC_VER
-float roundf(float f)
-{
- return ((f<0.0f) ? ceil(f-.5) : floor (f+.5));
-}
-#endif
-
static void
init_event(DeviceIntPtr dev, DeviceEvent* event, Time ms)
{