summaryrefslogtreecommitdiffhomepage
path: root/proto-libevdev
diff options
context:
space:
mode:
Diffstat (limited to 'proto-libevdev')
-rw-r--r--proto-libevdev/ftnoir_libevdev_controls.ui2
-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/nl_NL.ts8
-rw-r--r--proto-libevdev/lang/ru_RU.ts8
-rw-r--r--proto-libevdev/lang/stub.ts8
-rw-r--r--proto-libevdev/lang/zh_CN.ts10
8 files changed, 61 insertions, 20 deletions
diff --git a/proto-libevdev/ftnoir_libevdev_controls.ui b/proto-libevdev/ftnoir_libevdev_controls.ui
index d2b86445..8aa52627 100644
--- a/proto-libevdev/ftnoir_libevdev_controls.ui
+++ b/proto-libevdev/ftnoir_libevdev_controls.ui
@@ -14,7 +14,7 @@
</rect>
</property>
<property name="windowTitle">
- <string>VJoy</string>
+ <string>libevdev options</string>
</property>
<property name="windowIcon">
<iconset>
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/nl_NL.ts b/proto-libevdev/lang/nl_NL.ts
index 462ea6fc..d6a2c333 100644
--- a/proto-libevdev/lang/nl_NL.ts
+++ b/proto-libevdev/lang/nl_NL.ts
@@ -4,10 +4,6 @@
<context>
<name>UICLibevdevControls</name>
<message>
- <source>VJoy</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Make sure rw for /dev/input/uinput!</source>
<translation type="unfinished"></translation>
</message>
@@ -19,6 +15,10 @@
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>libevdev options</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>evdev</name>
diff --git a/proto-libevdev/lang/ru_RU.ts b/proto-libevdev/lang/ru_RU.ts
index f659b1dd..c6310cd0 100644
--- a/proto-libevdev/lang/ru_RU.ts
+++ b/proto-libevdev/lang/ru_RU.ts
@@ -4,10 +4,6 @@
<context>
<name>UICLibevdevControls</name>
<message>
- <source>VJoy</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Make sure rw for /dev/input/uinput!</source>
<translation type="unfinished"></translation>
</message>
@@ -19,6 +15,10 @@
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>libevdev options</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>evdev</name>
diff --git a/proto-libevdev/lang/stub.ts b/proto-libevdev/lang/stub.ts
index 5250e21a..ffafa2ec 100644
--- a/proto-libevdev/lang/stub.ts
+++ b/proto-libevdev/lang/stub.ts
@@ -4,10 +4,6 @@
<context>
<name>UICLibevdevControls</name>
<message>
- <source>VJoy</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Make sure rw for /dev/input/uinput!</source>
<translation type="unfinished"></translation>
</message>
@@ -19,6 +15,10 @@
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>libevdev options</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>evdev</name>
diff --git a/proto-libevdev/lang/zh_CN.ts b/proto-libevdev/lang/zh_CN.ts
index 5250e21a..f5e8694c 100644
--- a/proto-libevdev/lang/zh_CN.ts
+++ b/proto-libevdev/lang/zh_CN.ts
@@ -1,13 +1,9 @@
<?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>
- <source>VJoy</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
<source>Make sure rw for /dev/input/uinput!</source>
<translation type="unfinished"></translation>
</message>
@@ -19,6 +15,10 @@
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
+ <message>
+ <source>libevdev options</source>
+ <translation type="unfinished"></translation>
+ </message>
</context>
<context>
<name>evdev</name>