From 980df62397fc0a835583ebecf018767344a927da Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 6 Nov 2017 13:14:12 -0500 Subject: [PATCH] Kernel/Thread: Run the main thread in the CPU specified by the process' exheader. System services usually have Core1 in this field, but citra was running them in Core0 regardless. --- src/core/hle/kernel/thread.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index a7c1b45924..1d77fb5825 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -497,8 +497,9 @@ void Thread::BoostPriority(u32 priority) { SharedPtr SetupMainThread(u32 entry_point, u32 priority, SharedPtr owner_process) { // Initialize new "main" thread - auto thread_res = Thread::Create("main", entry_point, priority, 0, THREADPROCESSORID_0, - Memory::HEAP_VADDR_END, owner_process); + auto thread_res = + Thread::Create("main", entry_point, priority, 0, owner_process->ideal_processor, + Memory::HEAP_VADDR_END, owner_process); SharedPtr thread = std::move(thread_res).Unwrap(); @@ -571,4 +572,4 @@ const std::vector>& GetThreadList() { return thread_list; } -} // namespace +} // namespace Kernel