1
0
mirror of https://github.com/MatMoul/g810-led.git synced 2024-12-24 17:56:11 +00:00

First test for custom effects.

This commit is contained in:
Landrovan 2017-03-24 22:20:29 -04:00
parent d0c5b91815
commit 060030036c
2 changed files with 5 additions and 2 deletions

View File

@ -2,10 +2,10 @@ CC=g++
CFLAGS=-Wall -O2 -std=gnu++11 CFLAGS=-Wall -O2 -std=gnu++11
LIB?=hidapi LIB?=hidapi
ifeq ($(LIB),libusb) ifeq ($(LIB),libusb)
CPPFLAGS=-Dlibusb CPPFLAGS=-Dlibusb -lpthread
LDFLAGS=-lusb-1.0 LDFLAGS=-lusb-1.0
else else
CPPFLAGS=-Dhidapi CPPFLAGS=-Dhidapi -lpthread
LDFLAGS=-lhidapi-hidraw LDFLAGS=-lhidapi-hidraw
endif endif
PROGN=g810-led PROGN=g810-led

View File

@ -6,6 +6,7 @@
#include "helpers/help.h" #include "helpers/help.h"
#include "helpers/utils.h" #include "helpers/utils.h"
#include "classes/Keyboard.h" #include "classes/Keyboard.h"
#include "classes/CustomEffects.h"
int commit(LedKeyboard &kbd) { 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 > 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 > 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 if (argc > 2 && arg == "--startup-mode") return setStartupMode(kbd, argv[2]);
else { help::usage(argv[0]); return 1; } else { help::usage(argv[0]); return 1; }