mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-04-19 15:47:11 +02:00
Validate video speed before applying.
This commit is contained in:
parent
3b1aa55d21
commit
10636d931f
1 changed files with 2 additions and 1 deletions
|
@ -172,7 +172,8 @@ MenuSpeedItem::MenuSpeedItem(
|
|||
}
|
||||
|
||||
float64 MenuSpeedItem::computeSpeed(float64 value) const {
|
||||
return anim::interpolate(kMinSpeed, kMaxSpeed, value) / 100.;
|
||||
return anim::interpolate(kMinSpeed, kMaxSpeed, std::clamp(value, 0., 1.))
|
||||
/ 100.;
|
||||
}
|
||||
|
||||
QString MenuSpeedItem::speedString(float64 value) const {
|
||||
|
|
Loading…
Add table
Reference in a new issue