From 1cb978eb82253d6869d1c3729e976a98fb5a7a9c Mon Sep 17 00:00:00 2001 From: bunnei Date: Sun, 31 Dec 2017 17:23:36 -0500 Subject: thread: Keep track of the initially created handle. This is kinda crufty, but we need it for now to update guest state variables. --- src/core/hle/svc.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/core/hle/svc.cpp') diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp index bffa18c39..133b868f2 100644 --- a/src/core/hle/svc.cpp +++ b/src/core/hle/svc.cpp @@ -268,7 +268,8 @@ static ResultCode CreateThread(Handle* out_handle, VAddr entry_point, u64 arg, V thread->context.fpscr = FPSCR_DEFAULT_NAN | FPSCR_FLUSH_TO_ZERO | FPSCR_ROUND_TOZERO; // 0x03C00000 - CASCADE_RESULT(*out_handle, Kernel::g_handle_table.Create(std::move(thread))); + CASCADE_RESULT(thread->guest_handle, Kernel::g_handle_table.Create(thread)); + *out_handle = thread->guest_handle; Core::System::GetInstance().PrepareReschedule(); -- cgit v1.2.3