From a81ff6f54c60101f0c55072cc0587678fb976cc3 Mon Sep 17 00:00:00 2001
From: Lioncash <mathew1800@gmail.com>
Date: Thu, 27 Dec 2018 21:20:49 -0500
Subject: [PATCH] kernel/process: Start the main thread using the specified
 ideal core

This matches kernel behavior in that processes are started using their
specified ideal core, rather than always starting on core 0.
---
 src/core/hle/kernel/process.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cpp
index 645c1d6f5..d5ca235b0 100644
--- a/src/core/hle/kernel/process.cpp
+++ b/src/core/hle/kernel/process.cpp
@@ -35,8 +35,8 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, VAddr entry_poi
 
     // Initialize new "main" thread
     const VAddr stack_top = owner_process.VMManager().GetTLSIORegionEndAddress();
-    auto thread_res = Thread::Create(kernel, "main", entry_point, priority, 0, THREADPROCESSORID_0,
-                                     stack_top, owner_process);
+    auto thread_res = Thread::Create(kernel, "main", entry_point, priority, 0,
+                                     owner_process.GetIdealCore(), stack_top, owner_process);
 
     SharedPtr<Thread> thread = std::move(thread_res).Unwrap();