1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 17:07:44 +00:00

engine: error on negative values

This commit is contained in:
NotAShelf 2025-05-18 05:32:27 +03:00
parent 9db1a028bf
commit ed3ba94f74
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF

View file

@ -461,6 +461,7 @@ fn manage_auto_turbo(
fn validate_turbo_auto_settings(settings: &TurboAutoSettings) -> Result<(), EngineError> { fn validate_turbo_auto_settings(settings: &TurboAutoSettings) -> Result<(), EngineError> {
if settings.load_threshold_high <= settings.load_threshold_low if settings.load_threshold_high <= settings.load_threshold_low
|| settings.load_threshold_high > 100.0 || settings.load_threshold_high > 100.0
|| settings.load_threshold_high < 0.0
|| settings.load_threshold_low < 0.0 || settings.load_threshold_low < 0.0
|| settings.load_threshold_low > 100.0 || settings.load_threshold_low > 100.0
{ {