diff --git a/Controllers/MSIMysticLightController/RGBController_MSIMysticLight162.cpp b/Controllers/MSIMysticLightController/RGBController_MSIMysticLight162.cpp index c2d74fe8..d541ab87 100644 --- a/Controllers/MSIMysticLightController/RGBController_MSIMysticLight162.cpp +++ b/Controllers/MSIMysticLightController/RGBController_MSIMysticLight162.cpp @@ -263,6 +263,17 @@ void RGBController_MSIMysticLight162::SetupMode(const char *name, MSI_MODE mod, Mode.speed_max = MSI_SPEED_HIGH; Mode.speed_min = MSI_SPEED_LOW; } + else + { + /*---------------------------------------------------------*\ + | For modes without speed this needs to be set to avoid | + | bad values in the saved profile which in turn corrupts | + | the brightness calculation when loading the profile | + \*---------------------------------------------------------*/ + Mode.speed = 0; + Mode.speed_max = 0; + Mode.speed_min = 0; + } modes.push_back(Mode); } diff --git a/Controllers/MSIMysticLightController/RGBController_MSIMysticLight185.cpp b/Controllers/MSIMysticLightController/RGBController_MSIMysticLight185.cpp index 8c3352ba..f00df496 100644 --- a/Controllers/MSIMysticLightController/RGBController_MSIMysticLight185.cpp +++ b/Controllers/MSIMysticLightController/RGBController_MSIMysticLight185.cpp @@ -271,6 +271,17 @@ void RGBController_MSIMysticLight185::SetupMode(const char *name, MSI_MODE mod, Mode.speed_max = MSI_SPEED_HIGH; Mode.speed_min = MSI_SPEED_LOW; } + else + { + /*---------------------------------------------------------*\ + | For modes without speed this needs to be set to avoid | + | bad values in the saved profile which in turn corrupts | + | the brightness calculation when loading the profile | + \*---------------------------------------------------------*/ + Mode.speed = 0; + Mode.speed_max = 0; + Mode.speed_min = 0; + } modes.push_back(Mode); } diff --git a/cli.cpp b/cli.cpp index 6781cf6f..43da898d 100644 --- a/cli.cpp +++ b/cli.cpp @@ -654,10 +654,12 @@ bool OptionProfile(std::string argument, std::vector &rgb_contr RGBController* device = rgb_controllers[controller_idx]; device->DeviceUpdateMode(); + LOG_DEBUG("Updating mode for %s to %i", device->name.c_str(), device->active_mode); if(device->modes[device->active_mode].color_mode == MODE_COLORS_PER_LED) { device->DeviceUpdateLEDs(); + LOG_DEBUG("Mode uses per-LED color, also updating LEDs"); } }