mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 08:03:21 +02:00
parent
a3261996b9
commit
1aabd346eb
3 changed files with 3 additions and 0 deletions
|
@ -47,6 +47,7 @@ double CShake::update(Vector2D pos) {
|
|||
int max = std::max(1, (int)(g_pHyprRenderer->m_mostHzMonitor->m_refreshRate)); // 1s worth of history, avoiding divide by 0
|
||||
samples.resize(max);
|
||||
samples_distance.resize(max);
|
||||
samples_index = std::min(samples_index, max - 1);
|
||||
|
||||
int previous = samples_index == 0 ? max - 1 : samples_index - 1;
|
||||
samples[samples_index] = Vector2D{pos};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue