Commit Graph

1475 Commits

Author SHA1 Message Date
Benjamin Tissoires
a4b177436d hidpp20: take into account sectors on 16bits
First part of fixing #122.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-05-29 10:33:33 +10:00
Benjamin Tissoires
8367569236 hidpp10: fix coverity issue
profile->dpi_modes[i].led[] is an array of boolean.
Given that the callers (hidpp10_fill_dpi_modes_*()) already are doing the
comparison against 0x02, I guess this is just copy/paste error.

Fixes #152

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-05-29 10:32:08 +10:00
Benjamin Tissoires
5bbb2b28ea hidpp20drv: switch to the commit API
I do not like duplicating ratbag_old_write_profile() into each driver,
but, heh.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-05-29 09:15:07 +10:00
bentiss
2b92ab6dd6 hidpp20drv: fix segfault with G502 (#163)
When using the G502 without RGB LEDs, the feature 8070 is not here.
And this segfaults :)

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
2017-05-24 11:52:56 +03:00
Christian Kellner
c05c3dcaa3 tools: consistently call led mode "breathing"
Rename "breath" in the help text and reporting for the led mode to
"breathing". The actual command to set the mode was already called
that way.

Signed-off-by: Christian Kellner <christian@kellner.me>
2017-05-24 09:05:15 +10:00
Jente Hidskes
dd71c23a04 resolution: add set_default method
Fixes #8.
2017-05-23 13:30:21 +10:00
Jente Hidskes
299c49c291 README: remove ambiguity in signal descriptions 2017-05-17 12:50:35 +10:00
Jente Hidskes
b1feabaf64 resolution: add signal for active resolution changes
This implements a signal that is fired whenever the active resolution
changes. For now the signal is only fired when the resolution changes
through the setter, ratbagd_resolution_set_resolution, as profile changes may
not always be hooked up in the hardware.

Reference #8.
2017-05-17 12:50:35 +10:00
Jente Hidskes
2722e008e0 profile: add signal for active profile changes
This implements a signal that is fired whenever the active profile
changes. For now the signal is only fired when the profile changes
through the setter, ratbagd_profile_set_active, as profile changes may
not always be hooked up in the hardware.

Fixes #7.
2017-05-17 12:50:35 +10:00
Benjamin Tissoires
178b08cd0a ratbagd 0.3
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
2017-05-12 16:35:41 +02:00
Benjamin Tissoires
bf20845249 meson.build: libratbag 0.8
- coverity fixes
- new --version to ratbag-command
- cleaning up the meson build tools

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
v0.8
2017-05-09 14:55:15 +02:00
Jente Hidskes
4dc15451b7 README: s/make install/ninja install/ 2017-05-09 14:38:38 +02:00
Jente Hidskes
3a764b6aae README: replace configure switches with mesonconf switches 2017-05-09 14:38:38 +02:00
Jente Hidskes
190e78c79c README: small documentation fixes 2017-05-09 14:38:38 +02:00
Peter Hutterer
eb01399f26 tools: fix OOB for LED color parsing
Let's not forget about the null-terminator, he feels lonely otherwise.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-09 10:14:47 +02:00
Peter Hutterer
c815654c94 tools: add --version to ratbag-command
Behold, the glory of our version number!

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-09 09:24:41 +02:00
Peter Hutterer
f1ce908b50 meson: quote the libratbag version properly
Otherwise ETOOMANYDECIMALSEPARATORS, confusion, mayham, anarchy, the lot.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-09 09:24:41 +02:00
Peter Hutterer
fb07204d9f meson: drop garbage argument from configure_file
Unsurprisingly, meson does not support the ratbag keyword argument. Though it
should, because we're great. But anyway, this lead to the argument being
ignored which means it didn't get an 'input' argument, which means that
libratbag-version.h.in was ignored. And since it all works anyway (Behold! The
magic! Ooooh! Aaaah!) we can just drop that file.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-09 09:24:41 +02:00
Peter Hutterer
1e5648b11d tools: terminate option list with a zero entry
Because, well, that's what we're supposed to do. Unless you want to think
outside the (array) box, but that has never helped anyone, has it?

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-09 09:24:41 +02:00
Peter Hutterer
0902e3420f tools: replace getopt magic number 2 with 'optional_argument'
So *that's* what 2 means...

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-09 09:24:41 +02:00
Peter Hutterer
2750f8c49b Mark the unknown button type as explicit fallthrough
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-09 07:50:21 +10:00
Peter Hutterer
57ffc9c5d3 meson: drop a bunch of compiler flags
These all affect the final executable and should be under the control of the
distro.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-09 07:50:21 +10:00
Jente Hidskes
a2b858008f meson: use join_paths with dbusdir for consistency 2017-05-08 20:44:30 +10:00
Jente Hidskes
28956126ec meson: correctly install service files
https://github.com/libratbag/ratbagd/issues/18
2017-05-08 20:44:30 +10:00
Peter Hutterer
698d8ab365 Replace ifndef include guards with pragma once
Now that we use meson exclusively and meson uses this for its config.h, you
wouldn't get around it anyway. Besides, the main compilers support it and
libratbag is too niche to worry about others.

