Raw use of 0xFF as the effectpart byte is device-undefined and was
implemented as a wrapper around mutliplle native effects calls as well
as handling the indicators. Logic was previously implemented in the
application, allowing for library use in this particular case to have
undefined behavior.
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
Help output does not need to initialize a device, so rearrange
the parsing to check for help commands prior to performing
any device IO.
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
Change argument parsing to segregate options from the command
Add -dv -dp and -ds options to allow matching a vendor ID, device ID,
and/or device serial number.
Modify --list-keyboards to parse the DeviceInfo vector and output
information to stdout.
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
Allow filtration and matching of specified Device ID, Product ID, Serial
Number
Fix an issue in listKeyboards (hidapi) with an out of bounds search when
using serial number
Fix possible null reference problem in listKeyboards (hidapi) that
caused rare segfaults when traversing the device enumeration in
increments of two
Fix handling of output of listKeyboards (hidapi) where it was
incrementing the dev list pointer, then accessing the node to look for
device serial number (potential security risk)
Fix handling of serial number output of listKeyboards (hidapi) to handle
wchar_t instead of outputting the memory address
Fix issue in listKeyboards (libusb) failure to finish cleaning up USB
contexts, leading to a segfault if calling a separate function after
listing keyboards.
Fix issue in close (libusb) segfaulting if m_hidHandle was null, so
added a check.
Modify listKeyboards to provide a vector of DeviceInfo objects that can
be used by calling applications instead of outputting to stdout directly.
Implement a struct to hold information regarding device information and
ability for a library caller to query this information to make decisions
about the currently targeted device.
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>
Specified version string in makefile will now propogate to VERSION as a
macro appended to CFLAGS.
Cleaned up version string, quotes not necessary when specifying
major/minor/micro, though this is purely cosmetic.
Signed-off-by: Kevin Pearson <pearosn.kevin.m@gmail.com>
Currently supported:
- G213 by region {1..5}
- Standard FX calls
- Startup behavior
- Help and command-line app support
resolvesMatMoul/g810-led#69
Signed-off-by: Kevin Pearson <pearson.kevin.m@gmail.com>