From 2f68856cf4b06e2a683bbd1b0d81d45487523577 Mon Sep 17 00:00:00 2001 From: Landrovan <> Date: Fri, 24 Mar 2017 22:20:29 -0400 Subject: [PATCH] First test for custom effects. --- makefile | 4 ++-- src/main.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index 850dda5..77714c0 100644 --- a/makefile +++ b/makefile @@ -2,10 +2,10 @@ CC=g++ CFLAGS=-Wall -O2 -std=gnu++11 LIB?=hidapi ifeq ($(LIB),libusb) - CPPFLAGS=-Dlibusb + CPPFLAGS=-Dlibusb -lpthread LDFLAGS=-lusb-1.0 else - CPPFLAGS=-Dhidapi + CPPFLAGS=-Dhidapi -lpthread LDFLAGS=-lhidapi-hidraw endif PROGN=g810-led diff --git a/src/main.cpp b/src/main.cpp index bd3dcae..3dfcd55 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -6,6 +6,7 @@ #include "helpers/help.h" #include "helpers/utils.h" #include "classes/Keyboard.h" +#include "classes/CustomEffects.h" int commit(LedKeyboard &kbd) { @@ -247,6 +248,8 @@ int main(int argc, char **argv) { else if (argc > 5 && arg == "-fx") return setFX(kbd, argv[2], argv[3], argv[4], argv[5]); else if (argc > 4 && arg == "-fx") return setFX(kbd, argv[2], argv[3], argv[4]); + else if (argc > 2 && arg == "-cfx") return StartCustomEffects( kbd, argc + 2, argv + 2 ); + else if (argc > 2 && arg == "--startup-mode") return setStartupMode(kbd, argv[2]); else { help::usage(argv[0]); return 1; }