From a7bd3687b36c7b93c86a213ea7e4ee52fb1816ba Mon Sep 17 00:00:00 2001 From: MatMoul Date: Sat, 29 Oct 2016 22:22:30 +0200 Subject: [PATCH] Add support of multiple pid --- src/main.cpp | 80 ++++++++++++++++++++++++++++++++-------------------- 1 file changed, 50 insertions(+), 30 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 660314d..f9b8ebb 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,4 +1,5 @@ #include +#include #include #include #include @@ -10,7 +11,7 @@ using namespace std; -int lg_pid = 0xc331; // g810 by default +int lg_pid; // = 0xc331; // g810 by default void usage() { string appname = "g810-led"; @@ -47,33 +48,6 @@ void usage() { cout< 1) { string argCmd = argv[1]; if (argCmd == "-h" || argCmd == "--help") { usage(); return 0; } - else if (argCmd == "list") { listKeyboards(); return 0; } else if (argCmd == "-s" && argc == 3) return setStartupEffect(argv[2]); else if (argCmd == "-a" && argc == 3) return setAllKeys(argv[2], true); else if (argCmd == "-an" && argc == 3) return setAllKeys(argv[2], false);