From 216fe063e02b87eb9e167afbe9befa655ebdaaf8 Mon Sep 17 00:00:00 2001 From: Adam Honse Date: Sat, 18 Apr 2020 23:34:32 -0500 Subject: [PATCH] Fix apply all for Razer devices that don't have custom mode --- RGBController/RGBController_OpenRazer.cpp | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/RGBController/RGBController_OpenRazer.cpp b/RGBController/RGBController_OpenRazer.cpp index b85005332..5e32e2fd9 100644 --- a/RGBController/RGBController_OpenRazer.cpp +++ b/RGBController/RGBController_OpenRazer.cpp @@ -416,7 +416,21 @@ void RGBController_OpenRazer::ResizeZone(int /*zone*/, int /*new_size*/) void RGBController_OpenRazer::SetCustomMode() { - active_mode = RAZER_MODE_CUSTOM; + /*---------------------------------------------------------*\ + | If device supports custom mode, it will be mode index 0 | + \*---------------------------------------------------------*/ + if(modes[0].value == RAZER_MODE_CUSTOM) + { + active_mode = 0; + } + /*---------------------------------------------------------*\ + | If not, use static mode. Static mode should be mode index| + | 1 because Off will be index 0 | + \*---------------------------------------------------------*/ + else + { + active_mode = 1; + } } void RGBController_OpenRazer::UpdateMode()