diff options
| author | 2021-08-06 22:45:18 -0700 | |
|---|---|---|
| committer | 2021-12-06 16:39:16 -0800 | |
| commit | 669a2d2c67bd9a3267286bc0c2e6e3c1dc98c154 (patch) | |
| tree | c2c3228add0d937de938081d000f62b3d6e4d2d2 /src/core/hle/kernel/kernel.cpp | |
| parent | Merge pull request #7529 from german77/sdl2.0.18 (diff) | |
| download | yuzu-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/kernel.cpp')
| -rw-r--r-- | src/core/hle/kernel/kernel.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index 45e86a677..04926a291 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp | |||
| @@ -845,6 +845,14 @@ const Kernel::PhysicalCore& KernelCore::PhysicalCore(std::size_t id) const { | |||
| 845 | return impl->cores[id]; | 845 | return impl->cores[id]; |
| 846 | } | 846 | } |
| 847 | 847 | ||
| 848 | size_t KernelCore::CurrentPhysicalCoreIndex() const { | ||
| 849 | const u32 core_id = impl->GetCurrentHostThreadID(); | ||
| 850 | if (core_id >= Core::Hardware::NUM_CPU_CORES) { | ||
| 851 | return Core::Hardware::NUM_CPU_CORES - 1; | ||
| 852 | } | ||
| 853 | return core_id; | ||
| 854 | } | ||
| 855 | |||
| 848 | Kernel::PhysicalCore& KernelCore::CurrentPhysicalCore() { | 856 | Kernel::PhysicalCore& KernelCore::CurrentPhysicalCore() { |
| 849 | u32 core_id = impl->GetCurrentHostThreadID(); | 857 | u32 core_id = impl->GetCurrentHostThreadID(); |
| 850 | ASSERT(core_id < Core::Hardware::NUM_CPU_CORES); | 858 | ASSERT(core_id < Core::Hardware::NUM_CPU_CORES); |