summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/svc.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2021-08-06 22:45:18 -0700
committerGravatar bunnei2021-12-06 16:39:16 -0800
commit669a2d2c67bd9a3267286bc0c2e6e3c1dc98c154 (patch)
treec2c3228add0d937de938081d000f62b3d6e4d2d2 /src/core/hle/kernel/svc.cpp
parentMerge pull request #7529 from german77/sdl2.0.18 (diff)
downloadyuzu-669a2d2c67bd9a3267286bc0c2e6e3c1dc98c154.tar.gz
yuzu-669a2d2c67bd9a3267286bc0c2e6e3c1dc98c154.tar.xz
yuzu-669a2d2c67bd9a3267286bc0c2e6e3c1dc98c154.zip
core: hle: kernel: Reflect non-emulated threads as core 3.
Diffstat (limited to 'src/core/hle/kernel/svc.cpp')
-rw-r--r--src/core/hle/kernel/svc.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hle/kernel/svc.cpp b/src/core/hle/kernel/svc.cpp
index f0cd8471e..e5e879eb5 100644
--- a/src/core/hle/kernel/svc.cpp
+++ b/src/core/hle/kernel/svc.cpp
@@ -873,7 +873,7 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
873 const u64 thread_ticks = current_thread->GetCpuTime(); 873 const u64 thread_ticks = current_thread->GetCpuTime();
874 874
875 out_ticks = thread_ticks + (core_timing.GetCPUTicks() - prev_ctx_ticks); 875 out_ticks = thread_ticks + (core_timing.GetCPUTicks() - prev_ctx_ticks);
876 } else if (same_thread && info_sub_id == system.CurrentCoreIndex()) { 876 } else if (same_thread && info_sub_id == system.Kernel().CurrentPhysicalCoreIndex()) {
877 out_ticks = core_timing.GetCPUTicks() - prev_ctx_ticks; 877 out_ticks = core_timing.GetCPUTicks() - prev_ctx_ticks;
878 } 878 }
879 879
@@ -887,7 +887,8 @@ static ResultCode GetInfo(Core::System& system, u64* result, u64 info_id, Handle
887 return ResultInvalidHandle; 887 return ResultInvalidHandle;
888 } 888 }
889 889
890 if (info_sub_id != 0xFFFFFFFFFFFFFFFF && info_sub_id != system.CurrentCoreIndex()) { 890 if (info_sub_id != 0xFFFFFFFFFFFFFFFF &&
891 info_sub_id != system.Kernel().CurrentPhysicalCoreIndex()) {
891 LOG_ERROR(Kernel_SVC, "Core is not the current core, got {}", info_sub_id); 892 LOG_ERROR(Kernel_SVC, "Core is not the current core, got {}", info_sub_id);
892 return ResultInvalidCombination; 893 return ResultInvalidCombination;
893 } 894 }