This configure.ac is largely a copy from systemd so it included things that we
don't use locally.
- we don't use grep, awk or ln
- AC_SYS_LARGEFILE and AC_CANONICAL_HOST are unecessary
- pkg.m4 - if that's missing you don't have pkgconfig installed. stop trying
to build things then :)
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
On the G9 the response to a 0x63 is a short report. The G9 does
not have individual resolutions for X and Y and thus only needs
to report a single value.
The set version of 0x63 should probably also be updated. However,
while my testing of such a change worked better than with long
reports there are still strange side effects of setting resolution,
like turning off all the LED's. LGS also seems to do a full profile
read/write instead of using 0x63 when changing the resolution.
Exporting just the filename requires the caller to know where that file sits.
That's useful for things like e.g. icons where callers may several sets to
chose from but here most callers will just use the default svg provided by
libratbag.
Export that, so that we don't have build-time dependencies in the callers just
for that single path.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
It's a lot easier to interact with ratbagd from a python script than it is
with C code. Plus this means we test the bindings whenever we use ratbagctl.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The G303 shares the same profile than the G402/G502. The only difference
is an extension at the end of the profile, but they are compatible.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Mostly inherited from our zalloc() implementation. But really,
if you have no memory left, should you be trying to talk to receivers?
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
There are 10 buttons defined in the profile but only 9 physical
buttons. LGS also only allows to configure 9 of them. Button 5
is the "dead" button in the list.
Get_Profile_Info gives valuable information to know if we are compatible
with a given device. Use it and bail out if we are not able to support
the device.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Spec says the profile count is stored in byte 3 of
CMD_ONBOARD_PROFILES_GET_PROFILES_DESCR, so use this to allocate the proper
number of profiles.
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This reverts the version number but ratbagd is nowhere near stable (because
libratbag itself isn't stable yet) and the dbus API can change at any time.
I'm not committing to keeping the current dbus API around for backwards
compatibility reasons.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>