mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-01-24 06:08:43 -05:00
UI: Fix low value of std::clamp gets greater than high value
`std::clamp` was introduced at 60a45d3aa3 but it caused a runtime
assertion failure on Windows that checks the low value of `std::clamp`
is not greater than the high value.
This commit is contained in:
committed by
Ryan Foster
parent
612ef65726
commit
06642fdee4
@@ -1008,7 +1008,7 @@ VolumeMeter::calculateBallisticsForChannel(int channelNr, uint64_t ts,
|
||||
float decay = float(peakDecayRate * timeSinceLastRedraw);
|
||||
displayPeak[channelNr] =
|
||||
std::clamp(displayPeak[channelNr] - decay,
|
||||
currentPeak[channelNr], 0.f);
|
||||
std::min(currentPeak[channelNr], 0.f), 0.f);
|
||||
}
|
||||
|
||||
if (currentPeak[channelNr] >= displayPeakHold[channelNr] ||
|
||||
|
||||
Reference in New Issue
Block a user