Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0461488cf2 | ||
|
|
3c62c2e928
|
||
|
|
de20c7002d
|
@@ -5,6 +5,9 @@
|
|||||||
|
|
||||||
a driver for K1NG PRO (4K) mouse from redragon
|
a driver for K1NG PRO (4K) mouse from redragon
|
||||||
|
|
||||||
|
### Downloading
|
||||||
|
u can download the driver from [Release's](https://github.com/cfels/K1NG-Driver/releases)
|
||||||
|
|
||||||
### Compiling
|
### Compiling
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
+6
-2
@@ -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
|
||||||
|
|||||||
@@ -1,8 +1,5 @@
|
|||||||
#include "includes/include.h"
|
#include "includes/include.h"
|
||||||
#include "src/driver.h"
|
#include "src/driver.h"
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
int main(int argc, char *argv[]) {
|
int main(int argc, char *argv[]) {
|
||||||
int sens;
|
int sens;
|
||||||
|
|||||||
+6
-1
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user