Skip to content
Snippets Groups Projects
Commit baa919df authored by Micah Elizabeth Scott's avatar Micah Elizabeth Scott
Browse files

Prevent currentScale from reaching zero

This would cause the algorithm to get stuck forever
parent 447d973f
No related branches found
No related tags found
No related merge requests found
......@@ -146,7 +146,7 @@ inline void Brightness::beginFrame(const FrameInfo& f)
} else {
adjustment = 1.0f;
}
currentScale *= adjustment;
currentScale = std::max(epsilon, currentScale * adjustment);
// Was this adjustment negligible? We can quit early.
if (fabsf(adjustment - 1.0f) < epsilon) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment