mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 14:35:01 -04:00
Add functions to RazerController for enabling Wave and Reactive modes
This commit is contained in:
@@ -54,24 +54,28 @@ RGBController_Razer::RGBController_Razer(RazerController* controller_ptr)
|
||||
SpectrumCycle.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(SpectrumCycle);
|
||||
|
||||
// Wave disabled until proper detection
|
||||
//mode Wave;
|
||||
//Wave.name = "Wave";
|
||||
//Wave.value = RAZER_MODE_WAVE;
|
||||
//Wave.flags = 0;
|
||||
//Wave.color_mode = MODE_COLORS_NONE;
|
||||
//modes.push_back(Wave);
|
||||
if(controller->SupportsWave())
|
||||
{
|
||||
mode Wave;
|
||||
Wave.name = "Wave";
|
||||
Wave.value = RAZER_MODE_WAVE;
|
||||
Wave.flags = 0;
|
||||
Wave.color_mode = MODE_COLORS_NONE;
|
||||
modes.push_back(Wave);
|
||||
}
|
||||
|
||||
// Reactive disabled, not yet implemented
|
||||
//mode Reactive;
|
||||
//Reactive.name = "Reactive";
|
||||
//Reactive.value = RAZER_MODE_REACTIVE;
|
||||
//Reactive.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
//Reactive.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
//Reactive.colors_min = 1;
|
||||
//Reactive.colors_max = 1;
|
||||
//Reactive.colors.resize(1);
|
||||
//modes.push_back(Reactive);
|
||||
if(controller->SupportsReactive())
|
||||
{
|
||||
mode Reactive;
|
||||
Reactive.name = "Reactive";
|
||||
Reactive.value = RAZER_MODE_REACTIVE;
|
||||
Reactive.flags = MODE_FLAG_HAS_MODE_SPECIFIC_COLOR;
|
||||
Reactive.color_mode = MODE_COLORS_MODE_SPECIFIC;
|
||||
Reactive.colors_min = 1;
|
||||
Reactive.colors_max = 1;
|
||||
Reactive.colors.resize(1);
|
||||
modes.push_back(Reactive);
|
||||
}
|
||||
|
||||
SetupZones();
|
||||
}
|
||||
|
||||
@@ -372,6 +372,16 @@ void RazerController::SetModeWave()
|
||||
razer_set_mode_wave();
|
||||
}
|
||||
|
||||
bool RazerController::SupportsReactive()
|
||||
{
|
||||
return(false);
|
||||
}
|
||||
|
||||
bool RazerController::SupportsWave()
|
||||
{
|
||||
return(false);
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------------------------------*\
|
||||
| Private packet sending functions. |
|
||||
\*-------------------------------------------------------------------------------------------------*/
|
||||
|
||||
@@ -180,6 +180,9 @@ public:
|
||||
void SetModeStatic(unsigned char red, unsigned char grn, unsigned char blu);
|
||||
void SetModeWave();
|
||||
|
||||
bool SupportsReactive();
|
||||
bool SupportsWave();
|
||||
|
||||
private:
|
||||
hid_device* dev;
|
||||
hid_device* dev_argb;
|
||||
|
||||
Reference in New Issue
Block a user