Ver Fonte

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.
Lioncash há 7 anos atrás
pai
commit
a81ff6f54c
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      src/core/hle/kernel/process.cpp

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

@@ -35,8 +35,8 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, VAddr entry_poi
 
 
     // Initialize new "main" thread
     // Initialize new "main" thread
     const VAddr stack_top = owner_process.VMManager().GetTLSIORegionEndAddress();
     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();
     SharedPtr<Thread> thread = std::move(thread_res).Unwrap();