summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-01-31 16:12:54 -0200
committerGravatar Yuri Kunde Schlesner2015-02-02 15:37:04 -0200
commitc4208c1171afe5522f1237480a49aac855313ff8 (patch)
tree1cdc97dbf232759d42ca90963e5eb7aacfac82f4 /src
parentKernel: Fix bug in HandleTable::Close (diff)
downloadyuzu-c4208c1171afe5522f1237480a49aac855313ff8.tar.gz
yuzu-c4208c1171afe5522f1237480a49aac855313ff8.tar.xz
yuzu-c4208c1171afe5522f1237480a49aac855313ff8.zip
SVC: Enable CloseHandle, clean up DuplicateHandle
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/svc.cpp14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/core/hle/svc.cpp b/src/core/hle/svc.cpp
index 1a0c07cb9..8bfa1428e 100644
--- a/src/core/hle/svc.cpp
+++ b/src/core/hle/svc.cpp
@@ -131,9 +131,8 @@ static ResultCode SendSyncRequest(Handle handle) {
131 131
132/// Close a handle 132/// Close a handle
133static ResultCode CloseHandle(Handle handle) { 133static ResultCode CloseHandle(Handle handle) {
134 // ImplementMe 134 LOG_TRACE(Kernel_SVC, "Closing handle 0x%08X", handle);
135 LOG_ERROR(Kernel_SVC, "(UNIMPLEMENTED) called handle=0x%08X", handle); 135 return Kernel::g_handle_table.Close(handle);
136 return RESULT_SUCCESS;
137} 136}
138 137
139/// Wait for a handle to synchronize, timeout after the specified nanoseconds 138/// Wait for a handle to synchronize, timeout after the specified nanoseconds
@@ -445,12 +444,9 @@ static ResultCode CreateEvent(Handle* out_handle, u32 reset_type) {
445 444
446/// Duplicates a kernel handle 445/// Duplicates a kernel handle
447static ResultCode DuplicateHandle(Handle* out, Handle handle) { 446static ResultCode DuplicateHandle(Handle* out, Handle handle) {
448 ResultVal<Handle> out_h = Kernel::g_handle_table.Duplicate(handle); 447 CASCADE_RESULT(*out, Kernel::g_handle_table.Duplicate(handle));
449 if (out_h.Succeeded()) { 448 LOG_TRACE(Kernel_SVC, "duplicated 0x%08X to 0x%08X", handle, *out);
450 *out = *out_h; 449 return RESULT_SUCCESS;
451 LOG_TRACE(Kernel_SVC, "duplicated 0x%08X to 0x%08X", handle, *out);
452 }
453 return out_h.Code();
454} 450}
455 451
456/// Signals an event 452/// Signals an event