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>
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>
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>
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.
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.
- coverity fixes
- new --version to ratbag-command
- cleaning up the meson build tools
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
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>
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>
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>
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>
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>
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>
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>
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>