driver: g-wolves image changes

master
vhaudiquet 1 year ago
parent 4b94d2adb8
commit 3e7db63e74
  1. 5
      drivers/g-wolves/devices/hts_plus.h
  2. 1
      drivers/g-wolves/devices/htx.h
  3. 17
      drivers/g-wolves/g-wolves.c

@ -5,7 +5,8 @@
#define HTS_PLUS_4K_PRODUCT_ID_WIRELESS 0x5407 #define HTS_PLUS_4K_PRODUCT_ID_WIRELESS 0x5407
#define HTS_PLUS_4K_PRODUCT_NAME "HTS+ 4K" #define HTS_PLUS_4K_PRODUCT_NAME "HTS+ 4K"
#define HTS_DPI_MAX_VALUE 26000 #define HTS_PLUS_IMAGE "gwolves-hts_plus.png"
#define HTS_DPI_MAX_LEVEL_COUNT 5 #define HTS_PLUS_DPI_MAX_VALUE 26000
#define HTS_PLUS_DPI_MAX_LEVEL_COUNT 5
#endif #endif

@ -5,6 +5,7 @@
#define HTX_4K_PRODUCT_ID_WIRELESS 0x5707 #define HTX_4K_PRODUCT_ID_WIRELESS 0x5707
#define HTX_4K_PRODUCT_NAME "HTX 4K" #define HTX_4K_PRODUCT_NAME "HTX 4K"
#define HTX_IMAGE "gwolves-htx.png"
#define HTX_DPI_MAX_VALUE 26000 #define HTX_DPI_MAX_VALUE 26000
#define HTX_DPI_MAX_LEVEL_COUNT 5 #define HTX_DPI_MAX_LEVEL_COUNT 5

@ -97,5 +97,20 @@ char* driver_get_name(void* handle)
char* driver_get_image(void* handle) char* driver_get_image(void* handle)
{ {
return "drivers/assets/gwolves-htx.png"; libusb_device* dev = handle;
struct libusb_device_descriptor desc;
libusb_get_device_descriptor(dev, &desc);
switch(desc.idProduct)
{
case HTX_4K_PRODUCT_ID_WIRED:
case HTX_4K_PRODUCT_ID_WIRELESS:
return HTX_IMAGE;
case HTS_PLUS_4K_PRODUCT_ID_WIRED:
case HTS_PLUS_4K_PRODUCT_ID_WIRELESS:
return HTS_PLUS_IMAGE;
default:
return "";
}
} }

Loading…
Cancel
Save