diff options
Diffstat (limited to 'proto-libevdev/ftnoir_protocol_libevdev.cpp')
-rw-r--r-- | proto-libevdev/ftnoir_protocol_libevdev.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/proto-libevdev/ftnoir_protocol_libevdev.cpp b/proto-libevdev/ftnoir_protocol_libevdev.cpp index 612f5b27..72c05dc5 100644 --- a/proto-libevdev/ftnoir_protocol_libevdev.cpp +++ b/proto-libevdev/ftnoir_protocol_libevdev.cpp @@ -1,4 +1,10 @@ // strerror_r(3) + +#ifdef __clang__ +# pragma clang diagnostic ignored "-Wreserved-id-macro" +# pragma clang diagnostic ignored "-Wunused-macros" +#endif + #ifndef _POSIX_C_SOURCE # define _POSIX_C_SOURCE 200112L #endif @@ -113,7 +119,7 @@ void evdev::pose(const double* headpose) { for (int i = 0; i < 6; i++) { - int value = headpose[i] * mid_input / max_value[i] + mid_input; + int value = (int)(headpose[i] * mid_input / max_value[i] + mid_input); int normalized = clamp(value, min_input, max_input); (void) libevdev_uinput_write_event(uidev, EV_ABS, axes[i], normalized); } |