From 4c3bbe1fe2706abaeb84fc872e742ff07e775a45 Mon Sep 17 00:00:00 2001 From: JPikachu Date: Sat, 1 Nov 2025 14:57:37 +0000 Subject: [PATCH] [kernel] Simplify timeout calculation in WaitProcessWideKeyAtomic Replace complex timeout logic with simpler approach. Aims to fix possible 'Pokemon Legends: Z-A' 0 fps freeze on startup. --- src/core/hle/kernel/svc/svc_condition_variable.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/core/hle/kernel/svc/svc_condition_variable.cpp b/src/core/hle/kernel/svc/svc_condition_variable.cpp index 2aed6a77be..e1c9e36f2c 100644 --- a/src/core/hle/kernel/svc/svc_condition_variable.cpp +++ b/src/core/hle/kernel/svc/svc_condition_variable.cpp @@ -28,14 +28,7 @@ Result WaitProcessWideKeyAtomic(Core::System& system, u64 address, u64 cv_key, u s64 timeout{}; if (timeout_ns > 0) { const s64 offset_tick(timeout_ns); - if (offset_tick > 0) { - timeout = system.Kernel().HardwareTimer().GetTick() + offset_tick + 2; - if (timeout <= 0) { - timeout = (std::numeric_limits::max)(); - } - } else { - timeout = (std::numeric_limits::max)(); - } + timeout = (std::numeric_limits::max)(); } else { timeout = timeout_ns; }