This also *adds* the pragma to tools/shared.h where it was previously missing,
and changes it to be the top statement in hidpp-generic.h

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-05 09:02:15 +02:00
Peter Hutterer
44471d3c42 meson: use warning_level=2 instead of manual -Wall -Wextra
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 10:14:50 +02:00
Peter Hutterer
ad1fa22196 hidpp10: fix out-of-bounds access
sizeof() gives us twice as many elements as we have indices for on this 16-bit
array.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
04ebd96bb7 roccat: fix the neverending story^Wtimeout
If we don't change count, the value of count < MAX_RETRY is always true.

Coverity is a champ, isn't it?

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
09b5ae14b1 liblur: fix memory leak
Rather than having a bunch of gotos just define a cleanup for this device and
let the magic do the rest.

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
8aa127186c gskill: fix memory leak
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
a962082173 hidpp20: constify a helper function
Just because we can

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
5c0dbe4d5c hidpp20: fix dereference before null check
Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
5934816b11 tools: check for negative index coming from argv
Coverity is unhappy.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
28dd84713f Reset the button action struct to zero before use
A semi false-positive from Coverity, because action.macro is unset. Doesn't
matter because we never use it, but having it zeroed is the nice thing to do
(and what we do in the other functions).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
11b31cf9bd Fix a comment typo
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
dfd2d88953 tools: fix coverity warnings
Assigned but not used.

Found by coverity

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:52:59 +02:00
Peter Hutterer
6a097bd691 meson: drop -g, the meson buildtype option takes care of that
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:49:34 +02:00
Peter Hutterer
2776d1ce8e meson: use warning_level=2 instead of manual -Wall -Wextra
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-05-02 09:49:34 +02:00
Peter Hutterer
fa12517fb2 Drop autotools
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 10:13:56 +02:00
Peter Hutterer
9624d1bdcd Add meson build file
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 10:13:56 +02:00
Peter Hutterer
8f7bf150df Use automake to generate ratbagctl
All we do is a single sed, we can leave that to automake.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 10:13:56 +02:00
Peter Hutterer
f5270e1539 Change the sed replacement for meson's benefit
No functional changes

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 10:13:56 +02:00
Peter Hutterer
0834b210ca Remove now-obsolete autogen.sh script
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 08:26:07 +02:00
Peter Hutterer
cc41adbbf9 gitignore: drop build/ from gitignore again
As pointed out elsewhere, the build directory is decided by the user and
should thus be a user-specific gitignore configuration.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-26 08:26:07 +02:00
Peter Hutterer
8944353716 Update for new caps in libratbag 0.6
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-25 08:26:14 +02:00
Peter Hutterer
53ff42ea55 README: remove the compilation instructions for systemd
By now you should have 229.

And replace the instructions with actual ratbagd build instructions.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-25 08:26:14 +02:00
Peter Hutterer
63a666025f Update gitignore for meson
Drop all automake detritus, leave only the default build directory meson
suggests

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-25 08:11:40 +02:00
Peter Hutterer
25a92e61ef configure.ac: drop xslt check
Some leftover from the triassic period or so

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-24 10:13:22 +02:00
Peter Hutterer
70a33ec78d Drop AM_MAINTAINER_MODE
This isn't useful

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-24 10:13:22 +02:00
Peter Hutterer
d358d7433b Include config.h before anything else
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2017-04-24 10:13:22 +02:00