Previously the scheduled task would only have been executed after some
other event woke up the mainloop.
If no such event happens, the task will be delayed significantly.
Fixes#1121
driver-sinowealth-nubwo.c was missing to include "config.h" so
_GNU_SOURCE wasn't defined soon enough.
Co-authored-by: Elián Hanisch <elian.hanisch@ing.unlp.edu.ar>
See my description of the problem in [1].
Essentially, docker is mishandling the failuire when a syscall is not
available, returning EPERM instead of ENOSYS, and making code misbehave.
The current issue with arch is glibc, which explodes on EPERM, causing
pacman to misbehave.
Once the fix hits CircleCI, we will re-enable.
[1] https://github.com/fwupd/fwupd/issues/2894
Signed-off-by: Filipe Laíns <lains@riseup.net>
This is the minimal code required to have a working driver, now we just
need a .device file.
Note the hardcoding of `profile->is_active = true` in
openinput_read_profile, this works because we just have one profile.
Signed-off-by: Filipe Laíns <lains@riseup.net>
Support for this receiver, and for the device using the powerplay
receiver, still needs to be added to the kernel driver. For now, you can
used the wired connection to configure the device.
You should also not try to use with the powerplay receiver as the kernel
driver does not support the connection and won't forward any input
events to userspace.
Signed-off-by: Filipe Laíns <lains@riseup.net>
Appears to be basically the same as the V2 - the differences were
mostly in hardware (upgraded switches & image sensor). I've verified
that the list of DPI settings is correct and matches the Windows
software. Adjusting DPI config in both profiles works correctly.
We have been receiving countless issues and PRs reporting or "fixing"
the device IDs because they think it's wrong. Hopefully this will give
them an hint that is intended behavior. If they look closely at the log,
on a recent enough kernel, they should see their device show up with the
internal ID.
Signed-off-by: Filipe Laíns <lains@archlinux.org>
Bump the required meson version to match the features that we make
use of.
We now also make use of the 'copy:' keyword in configure_file that
is available in version 0.47.
Compilation on clang failed as we would try to jump to
the 'out' label and then jump over the initialization
of a variable with __attribute__((cleanup)).
We move the initaliztion up to make sure it happens before
the goto.
The glorious mice uses a single profile. To differentiate between
resolutions each one has customizable color. A led on the bottom
of the mouse shows the active resolution color.
Libratbag does not support a per-resolution color.
To allow adjusting these colors the sinowealth driver defines a led
for each resolution. This is a misuse of the model and will cause
problems when the mouse is added to Piper.
This patch removes the per-resolution leds and hardcodes the led
count to one.
Nubwo X7 Spectrum is a sinowealth-based gaming mouse.
The sinowealth-nubwo driver included in this commit provides
- LED support (except color mode that are not available in libratbag)
- DPI and reporting support
- NO button mapping/macros support
When compiling on Ubuntu 20.04 with GCC 9.3.0 and glibc 2.31, I get:
In file included from ../src/libratbag-private.h:32,
from ../src/driver-sinowealth.c:24:
../src/libratbag-util.h: In function ‘asprintf_safe’:
../src/libratbag-util.h:154:7: warning: implicit declaration of function ‘vasprintf’; did you mean ‘vsprintf’? [-Wimplicit-function-declaration]
154 | rc = vasprintf(&result, fmt, args);
| ^~~~~~~~~
| vsprintf
This appears to be because <features.h> is being included by another
header before config.h has been included. If _GNU_SOURCE has not been
defined at that point, then the other macros that control whether
vasprintf is declared are not set correctly.
Include config.h right at the top of libratbag-private.h to ensure
that _GNU_SOURCE is defined before any system headers are included to
avoid this problem.
Before this patch, ratbagd would abort initialization of the device because
no profiles are returned.
Once that was handled more gracefully, ratbagd would fail because it doesn't
read the DpiList from its own config file, as no ProfileType is specified.
Specifying G500 as the closest match.