mirror of
https://github.com/hyprwm/Hypr.git
synced 2024-11-26 06:45:58 +01:00
fixed animation timing and clipping, your speed might be changed a bit
This commit is contained in:
parent
b6fc46714f
commit
7ce5864a81
1 changed files with 1 additions and 2 deletions
|
@ -7,8 +7,7 @@ void AnimationUtil::move() {
|
||||||
const double DELTA = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - lastFrame).count();
|
const double DELTA = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::high_resolution_clock::now() - lastFrame).count();
|
||||||
lastFrame = std::chrono::high_resolution_clock::now();
|
lastFrame = std::chrono::high_resolution_clock::now();
|
||||||
|
|
||||||
const double ANIMATIONSPEED = ((double)1 / (double)ConfigManager::getFloat("anim:speed")) * DELTA;
|
const double ANIMATIONSPEED = std::max(1.f / ((double)ConfigManager::getFloat("anim:speed") * DELTA) * 462.f, (double)1.f);
|
||||||
|
|
||||||
|
|
||||||
bool updateRequired = false;
|
bool updateRequired = false;
|
||||||
// Now we are (or should be, lul) thread-safe.
|
// Now we are (or should be, lul) thread-safe.
|
||||||
|
|
Loading…
Reference in a new issue