summaryrefslogtreecommitdiffhomepage
path: root/proto-libevdev
diff options
context:
space:
mode:
Diffstat (limited to 'proto-libevdev')
-rw-r--r--proto-libevdev/ftnoir_protocol_libevdev.cpp7
-rw-r--r--proto-libevdev/ftnoir_protocol_libevdev.h1
-rw-r--r--proto-libevdev/lang/de_DE.ts37
-rw-r--r--proto-libevdev/lang/zh_CN.ts2
4 files changed, 44 insertions, 3 deletions
diff --git a/proto-libevdev/ftnoir_protocol_libevdev.cpp b/proto-libevdev/ftnoir_protocol_libevdev.cpp
index 5b07beff..fefcd9bb 100644
--- a/proto-libevdev/ftnoir_protocol_libevdev.cpp
+++ b/proto-libevdev/ftnoir_protocol_libevdev.cpp
@@ -55,6 +55,11 @@ evdev::evdev()
CHECK_LIBEVDEV(libevdev_enable_property(dev, INPUT_PROP_BUTTONPAD));
libevdev_set_name(dev, "opentrack headpose");
+
+ libevdev_set_id_bustype(dev, 3);
+ libevdev_set_id_vendor(dev, 4324);
+ libevdev_set_id_product(dev, 3798);
+ libevdev_set_id_version(dev, 123);
struct input_absinfo absinfo;
@@ -120,7 +125,7 @@ void evdev::pose(const double* headpose, const double*) {
for (int i = 0; i < 6; i++)
{
int value = (int)(headpose[i] * mid_input / max_value[i] + mid_input);
- int normalized = clamp(value, min_input, max_input);
+ int normalized = std::clamp(value, min_input, max_input);
(void) libevdev_uinput_write_event(uidev, EV_ABS, axes[i], normalized);
}
diff --git a/proto-libevdev/ftnoir_protocol_libevdev.h b/proto-libevdev/ftnoir_protocol_libevdev.h
index 0b0f2612..b81c3baf 100644
--- a/proto-libevdev/ftnoir_protocol_libevdev.h
+++ b/proto-libevdev/ftnoir_protocol_libevdev.h
@@ -7,7 +7,6 @@
#pragma once
#include "ui_ftnoir_libevdev_controls.h"
-#include "compat/macros.hpp"
#include "api/plugin-api.hpp"
#include <libevdev/libevdev.h>
#include <libevdev/libevdev-uinput.h>
diff --git a/proto-libevdev/lang/de_DE.ts b/proto-libevdev/lang/de_DE.ts
new file mode 100644
index 00000000..f66a1b39
--- /dev/null
+++ b/proto-libevdev/lang/de_DE.ts
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE TS>
+<TS version="2.1" language="de_DE">
+<context>
+ <name>UICLibevdevControls</name>
+ <message>
+ <source>libevdev options</source>
+ <translation>libevdev-Optionen</translation>
+ </message>
+ <message>
+ <source>Make sure rw for /dev/input/uinput!</source>
+ <translation>Stelle sicher, dass /dev/input/uinput rw-Berechtigungen hat!</translation>
+ </message>
+ <message>
+ <source>OK</source>
+ <translation>Okay</translation>
+ </message>
+ <message>
+ <source>Cancel</source>
+ <translation>Abbruch</translation>
+ </message>
+</context>
+<context>
+ <name>evdev</name>
+ <message>
+ <source>Virtual joystick for Linux</source>
+ <translation>Virtueller Joystick für Linux</translation>
+ </message>
+</context>
+<context>
+ <name>evdevDll</name>
+ <message>
+ <source>libevdev joystick receiver</source>
+ <translation>libevdev-Joystick-Empfänger</translation>
+ </message>
+</context>
+</TS>
diff --git a/proto-libevdev/lang/zh_CN.ts b/proto-libevdev/lang/zh_CN.ts
index ffafa2ec..f5e8694c 100644
--- a/proto-libevdev/lang/zh_CN.ts
+++ b/proto-libevdev/lang/zh_CN.ts
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.1">
+<TS version="2.1" language="zh_CN">
<context>
<name>UICLibevdevControls</name>
<message>