Browse Source

Fix settings not "sticking" for some users

Setting the keyboard mode after setting the colors causes the colors to be applied immediately. This is how the nodejs module does it.
master
Nolan Reker 8 years ago
parent
commit
a879e4a4ff
  1. 11
      main.cpp

11
main.cpp

@ -188,11 +188,7 @@ Example:
return 1;
}else{
Keyboard k;
if(keyboardOptions.modeSet) {
k.setMode(keyboardOptions.modeOption);
}
if(keyboardOptions.colorSet) {
for(int i = 0; i < keyboardOptions.colorOptions.count(); ++i) {
ColorOption *colorOption = keyboardOptions.colorOptions.at(i);
@ -200,6 +196,11 @@ Example:
k.setColor(colorOption->region, colorOption->color, colorOption->intensity);
}
}
if(keyboardOptions.modeSet) {
k.setMode(keyboardOptions.modeOption);
}
}
/*k.setMode(MODE_NORMAL);

Loading…
Cancel
Save