diff options
Diffstat (limited to 'proto-vjoystick')
-rw-r--r-- | proto-vjoystick/CMakeLists.txt | 2 | ||||
-rw-r--r-- | proto-vjoystick/lang/nl_NL.ts | 16 | ||||
-rw-r--r-- | proto-vjoystick/lang/ru_RU.ts | 16 | ||||
-rw-r--r-- | proto-vjoystick/lang/stub.ts | 16 | ||||
-rw-r--r-- | proto-vjoystick/lang/zh_CN.ts | 18 | ||||
-rw-r--r-- | proto-vjoystick/vjoystick.cpp | 7 | ||||
-rw-r--r-- | proto-vjoystick/vjoystick.h | 1 | ||||
-rw-r--r-- | proto-vjoystick/vjoystick.ui | 2 |
8 files changed, 40 insertions, 38 deletions
diff --git a/proto-vjoystick/CMakeLists.txt b/proto-vjoystick/CMakeLists.txt index 3dbf5bea..5b6a1f07 100644 --- a/proto-vjoystick/CMakeLists.txt +++ b/proto-vjoystick/CMakeLists.txt @@ -11,6 +11,6 @@ if(WIN32 AND opentrack-intel) otr_module(proto-vjoy) target_link_libraries(opentrack-proto-vjoy ${lib}) target_include_directories(opentrack-proto-vjoy SYSTEM PUBLIC "${SDK_VJOYSTICK}/inc") - install(FILES "${dll}" DESTINATION ${opentrack-hier-pfx}) + install(FILES "${dll}" DESTINATION ${opentrack-libexec}) endif() endif() diff --git a/proto-vjoystick/lang/nl_NL.ts b/proto-vjoystick/lang/nl_NL.ts index a5ec2128..056563f7 100644 --- a/proto-vjoystick/lang/nl_NL.ts +++ b/proto-vjoystick/lang/nl_NL.ts @@ -20,10 +20,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>driver/SDK version mismatch</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Device missing. Add joystick #1.</source> <translation type="unfinished"></translation> </message> @@ -40,10 +36,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p>Go to the <a href="http://vjoystick.sourceforge.net/site/"><span style=" text-decoration: underline; color:#0000ff;">vjoystick</span></a> project site or <a href="https://sourceforge.net/projects/vjoystick/files/latest/download"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a>.</p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>BUG: handle leak.</source> <translation type="unfinished"></translation> </message> @@ -59,6 +51,14 @@ <source>Unknown error #%1.</source> <translation type="unfinished"></translation> </message> + <message> + <source>driver/SDK version mismatch (dll 0x%1, driver 0x%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><html><head/><body><p>Go to the <a href="https://github.com/jshafer817/vJoy"><span style=" text-decoration: underline; color:#0000ff;">vJoy</span></a> project site or <a href="https://github.com/jshafer817/vJoy/releases/tag/v2.1.9.1"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a> for Windows 10 and 11.</p></body></html></source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>vjoystick_metadata</name> diff --git a/proto-vjoystick/lang/ru_RU.ts b/proto-vjoystick/lang/ru_RU.ts index 47c93a83..4c9aacd3 100644 --- a/proto-vjoystick/lang/ru_RU.ts +++ b/proto-vjoystick/lang/ru_RU.ts @@ -20,10 +20,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>driver/SDK version mismatch</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Device missing. Add joystick #1.</source> <translation type="unfinished"></translation> </message> @@ -40,10 +36,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p>Go to the <a href="http://vjoystick.sourceforge.net/site/"><span style=" text-decoration: underline; color:#0000ff;">vjoystick</span></a> project site or <a href="https://sourceforge.net/projects/vjoystick/files/latest/download"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a>.</p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>BUG: handle leak.</source> <translation type="unfinished"></translation> </message> @@ -59,6 +51,14 @@ <source>Unknown error #%1.</source> <translation type="unfinished"></translation> </message> + <message> + <source>driver/SDK version mismatch (dll 0x%1, driver 0x%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><html><head/><body><p>Go to the <a href="https://github.com/jshafer817/vJoy"><span style=" text-decoration: underline; color:#0000ff;">vJoy</span></a> project site or <a href="https://github.com/jshafer817/vJoy/releases/tag/v2.1.9.1"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a> for Windows 10 and 11.</p></body></html></source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>vjoystick_metadata</name> diff --git a/proto-vjoystick/lang/stub.ts b/proto-vjoystick/lang/stub.ts index 078888fa..8ec5c042 100644 --- a/proto-vjoystick/lang/stub.ts +++ b/proto-vjoystick/lang/stub.ts @@ -20,10 +20,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>driver/SDK version mismatch</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Device missing. Add joystick #1.</source> <translation type="unfinished"></translation> </message> @@ -40,10 +36,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p>Go to the <a href="http://vjoystick.sourceforge.net/site/"><span style=" text-decoration: underline; color:#0000ff;">vjoystick</span></a> project site or <a href="https://sourceforge.net/projects/vjoystick/files/latest/download"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a>.</p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>BUG: handle leak.</source> <translation type="unfinished"></translation> </message> @@ -59,6 +51,14 @@ <source>Unknown error #%1.</source> <translation type="unfinished"></translation> </message> + <message> + <source>driver/SDK version mismatch (dll 0x%1, driver 0x%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><html><head/><body><p>Go to the <a href="https://github.com/jshafer817/vJoy"><span style=" text-decoration: underline; color:#0000ff;">vJoy</span></a> project site or <a href="https://github.com/jshafer817/vJoy/releases/tag/v2.1.9.1"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a> for Windows 10 and 11.</p></body></html></source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>vjoystick_metadata</name> diff --git a/proto-vjoystick/lang/zh_CN.ts b/proto-vjoystick/lang/zh_CN.ts index 078888fa..95192e1d 100644 --- a/proto-vjoystick/lang/zh_CN.ts +++ b/proto-vjoystick/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>vjoystick</name> <message> @@ -20,10 +20,6 @@ <translation type="unfinished"></translation> </message> <message> - <source>driver/SDK version mismatch</source> - <translation type="unfinished"></translation> - </message> - <message> <source>Device missing. Add joystick #1.</source> <translation type="unfinished"></translation> </message> @@ -40,10 +36,6 @@ <translation type="unfinished"></translation> </message> <message> - <source><html><head/><body><p>Go to the <a href="http://vjoystick.sourceforge.net/site/"><span style=" text-decoration: underline; color:#0000ff;">vjoystick</span></a> project site or <a href="https://sourceforge.net/projects/vjoystick/files/latest/download"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a>.</p></body></html></source> - <translation type="unfinished"></translation> - </message> - <message> <source>BUG: handle leak.</source> <translation type="unfinished"></translation> </message> @@ -59,6 +51,14 @@ <source>Unknown error #%1.</source> <translation type="unfinished"></translation> </message> + <message> + <source>driver/SDK version mismatch (dll 0x%1, driver 0x%2)</source> + <translation type="unfinished"></translation> + </message> + <message> + <source><html><head/><body><p>Go to the <a href="https://github.com/jshafer817/vJoy"><span style=" text-decoration: underline; color:#0000ff;">vJoy</span></a> project site or <a href="https://github.com/jshafer817/vJoy/releases/tag/v2.1.9.1"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a> for Windows 10 and 11.</p></body></html></source> + <translation type="unfinished"></translation> + </message> </context> <context> <name>vjoystick_metadata</name> diff --git a/proto-vjoystick/vjoystick.cpp b/proto-vjoystick/vjoystick.cpp index f322ced9..292e8259 100644 --- a/proto-vjoystick/vjoystick.cpp +++ b/proto-vjoystick/vjoystick.cpp @@ -88,7 +88,7 @@ int vjoystick::to_axis_value(unsigned axis_id, double val) const const double min = axis_min[axis_id]; const double max = axis_max[axis_id]; - return (int)(clamp((val+minmax) * max / (2*minmax) - min, min, max)); + return (int)(std::clamp((val+minmax) * max / (2*minmax) - min, min, max)); } vjoystick::vjoystick() = default; @@ -104,8 +104,11 @@ module_status vjoystick::initialize() if (!vJoyEnabled()) msg = tr("vjoystick won't work without the driver installed."); +#if 0 else if (WORD VerDll, VerDrv; !DriverMatch(&VerDll, &VerDrv)) - msg = tr("driver/SDK version mismatch"); + msg = tr("driver/SDK version mismatch (dll 0x%1, driver 0x%2)") + .arg(QString::number(VerDll, 16), QString::number(VerDrv, 16)); +#endif else { int code; diff --git a/proto-vjoystick/vjoystick.h b/proto-vjoystick/vjoystick.h index 39bc14e3..82ebd3e6 100644 --- a/proto-vjoystick/vjoystick.h +++ b/proto-vjoystick/vjoystick.h @@ -8,7 +8,6 @@ #pragma once #include "ui_vjoystick.h" #include "api/plugin-api.hpp" -#include "compat/macros.hpp" enum status { diff --git a/proto-vjoystick/vjoystick.ui b/proto-vjoystick/vjoystick.ui index 5bfdb02a..8092898b 100644 --- a/proto-vjoystick/vjoystick.ui +++ b/proto-vjoystick/vjoystick.ui @@ -21,7 +21,7 @@ <item row="0" column="0"> <widget class="QLabel" name="label"> <property name="text"> - <string><html><head/><body><p>Go to the <a href="http://vjoystick.sourceforge.net/site/"><span style=" text-decoration: underline; color:#0000ff;">vjoystick</span></a> project site or <a href="https://sourceforge.net/projects/vjoystick/files/latest/download"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a>.</p></body></html></string> + <string><html><head/><body><p>Go to the <a href="https://github.com/jshafer817/vJoy"><span style=" text-decoration: underline; color:#0000ff;">vJoy</span></a> project site or <a href="https://github.com/jshafer817/vJoy/releases/tag/v2.1.9.1"><span style=" text-decoration: underline; color:#0000ff;">download directly</span></a> for Windows 10 and 11.</p></body></html></string> </property> <property name="alignment"> <set>Qt::AlignCenter</set> |