mirror of
https://github.com/MatMoul/g810-led.git
synced 2024-12-25 02:06:11 +00:00
First test for custom effects.
This commit is contained in:
parent
d0c5b91815
commit
2f68856cf4
4
makefile
4
makefile
@ -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
|
||||||
|
@ -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; }
|
||||||
|
Loading…
Reference in New Issue
Block a user