mirror of
https://github.com/MatMoul/g810-led.git
synced 2025-11-21 02:52:06 +00:00
Add G610 support
This commit is contained in:
@@ -394,6 +394,7 @@ bool Keyboard::parseKeyGroup(std::string key, KeyGroup &keyGroup) {
|
||||
}
|
||||
|
||||
bool Keyboard::parseColor(std::string color, KeyColors &colors) {
|
||||
if (color.length() == 2) color = color + "0000"; // For G610
|
||||
if (color.length() != 6) return false;
|
||||
colors.red = std::stoul("0x"+color.substr(0,2), nullptr, 16);
|
||||
colors.green = std::stoul("0x"+color.substr(2,2), nullptr, 16);
|
||||
|
||||
Reference in New Issue
Block a user