diff --git a/RGBController/RGBController_OpenRazer.cpp b/RGBController/RGBController_OpenRazer.cpp index d2fc4645..0a77578c 100644 --- a/RGBController/RGBController_OpenRazer.cpp +++ b/RGBController/RGBController_OpenRazer.cpp @@ -291,9 +291,10 @@ RGBController_OpenRazer::RGBController_OpenRazer(std::string dev_path) if(matrix_effect_wave) { mode Wave; - Wave.name = "Wave"; - Wave.value = RAZER_MODE_WAVE; - Wave.flags = 0; + Wave.name = "Wave"; + Wave.value = RAZER_MODE_WAVE; + Wave.flags = MODE_FLAG_HAS_DIRECTION_LR; + Wave.direction = MODE_DIRECTION_RIGHT; modes.push_back(Wave); } @@ -398,6 +399,16 @@ void RGBController_OpenRazer::UpdateMode() break; case RAZER_MODE_WAVE: + switch(modes[active_mode].direction) + { + case MODE_DIRECTION_LEFT: + update_value = '2'; + break; + + default: + update_value = '1'; + break; + } matrix_effect_wave.write(&update_value, 1); matrix_effect_wave.flush(); break; diff --git a/RGBController/RGBController_OpenRazerWindows.cpp b/RGBController/RGBController_OpenRazerWindows.cpp index 7d31a898..8a1ab306 100644 --- a/RGBController/RGBController_OpenRazerWindows.cpp +++ b/RGBController/RGBController_OpenRazerWindows.cpp @@ -281,9 +281,10 @@ RGBController_OpenRazer::RGBController_OpenRazer(device * razer_device, device_f if(razer_functions->matrix_effect_wave) { mode Wave; - Wave.name = "Wave"; - Wave.value = RAZER_MODE_WAVE; - Wave.flags = 0; + Wave.name = "Wave"; + Wave.value = RAZER_MODE_WAVE; + Wave.flags = MODE_FLAG_HAS_DIRECTION_LR; + Wave.direction = MODE_DIRECTION_RIGHT; modes.push_back(Wave); } @@ -384,6 +385,16 @@ void RGBController_OpenRazer::UpdateMode() break; case RAZER_MODE_WAVE: + switch(modes[active_mode].direction) + { + case MODE_DIRECTION_LEFT: + update_value = '2'; + break; + + default: + update_value = '1'; + break; + } razer_functions->matrix_effect_wave->store(razer_device, NULL, &update_value, 1); break;