From 60cf80d85c8bb450bc742ed369bc13b517c4d2f7 Mon Sep 17 00:00:00 2001 From: "Dr. Chat" Date: Tue, 9 Jun 2015 19:04:41 -0500 Subject: [PATCH] Actually give the game the new handle --- src/xenia/kernel/xboxkrnl_ob.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xenia/kernel/xboxkrnl_ob.cc b/src/xenia/kernel/xboxkrnl_ob.cc index 8714a4f53..a3f154865 100644 --- a/src/xenia/kernel/xboxkrnl_ob.cc +++ b/src/xenia/kernel/xboxkrnl_ob.cc @@ -145,6 +145,10 @@ dword_result_t NtDuplicateObject(dword_t handle, lpdword_t new_handle_ptr, X_STATUS result = kernel_state()->object_table()->DuplicateHandle(handle, &new_handle); + if (new_handle_ptr) { + *new_handle_ptr = new_handle; + } + if (options == 1 /* DUPLICATE_CLOSE_SOURCE */) { // Always close the source object. kernel_state()->object_table()->RemoveHandle(handle);