From 54839ed5899f7eeeaf28fb018ccde7081ad5def3 Mon Sep 17 00:00:00 2001 From: Fire Cube Date: Mon, 26 May 2025 21:33:54 +0200 Subject: [PATCH] fix infinite call of waitforsmalltimer --- src/core/libraries/kernel/equeue.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/libraries/kernel/equeue.cpp b/src/core/libraries/kernel/equeue.cpp index 4e5c6a207..0f10c07be 100644 --- a/src/core/libraries/kernel/equeue.cpp +++ b/src/core/libraries/kernel/equeue.cpp @@ -187,7 +187,8 @@ int EqueueInternal::WaitForSmallTimer(SceKernelEvent* ev, int num, u32 micros) { ASSERT(num == 1); auto curr_clock = std::chrono::steady_clock::now(); - const auto wait_end_us = curr_clock + std::chrono::microseconds{micros}; + const auto wait_end_us = (micros == 0) ? std::chrono::steady_clock::time_point::max() + : curr_clock + std::chrono::microseconds{micros}; do { curr_clock = std::chrono::steady_clock::now();