driver: g-wolves hsk pro support

This commit is contained in:
vhaudiquet 2023-09-27 17:16:44 +02:00
parent 134ebf724c
commit 9026d54920
5 changed files with 21 additions and 1 deletions

View File

@ -3,7 +3,7 @@ CFLAGS=$(shell pkg-config --cflags libusb-1.0) -O3 -Wall -shared
LDFLAGS=$(shell pkg-config --libs libusb-1.0)
ASSETS=$(shell find devices/ -name '*.png')
FINAL_ASSETS=$(BUILD_DIR)/drivers/assets/gwolves-htx.png
FINAL_ASSETS=$(BUILD_DIR)/drivers/assets/gwolves-htx.png $(BUILD_DIR)/drivers/assets/gwolves-hts_plus.png $(BUILD_DIR)/drivers/assets/gwolves-hsk_pro.png
BUILD_DIR=../../build/
all: $(BUILD_DIR)/drivers/g-wolves.so

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@ -0,0 +1,12 @@
#ifndef HSK_PRO_H
#define HSK_PRO_H
#define HSK_PRO_ACE_PRODUCT_ID_WIRED 0x5804
#define HSK_PRO_ACE_PRODUCT_ID_WIRELESS 0x5803
#define HSK_PRO_ACE_PRODUCT_NAME "HSK PRO ACE"
#define HSK_PRO_IMAGE "gwolves-hsk_pro.png"
#define HSK_PRO_DPI_MAX_VALUE 26000
#define HSK_PRO_DPI_MAX_LEVEL_COUNT 5
#endif

View File

@ -83,6 +83,9 @@ char* driver_get_name(void* handle)
case HTS_PLUS_4K_PRODUCT_ID_WIRED:
case HTS_PLUS_4K_PRODUCT_ID_WIRELESS:
return HTS_PLUS_4K_PRODUCT_NAME;
case HSK_PRO_ACE_PRODUCT_ID_WIRED:
case HSK_PRO_ACE_PRODUCT_ID_WIRELESS:
return HSK_PRO_ACE_PRODUCT_NAME;
default:
return "Unknown G-Wolves mice";
}
@ -103,6 +106,9 @@ char* driver_get_image(void* handle)
case HTS_PLUS_4K_PRODUCT_ID_WIRED:
case HTS_PLUS_4K_PRODUCT_ID_WIRELESS:
return HTS_PLUS_IMAGE;
case HSK_PRO_ACE_PRODUCT_ID_WIRED:
case HSK_PRO_ACE_PRODUCT_ID_WIRELESS:
return HSK_PRO_IMAGE;
default:
return "";
}

View File

@ -8,8 +8,10 @@
#include <stdbool.h>
#include <assert.h>
// Devices
#include "devices/htx.h"
#include "devices/hts_plus.h"
#include "devices/hsk_pro.h"
#define VENDOR_ID 0x33e4