diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-21 07:18:56 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:52 +0200 |
commit | aa2844bcf9b2b9bca2ce263270b963ffd13b05e7 (patch) | |
tree | 63af3d8c8b09f5fb834f764dd6a557ac0900f664 /src/core/hle/kernel/hle_ipc.cpp | |
parent | hle: kernel: Migrate KResourceLimit to KAutoObject. (diff) | |
download | yuzu-aa2844bcf9b2b9bca2ce263270b963ffd13b05e7.tar yuzu-aa2844bcf9b2b9bca2ce263270b963ffd13b05e7.tar.gz yuzu-aa2844bcf9b2b9bca2ce263270b963ffd13b05e7.tar.bz2 yuzu-aa2844bcf9b2b9bca2ce263270b963ffd13b05e7.tar.lz yuzu-aa2844bcf9b2b9bca2ce263270b963ffd13b05e7.tar.xz yuzu-aa2844bcf9b2b9bca2ce263270b963ffd13b05e7.tar.zst yuzu-aa2844bcf9b2b9bca2ce263270b963ffd13b05e7.zip |
Diffstat (limited to 'src/core/hle/kernel/hle_ipc.cpp')
-rw-r--r-- | src/core/hle/kernel/hle_ipc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index d647d9dd3..9e1e63204 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -74,12 +74,12 @@ void HLERequestContext::ParseCommandBuffer(const HandleTable& handle_table, u32_ for (u32 handle = 0; handle < handle_descriptor_header->num_handles_to_copy; ++handle) { const u32 copy_handle{rp.Pop<Handle>()}; copy_handles.push_back(copy_handle); - copy_objects.push_back(handle_table.GetGeneric(copy_handle)); + copy_objects.push_back(handle_table.GetObject(copy_handle).GetPointerUnsafe()); } for (u32 handle = 0; handle < handle_descriptor_header->num_handles_to_move; ++handle) { const u32 move_handle{rp.Pop<Handle>()}; move_handles.push_back(move_handle); - move_objects.push_back(handle_table.GetGeneric(move_handle)); + move_objects.push_back(handle_table.GetObject(move_handle).GetPointerUnsafe()); } } else { // For responses we just ignore the handles, they're empty and will be populated when @@ -220,12 +220,12 @@ ResultCode HLERequestContext::WriteToOutgoingCommandBuffer(KThread& thread) { // for specific values in each of these descriptors. for (auto& object : copy_objects) { ASSERT(object != nullptr); - dst_cmdbuf[current_offset++] = handle_table.Create(object).Unwrap(); + R_TRY(handle_table.Add(&dst_cmdbuf[current_offset++], object)); } for (auto& object : move_objects) { ASSERT(object != nullptr); - dst_cmdbuf[current_offset++] = handle_table.Create(object).Unwrap(); + R_TRY(handle_table.Add(&dst_cmdbuf[current_offset++], object)); } } |