VERY experimental Nintendo Switch 2 emulator
C++
process: SetupMainThread: Zero out argument on process start.
bunnei365f14cd2c8a
diff --git a/src/core/hle/kernel/process.cpp b/src/core/hle/kernel/process.cppindex edc414d69c..ddbd75b8df 100644--- a/src/core/hle/kernel/process.cpp+++ b/src/core/hle/kernel/process.cpp@@ -42,6 +42,8 @@ void SetupMainThread(Process& owner_process, KernelCore& kernel, u32 priority) {// Register 1 must be a handle to the main threadconst Handle thread_handle = owner_process.GetHandleTable().Create(thread).Unwrap();+ thread->GetContext32().cpu_registers[0] = 0;+ thread->GetContext64().cpu_registers[0] = 0;thread->GetContext32().cpu_registers[1] = thread_handle;thread->GetContext64().cpu_registers[1] = thread_handle;