mirror of
https://github.com/virtcode/hypr-dynamic-cursors
synced 2025-09-19 16:13:21 +02:00
fix: guard against divide by 0 in effects (#68)
This commit is contained in:
parent
e2c32d8108
commit
2e7ea0224d
4 changed files with 6 additions and 4 deletions
|
@ -33,7 +33,9 @@ void tickRaw(SP<CEventLoopTimer> self, void* data) {
|
|||
if (isEnabled())
|
||||
g_pDynamicCursors->onTick(g_pPointerManager.get());
|
||||
|
||||
const int TIMEOUT = g_pHyprRenderer->m_pMostHzMonitor ? 1000.0 / g_pHyprRenderer->m_pMostHzMonitor->refreshRate : 16;
|
||||
const int TIMEOUT = g_pHyprRenderer->m_pMostHzMonitor && g_pHyprRenderer->m_pMostHzMonitor->refreshRate > 0
|
||||
? 1000.0 / g_pHyprRenderer->m_pMostHzMonitor->refreshRate
|
||||
: 16;
|
||||
self->updateTimeout(std::chrono::milliseconds(TIMEOUT));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue