summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel')
-rw-r--r--src/core/hle/kernel/scheduler.cpp2
-rw-r--r--src/core/hle/kernel/thread.cpp4
2 files changed, 2 insertions, 4 deletions
diff --git a/src/core/hle/kernel/scheduler.cpp b/src/core/hle/kernel/scheduler.cpp
index 98fbb8fe5..d68d86cdf 100644
--- a/src/core/hle/kernel/scheduler.cpp
+++ b/src/core/hle/kernel/scheduler.cpp
@@ -616,6 +616,7 @@ void Scheduler::SwitchContextStep2() {
616 616
617 // Cancel any outstanding wakeup events for this thread 617 // Cancel any outstanding wakeup events for this thread
618 new_thread->SetIsRunning(true); 618 new_thread->SetIsRunning(true);
619 new_thread->last_running_ticks = system.CoreTiming().GetCPUTicks();
619 620
620 auto* const thread_owner_process = current_thread->GetOwnerProcess(); 621 auto* const thread_owner_process = current_thread->GetOwnerProcess();
621 if (previous_process != thread_owner_process && thread_owner_process != nullptr) { 622 if (previous_process != thread_owner_process && thread_owner_process != nullptr) {
@@ -654,6 +655,7 @@ void Scheduler::SwitchContext() {
654 655
655 // Save context for previous thread 656 // Save context for previous thread
656 if (previous_thread) { 657 if (previous_thread) {
658 previous_thread->last_running_ticks = system.CoreTiming().GetCPUTicks();
657 if (!previous_thread->IsHLEThread()) { 659 if (!previous_thread->IsHLEThread()) {
658 auto& cpu_core = system.ArmInterface(core_id); 660 auto& cpu_core = system.ArmInterface(core_id);
659 cpu_core.SaveContext(previous_thread->GetContext32()); 661 cpu_core.SaveContext(previous_thread->GetContext32());
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp
index 51cc5dcca..fc6c0bc85 100644
--- a/src/core/hle/kernel/thread.cpp
+++ b/src/core/hle/kernel/thread.cpp
@@ -295,10 +295,6 @@ void Thread::SetStatus(ThreadStatus new_status) {
295 break; 295 break;
296 } 296 }
297 297
298 if (status == ThreadStatus::Running) {
299 last_running_ticks = Core::System::GetInstance().CoreTiming().GetCPUTicks();
300 }
301
302 status = new_status; 298 status = new_status;
303} 299}
304 300