aboutsummaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorEduardo Almeida <[email protected]>2021-08-13 11:52:16 +0100
committerGitHub <[email protected]>2021-08-13 11:52:16 +0100
commita5666117780abc895588a7b907f6e1b9614c38c3 (patch)
tree902f3eb68e4f8dc68fdf629814af63a71df2bf3d /src/lib
parentf6aa74b5c29ae7e56be7ed50f494528928e4fd99 (diff)
parent2bf746ea12f54fe0cf14adb49de18d0fc2f33902 (diff)
downloadlibrazermacos-a5666117780abc895588a7b907f6e1b9614c38c3.tar.xz
librazermacos-a5666117780abc895588a7b907f6e1b9614c38c3.zip
Merge pull request #9 from jvk75/master
Add support for Naga Pro.
Diffstat (limited to 'src/lib')
-rwxr-xr-xsrc/lib/razerdevice.c2
-rw-r--r--src/lib/razermouse_driver.c38
2 files changed, 40 insertions, 0 deletions
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;