add wireless support

This commit is contained in:
2026-07-29 21:16:35 +02:00
parent de20c7002d
commit 3c62c2e928
2 changed files with 12 additions and 3 deletions
+6 -2
View File
@@ -7,8 +7,12 @@
#include <stdbool.h> #include <stdbool.h>
#include "libusb-1.0.30/libusb/libusb.h" #include "libusb-1.0.30/libusb/libusb.h"
// mouse pid // mouse pids
#define TARGET_VID 0x3554 #define TARGET_VID 0x3554
#define TARGET_PID 0xf54d #define TARGET_PID_WIRED 0xf54d
#define TARGET_PID_WIRELESS 0xf54f
// mouse pid helper
#define IS_TARGET_PID(pid) ((pid) == TARGET_PID_WIRED || (pid) == TARGET_PID_WIRELESS)
#endif #endif
+6 -1
View File
@@ -10,7 +10,12 @@ void run_driver(int sens) {
return; return;
} }
handle = libusb_open_device_with_vid_pid(NULL, TARGET_VID, TARGET_PID); // wired/wireless support
handle = libusb_open_device_with_vid_pid(NULL, TARGET_VID, TARGET_PID_WIRED);
if (!handle) {
handle = libusb_open_device_with_vid_pid(NULL, TARGET_VID, TARGET_PID_WIRELESS);
}
if (!handle) { if (!handle) {
fprintf(stderr, "mouse not found!!\n"); fprintf(stderr, "mouse not found!!\n");
libusb_exit(NULL); libusb_exit(NULL);