diff --git a/drivers/Makefile b/drivers/Makefile index c8dc9ce..03a30d3 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -1,7 +1,7 @@ SUBDIRS := $(wildcard */.) BUILD_DIR=../build/ -all: $(BUILD_DIR)/drivers/ $(SUBDIRS) +all: $(BUILD_DIR)/drivers/ $(BUILD_DIR)/drivers/assets/ $(SUBDIRS) $(SUBDIRS): $(MAKE) -C $@ @@ -10,3 +10,5 @@ $(SUBDIRS): $(BUILD_DIR)/drivers/: mkdir -p $(BUILD_DIR)/drivers/ +$(BUILD_DIR)/drivers/assets/: + mkdir -p $(BUILD_DIR)/drivers/assets/ diff --git a/drivers/g-wolves/htx/Makefile b/drivers/g-wolves/htx/Makefile index d9f97a2..d879f80 100644 --- a/drivers/g-wolves/htx/Makefile +++ b/drivers/g-wolves/htx/Makefile @@ -7,4 +7,6 @@ BUILD_DIR=../../../build/ all: $(BUILD_DIR)/drivers/gwolves-htx.so $(BUILD_DIR)/drivers/gwolves-htx.so: htx.c | $(BUILD_DIR)/drivers/ - gcc $(CFLAGS) -o $@ $^ + $(CC) $(CFLAGS) -o $@ $^ +$(BUILD_DIR)/drivers/assets/gwolves-htx.png: htx_0.png | $(BUILD_DIR)/drivers/assets + cp $^ $@ diff --git a/drivers/g-wolves/htx/htx.c b/drivers/g-wolves/htx/htx.c index 7542846..c69b1bd 100644 --- a/drivers/g-wolves/htx/htx.c +++ b/drivers/g-wolves/htx/htx.c @@ -13,7 +13,7 @@ static int htx_send_command(libusb_device_handle* hand, uint8_t command, uint8_t 0x300, // wValue (FEATURE << 8 | REPORT(0)) 0x2, // wIndex = 0x2 : interface report, - 64, // wLength = 64 + REPORT_MAX_SIZE, // wLength = 64 0 /* timeout*/); if(res <= 0) return res; @@ -25,7 +25,7 @@ static int htx_send_command(libusb_device_handle* hand, uint8_t command, uint8_t 0x300, // wValue (FEATURE << 8 | REPORT(0)) 0x2, // wIndex = 0x2 : interface report, - 64, // wLength = 64 + REPORT_MAX_SIZE, // wLength = 64 0); return res; @@ -65,5 +65,5 @@ char* driver_get_name(void* handle) char* driver_get_image(void* handle) { - return "drivers/g-wolves/htx/htx_0.png"; + return "drivers/assets/gwolves-htx.png"; }