diff options
Diffstat (limited to 'proto-vjoystick/vjoystick.cpp')
-rw-r--r-- | proto-vjoystick/vjoystick.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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; |