summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-22 16:51:03 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-02-22 16:51:03 +0100
commita1bf353780254b8cb03ea0f820917d104ce9ca66 (patch)
treea71a32f928842726180a34ebd35418f8a5927483
parentSystem: Expose Host thread registering routines from kernel. (diff)
downloadyuzu-a1bf353780254b8cb03ea0f820917d104ce9ca66.tar
yuzu-a1bf353780254b8cb03ea0f820917d104ce9ca66.tar.gz
yuzu-a1bf353780254b8cb03ea0f820917d104ce9ca66.tar.bz2
yuzu-a1bf353780254b8cb03ea0f820917d104ce9ca66.tar.lz
yuzu-a1bf353780254b8cb03ea0f820917d104ce9ca66.tar.xz
yuzu-a1bf353780254b8cb03ea0f820917d104ce9ca66.tar.zst
yuzu-a1bf353780254b8cb03ea0f820917d104ce9ca66.zip
-rw-r--r--src/core/hle/kernel/scheduler.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index e5892727e..f2664ce65 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -530,10 +530,11 @@ SchedulerLockAndSleep::SchedulerLockAndSleep(KernelCore& kernel, Handle& event_h
}
SchedulerLockAndSleep::~SchedulerLockAndSleep() {
- if (!sleep_cancelled) {
- auto& time_manager = kernel.TimeManager();
- time_manager.ScheduleTimeEvent(event_handle, time_task, nanoseconds);
+ if (sleep_cancelled) {
+ return;
}
+ auto& time_manager = kernel.TimeManager();
+ time_manager.ScheduleTimeEvent(event_handle, time_task, nanoseconds);
}
} // namespace Kernel