Skip to content

Commit 36e8ab4

Browse files
committed
Initial commit for Razer Leviathan V2 X
+ Adding PID for the Leviathan V2 X + Registered detectors + Added metadata to RazerDevices.cpp + Added capabilities to RazerController.cpp + Resolves #3450
1 parent 24ca6d2 commit 36e8ab4

File tree

4 files changed

+67
-15
lines changed

4 files changed

+67
-15
lines changed

Controllers/RazerController/RazerController.cpp

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,48 +40,58 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
4040
/*-----------------------------------------------------------------*\
4141
| Set report index |
4242
\*-----------------------------------------------------------------*/
43-
report_index = 0;
44-
response_index = 0;
43+
switch(dev_pid)
44+
{
45+
case RAZER_LEVIATHAN_V2X_PID:
46+
report_index = 0x07;
47+
response_index = 0x07;
48+
break;
49+
50+
default:
51+
report_index = 0;
52+
response_index = 0;
53+
}
4554

4655
/*-----------------------------------------------------------------*\
4756
| Determine transaction ID for device |
4857
\*-----------------------------------------------------------------*/
4958
switch(dev_pid)
5059
{
60+
case RAZER_BASE_STATION_V2_CHROMA_PID:
5161
case RAZER_BASILISK_V3_PID:
62+
case RAZER_BASILISK_V3_PRO_BLUETOOTH_PID:
5263
case RAZER_BASILISK_V3_PRO_WIRED_PID:
5364
case RAZER_BASILISK_V3_PRO_WIRELESS_PID:
54-
case RAZER_BASILISK_V3_PRO_BLUETOOTH_PID:
55-
case RAZER_BLACKWIDOW_ELITE_PID:
5665
case RAZER_BLACKWIDOW_2019_PID:
66+
case RAZER_BLACKWIDOW_ELITE_PID:
5767
case RAZER_BLACKWIDOW_V3_MINI_WIRED_PID:
58-
case RAZER_BLADE_2021_BASE_V2_PID:
5968
case RAZER_BLADE_14_2022_PID:
6069
case RAZER_BLADE_15_2022_PID:
70+
case RAZER_BLADE_2021_BASE_V2_PID:
6171
case RAZER_CYNOSA_V2_PID:
62-
case RAZER_ORNATA_CHROMA_V2_PID:
63-
case RAZER_ORNATA_V3_PID:
64-
case RAZER_ORNATA_V3_REV2_PID:
65-
case RAZER_ORNATA_V3_X_PID:
66-
case RAZER_TARTARUS_CHROMA_PID:
67-
case RAZER_TARTARUS_PRO_PID:
68-
case RAZER_TARTARUS_V2_PID:
6972
case RAZER_DEATHADDER_CHROMA_PID:
7073
case RAZER_DEATHADDER_ESSENTIAL_V2_PID:
7174
case RAZER_DEATHADDER_V2_MINI_PID:
7275
case RAZER_DEATHSTALKER_V2_PID:
76+
case RAZER_KRAKEN_KITTY_EDITION_PID:
7377
case RAZER_LAPTOP_STAND_CHROMA_PID:
7478
case RAZER_LAPTOP_STAND_CHROMA_V2_PID:
79+
case RAZER_LEVIATHAN_V2X_PID:
7580
case RAZER_MAMBA_ELITE_PID:
81+
case RAZER_MOUSE_BUNGEE_V3_CHROMA_PID:
7682
case RAZER_NAGA_CLASSIC_PID:
7783
case RAZER_NAGA_EPIC_CHROMA_PID:
7884
case RAZER_NAGA_LEFT_HANDED_PID:
7985
case RAZER_NAGA_PRO_WIRED_PID:
8086
case RAZER_NAGA_PRO_WIRELESS_PID:
81-
case RAZER_KRAKEN_KITTY_EDITION_PID:
82-
case RAZER_BASE_STATION_V2_CHROMA_PID:
83-
case RAZER_MOUSE_BUNGEE_V3_CHROMA_PID:
8487
case RAZER_O11_DYNAMIC_PID:
88+
case RAZER_ORNATA_CHROMA_V2_PID:
89+
case RAZER_ORNATA_V3_PID:
90+
case RAZER_ORNATA_V3_REV2_PID:
91+
case RAZER_ORNATA_V3_X_PID:
92+
case RAZER_TARTARUS_CHROMA_PID:
93+
case RAZER_TARTARUS_PRO_PID:
94+
case RAZER_TARTARUS_V2_PID:
8595
case RAZER_VIPER_8KHZ_PID:
8696
dev_transaction_id = 0x1F;
8797
break;
@@ -155,6 +165,7 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
155165
case RAZER_GOLIATHUS_CHROMA_PID:
156166
case RAZER_LAPTOP_STAND_CHROMA_PID:
157167
case RAZER_LAPTOP_STAND_CHROMA_V2_PID:
168+
case RAZER_LEVIATHAN_V2X_PID:
158169
case RAZER_MAMBA_ELITE_PID:
159170
case RAZER_MOUSE_BUNGEE_V3_CHROMA_PID:
160171
case RAZER_MOUSE_DOCK_PRO_PID:
@@ -311,6 +322,7 @@ RazerController::RazerController(hid_device* dev_handle, hid_device* dev_argb_ha
311322
case RAZER_LANCEHEAD_2019_WIRELESS_PID:
312323
case RAZER_LAPTOP_STAND_CHROMA_PID:
313324
case RAZER_LAPTOP_STAND_CHROMA_V2_PID:
325+
case RAZER_LEVIATHAN_V2X_PID:
314326
case RAZER_MAMBA_2018_WIRED_PID:
315327
case RAZER_MAMBA_2018_WIRELESS_PID:
316328
case RAZER_MAMBA_ELITE_PID:
@@ -682,6 +694,7 @@ bool RazerController::SupportsWave()
682694
case RAZER_FIREFLY_V2_PID:
683695
case RAZER_LAPTOP_STAND_CHROMA_PID:
684696
case RAZER_LAPTOP_STAND_CHROMA_V2_PID:
697+
case RAZER_LEVIATHAN_V2X_PID:
685698
case RAZER_MOUSE_BUNGEE_V3_CHROMA_PID:
686699
case RAZER_MOUSE_DOCK_PRO_PID:
687700
case RAZER_NOMMO_CHROMA_PID:

Controllers/RazerController/RazerControllerDetect.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -409,6 +409,7 @@ REGISTER_HID_DETECTOR_IPU("Razer Core", Det
409409
REGISTER_HID_DETECTOR_IPU("Razer Core X", DetectRazerControllers, RAZER_VID, RAZER_CORE_X_PID, 0x02, 0x01, 0x02);
410410
REGISTER_HID_DETECTOR_IPU("Razer Laptop Stand Chroma", DetectRazerControllers, RAZER_VID, RAZER_LAPTOP_STAND_CHROMA_PID, 0x00, 0x01, 0x02);
411411
REGISTER_HID_DETECTOR_IPU("Razer Laptop Stand Chroma V2", DetectRazerControllers, RAZER_VID, RAZER_LAPTOP_STAND_CHROMA_V2_PID, 0x00, 0x01, 0x02);
412+
REGISTER_HID_DETECTOR_IPU("Razer Leviathan V2 X", DetectRazerControllers, RAZER_VID, RAZER_LEVIATHAN_V2X_PID, 0x00, 0x0C, 0x01);
412413
REGISTER_HID_DETECTOR_IPU("Razer Mouse Bungee V3 Chroma", DetectRazerControllers, RAZER_VID, RAZER_MOUSE_BUNGEE_V3_CHROMA_PID, 0x00, 0x01, 0x02);
413414
REGISTER_HID_DETECTOR_IPU("Razer Mouse Dock Chroma", DetectRazerControllers, RAZER_VID, RAZER_MOUSE_DOCK_CHROMA_PID, 0x00, 0x01, 0x02);
414415
REGISTER_HID_DETECTOR_IPU("Razer Mouse Dock Pro", DetectRazerControllers, RAZER_VID, RAZER_MOUSE_DOCK_PRO_PID, 0x00, 0x01, 0x02);

Controllers/RazerController/RazerDevices.cpp

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4911,6 +4911,42 @@ static const razer_device lancehead_te_device =
49114911
NULL
49124912
};
49134913

4914+
/*-------------------------------------------------------------*\
4915+
| Razer Leviathan V2X 1532:054A |
4916+
| |
4917+
| Zone "Speaker Underglow" |
4918+
| Linear |
4919+
| 14 LEDs |
4920+
\*-------------------------------------------------------------*/
4921+
static const razer_zone leviathan_v2x_speaker_zone =
4922+
{
4923+
"Speaker Underglow",
4924+
ZONE_TYPE_LINEAR,
4925+
1,
4926+
14
4927+
};
4928+
4929+
static const razer_device leviathan_v2x_device =
4930+
{
4931+
"Razer Leviathan V2 X",
4932+
RAZER_LEVIATHAN_V2X_PID,
4933+
DEVICE_TYPE_SPEAKER,
4934+
false,
4935+
1,
4936+
14,
4937+
{
4938+
&leviathan_v2x_speaker_zone,
4939+
NULL,
4940+
NULL,
4941+
NULL,
4942+
NULL,
4943+
NULL
4944+
},
4945+
NULL,
4946+
0,
4947+
NULL
4948+
};
4949+
49144950
/*-------------------------------------------------------------*\
49154951
| Razer Mamba 2012 (Wired) |
49164952
| |
@@ -7515,6 +7551,7 @@ const razer_device* razer_device_list[] =
75157551
&core_x_device,
75167552
&laptop_stand_chroma_device,
75177553
&laptop_stand_chroma_v2_device,
7554+
&leviathan_v2x_device,
75187555
&mug_holder_device,
75197556
&mouse_dock_chroma_device,
75207557
&mouse_dock_pro_device,

Controllers/RazerController/RazerDevices.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@
217217
#define RAZER_GOLIATHUS_CHROMA_PID 0x0C01
218218
#define RAZER_LAPTOP_STAND_CHROMA_PID 0x0F0D
219219
#define RAZER_LAPTOP_STAND_CHROMA_V2_PID 0x0F2B
220+
#define RAZER_LEVIATHAN_V2X_PID 0x054A
220221
#define RAZER_MOUSE_BUNGEE_V3_CHROMA_PID 0x0F1D
221222
#define RAZER_MOUSE_DOCK_CHROMA_PID 0x007E
222223
#define RAZER_MOUSE_DOCK_PRO_PID 0x00A4

0 commit comments

Comments
 (0)