Resolves clamp is not a member of std error with Buster build.

* https://gitlab.com/CalcProgrammer1/OpenRGB/-/jobs/3359116111#L207
This commit is contained in:
Chris 2022-11-23 21:38:33 +11:00
parent ce5ab1ccf1
commit 1ff192bda2

View file

@ -637,7 +637,7 @@ bool OptionBrightness(int* currentDev, std::string argument, Options* options)
} }
DeviceOptions* currentDevOpts = GetDeviceOptionsForDevID(options, *currentDev); DeviceOptions* currentDevOpts = GetDeviceOptionsForDevID(options, *currentDev);
currentDevOpts->brightness = std::clamp(std::stoi(argument), 0, (int)brightness_percentage); currentDevOpts->brightness = std::min(std::max(std::stoi(argument), 0),(int)brightness_percentage);
currentDevOpts->hasOption = true; currentDevOpts->hasOption = true;
return true; return true;
} }