Explorar o código

core: hle: kernel: Use CurrentPhysicalCoreIndex as appropriate.

bunnei %!s(int64=5) %!d(string=hai) anos
pai
achega
2dfb07388a
Modificáronse 1 ficheiros con 2 adicións e 6 borrados
  1. 2 6
      src/core/hle/kernel/kernel.cpp

+ 2 - 6
src/core/hle/kernel/kernel.cpp

@@ -827,15 +827,11 @@ size_t KernelCore::CurrentPhysicalCoreIndex() const {
 }
 
 Kernel::PhysicalCore& KernelCore::CurrentPhysicalCore() {
-    u32 core_id = impl->GetCurrentHostThreadID();
-    ASSERT(core_id < Core::Hardware::NUM_CPU_CORES);
-    return impl->cores[core_id];
+    return impl->cores[CurrentPhysicalCoreIndex()];
 }
 
 const Kernel::PhysicalCore& KernelCore::CurrentPhysicalCore() const {
-    u32 core_id = impl->GetCurrentHostThreadID();
-    ASSERT(core_id < Core::Hardware::NUM_CPU_CORES);
-    return impl->cores[core_id];
+    return impl->cores[CurrentPhysicalCoreIndex()];
 }
 
 Kernel::KScheduler* KernelCore::CurrentScheduler() {