diff --git a/src/util/backlight_backend.cpp b/src/util/backlight_backend.cpp index a136f6358..48473dd21 100644 --- a/src/util/backlight_backend.cpp +++ b/src/util/backlight_backend.cpp @@ -273,7 +273,7 @@ int BacklightBackend::get_scaled_brightness(const std::string& preferred_device) GET_BEST_DEVICE(best, (*this), preferred_device); if (best != nullptr) { - return best->get_actual() * 100 / best->get_max(); + return static_cast(std::round(best->get_actual() * 100.0F / best->get_max())); } return 0;