core: fixup deadlock in timersThr exit cond

This commit is contained in:
Vaxry 2024-02-20 03:18:17 +00:00
parent b23b0a6d32
commit e57f146bad
1 changed files with 2 additions and 2 deletions

View File

@ -158,7 +158,7 @@ void CHyprlock::run() {
float least = 10000; float least = 10000;
for (auto& t : m_vTimers) { for (auto& t : m_vTimers) {
const auto TIME = t->leftMs(); const auto TIME = std::clamp(t->leftMs(), 1.f, INFINITY);
if (TIME < least) if (TIME < least)
least = TIME; least = TIME;
} }
@ -238,7 +238,7 @@ void CHyprlock::run() {
break; break;
} }
std::lock_guard<std::mutex> lg2(m_sLoopState.timerRequestMutex); m_sLoopState.timerEvent = true;
m_sLoopState.timerCV.notify_all(); m_sLoopState.timerCV.notify_all();
g_pRenderer->asyncResourceGatherer->notify(); g_pRenderer->asyncResourceGatherer->notify();