diff options
| author | Jari Kalinainen <[email protected]> | 2021-08-12 20:45:32 +0300 |
|---|---|---|
| committer | Jari Kalinainen <[email protected]> | 2021-08-12 20:45:32 +0300 |
| commit | 80b673f602728e97bbc567d201da7dd93cfeecf5 (patch) | |
| tree | f52c5f9d17ce1f535f7eaaba1c708a52e7136414 | |
| parent | f6aa74b5c29ae7e56be7ed50f494528928e4fd99 (diff) | |
| download | librazermacos-80b673f602728e97bbc567d201da7dd93cfeecf5.tar.xz librazermacos-80b673f602728e97bbc567d201da7dd93cfeecf5.zip | |
add support for naga pro
| -rw-r--r-- | src/include/razermouse_driver.h | 2 | ||||
| -rwxr-xr-x | src/lib/razerdevice.c | 2 | ||||
| -rw-r--r-- | src/lib/razermouse_driver.c | 38 |
3 files changed, 42 insertions, 0 deletions
diff --git a/src/include/razermouse_driver.h b/src/include/razermouse_driver.h index 992de3a..6ff1080 100644 --- a/src/include/razermouse_driver.h +++ b/src/include/razermouse_driver.h @@ -51,6 +51,8 @@ #define USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE 0x0086 #define USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE_RECEIVER 0x0088 #define USB_DEVICE_ID_RAZER_NAGA_TRINITY 0x0067 +#define USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS 0x008f +#define USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED 0x0090 #define USB_DEVICE_ID_RAZER_ABYSSUS_ELITE_DVA_EDITION 0x006A #define USB_DEVICE_ID_RAZER_ABYSSUS_ESSENTIAL 0x006B #define USB_DEVICE_ID_RAZER_MAMBA_ELITE 0x006C diff --git a/src/lib/razerdevice.c b/src/lib/razerdevice.c index e77b5d1..8c4df51 100755 --- a/src/lib/razerdevice.c +++ b/src/lib/razerdevice.c @@ -108,6 +108,8 @@ bool is_mouse(IOUSBDeviceInterface **usb_dev) case USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE: case USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE_RECEIVER: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_ABYSSUS_ELITE_DVA_EDITION: case USB_DEVICE_ID_RAZER_ABYSSUS_ESSENTIAL: case USB_DEVICE_ID_RAZER_MAMBA_ELITE: diff --git a/src/lib/razermouse_driver.c b/src/lib/razermouse_driver.c index 68002d9..80a1bb7 100644 --- a/src/lib/razermouse_driver.c +++ b/src/lib/razermouse_driver.c @@ -56,6 +56,8 @@ static int razer_get_report(IOUSBDeviceInterface **usb_dev, struct razer_report case USB_DEVICE_ID_RAZER_LANCEHEAD_WIRELESS: case USB_DEVICE_ID_RAZER_MAMBA_WIRELESS_RECEIVER: case USB_DEVICE_ID_RAZER_MAMBA_WIRELESS_WIRED: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE_RECEIVER: return razer_get_usb_response(usb_dev, 0x00, request_report, 0x00, response_report, RAZER_NEW_MOUSE_RECEIVER_WAIT_MIN_US); break; @@ -173,6 +175,8 @@ ssize_t razer_attr_write_side_mode_static(IOUSBDeviceInterface **usb_dev, const case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: case USB_DEVICE_ID_RAZER_BASILISK: case USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE: @@ -233,6 +237,8 @@ ssize_t razer_attr_write_side_mode_static_no_store(IOUSBDeviceInterface **usb_de case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: case USB_DEVICE_ID_RAZER_BASILISK: case USB_DEVICE_ID_RAZER_BASILISK_ULTIMATE: @@ -290,6 +296,8 @@ ssize_t razer_attr_write_side_mode_spectrum(IOUSBDeviceInterface **usb_dev, cons case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -360,6 +368,8 @@ ssize_t razer_attr_write_side_mode_breath(IOUSBDeviceInterface **usb_dev, const case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -429,6 +439,8 @@ ssize_t razer_attr_write_side_mode_none(IOUSBDeviceInterface **usb_dev, const ch case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -589,6 +601,8 @@ ssize_t razer_attr_write_logo_mode_static(IOUSBDeviceInterface **usb_dev, const case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -658,6 +672,8 @@ ssize_t razer_attr_write_scroll_mode_static(IOUSBDeviceInterface **usb_dev, cons case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -750,6 +766,8 @@ ssize_t razer_attr_write_logo_mode_static_no_store(IOUSBDeviceInterface **usb_de case USB_DEVICE_ID_RAZER_VIPER_8KHZ: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -822,6 +840,8 @@ ssize_t razer_attr_write_scroll_mode_static_no_store(IOUSBDeviceInterface **usb_ case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -908,6 +928,8 @@ ssize_t razer_attr_write_logo_mode_spectrum(IOUSBDeviceInterface **usb_dev, cons case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -967,6 +989,8 @@ ssize_t razer_attr_write_scroll_mode_spectrum(IOUSBDeviceInterface **usb_dev, co case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -1062,6 +1086,8 @@ ssize_t razer_attr_write_logo_mode_breath(IOUSBDeviceInterface **usb_dev, const case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -1150,6 +1176,8 @@ ssize_t razer_attr_write_scroll_mode_breath(IOUSBDeviceInterface **usb_dev, cons case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -1243,6 +1271,8 @@ ssize_t razer_attr_write_logo_mode_none(IOUSBDeviceInterface **usb_dev, const ch case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -1305,6 +1335,8 @@ ssize_t razer_attr_write_scroll_mode_none(IOUSBDeviceInterface **usb_dev, const case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -1434,6 +1466,8 @@ ssize_t razer_attr_write_logo_mode_reactive(IOUSBDeviceInterface **usb_dev, cons case USB_DEVICE_ID_RAZER_VIPER_MINI: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRED: case USB_DEVICE_ID_RAZER_NAGA_TRINITY: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRELESS: case USB_DEVICE_ID_RAZER_DEATHADDER_V2_PRO_WIRED: case USB_DEVICE_ID_RAZER_VIPER_ULTIMATE_WIRELESS: @@ -1826,6 +1860,8 @@ void razer_attr_write_matrix_brightness(IOUSBDeviceInterface **usb_dev, unsigned break; case USB_DEVICE_ID_RAZER_NAGA_LEFT_HANDED_2020: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_MAMBA_ELITE: report = razer_chroma_extended_matrix_brightness(VARSTORE, 0x00, brightness); report.transaction_id.id = 0x1F; @@ -1875,6 +1911,8 @@ ushort razer_attr_read_matrix_brightness(IOUSBDeviceInterface **usb_dev) break; case USB_DEVICE_ID_RAZER_NAGA_LEFT_HANDED_2020: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRELESS: + case USB_DEVICE_ID_RAZER_NAGA_PRO_WIRED: case USB_DEVICE_ID_RAZER_MAMBA_ELITE: report = razer_chroma_extended_matrix_get_brightness(VARSTORE, 0x00); report.transaction_id.id = 0x1F; |
