aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/getevents.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/dix/getevents.c')
-rw-r--r--xorg-server/dix/getevents.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xorg-server/dix/getevents.c b/xorg-server/dix/getevents.c
index 2912c1e85..e19d0ce11 100644
--- a/xorg-server/dix/getevents.c
+++ b/xorg-server/dix/getevents.c
@@ -62,6 +62,10 @@
#include "extnsionst.h"
#include "listdev.h" /* for sizing up DeviceClassesChangedEvent */
+#ifdef _MSC_VER
+#define lroundf(val) ((int)(val<0.0f)?val-.5f:val+.5f)
+#endif
+
/* Number of motion history events to store. */
#define MOTION_HISTORY_SIZE 256
@@ -126,6 +130,13 @@ 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)
{