Prior to this change, the x52d virtual mouse logic was assuming that the
joystick would only send one report with the wheel button state as "on",
and subsequent reports would be "off". However, with some joysticks, the
other axis sensors could be faulty or noisy, and the joystick could send
multiple reports with the mouse button "on", without an "off" state in
between. This was causing scroll events to be much faster than would be
expected (1 mouse scroll to 1 screen scroll event)
This change should fix the problem, by comparing the value of the
previous button state. This should now trigger a wheel event only on a
rising edge (from "off" to "on").
See #46
macOS 12 builds are currently failing with the following error:
ld: warning: -undefined dynamic_lookup may not work with chained fixups
This is causing the overall CI to fail, therefore, I am disabling it
until such time that this can be fixed.
When building the package for PPA, gcc throws errors indicating that
some variables may be used uninitialized. This is not a real problem
that shows up during the CI build, but only when building using
dpkg-buildpackage.
This change adds some dummy initialization so that it avoids triggering
those warnings during debuild/dpkg-buildpackage.
The notify module controls the logging settings for the notify socket
code. While missing this doesn't cause any impact to the notify code, an
invalid module name sent on the command socket could cause the daemon to
crash with a NULL pointer access.
libusb requires the application to call one of the
`libusb_handle_events` functions in order for hotplug events to actually
get dispatched. We don't need to wait for any timeout, so we use a
default timeout of 0, which should process any pending events, and then
return immediately.
A test of repeatedly disconnecting and reconnecting a virtual device
using USBIP was done, and no crashes of the daemon were observed.
Github-Issue: https://github.com/nirenjan/libx52/issues/43
This change adds logic to block signals on child threads. This is done
so that we can migrate signal handling to the main thread, even if we
add additional threads in the future.
This change adds a ReverseScroll parameter to the configuration, which
if set, will change the direction of the scroll wheel of the virtual
mouse.
Github-Issue: #45
This change adds support for the public beta of Ubuntu 22.04 and
macOS 12. As this is a beta, this change also updates the
continue-on-error field to indicate that a build failure on the 22.04
runner should not cause the rest of the build to fail.
[skip doxy]
When building with coverage enabled, the compiler complains about
missing definitions for setlocale and LC_ALL. These can be found in
locale.h, and by including it in gettext.h, we can ensure that we won't
see any more such issues.
Since the introduction of X macros to the CLI handling code, there will
never be a condition where the handler will be NULL. This is a legacy
check from when the code had individual maps that were maintained by
hand.
Prior to this change, on failure condition, x52cli would exit with a
code that mapped directly to the return code of the function. This was
inconsistent with the behaviour if the initialization or connect steps
failed for any reason.
When running in foreground, it is likely that it is running within
systemd. In this case, a stale PID file is likely to have a PID that
corresponds to a different process, which can still be kill'ed by the
root user. This results in a false positive that the process is still
running and causes the daemon to abort prematurely.
Fixes#42
This change adds a test suite for validating mouse configuration. This
only tests the logic for mouse thread enable/disable and mouse speed
calculations.
Prior to this change, the Git version was only getting generated when
the call was made to autoreconf. This was resulting in stale version
info.
This change, by contrast, generates the build info at the call to make.
While this doesn't completely eliminate the stale version issue, it's
easier to work around, by simply running `make clean`, `make`.