diff options
author | bunnei <bunneidev@gmail.com> | 2021-04-17 09:52:53 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2021-05-06 01:40:51 +0200 |
commit | c7d8b7421cd6bdb64410bbb0094ce540f0280c27 (patch) | |
tree | 0b24ec86f194395fac5f5688a6e14fc5dec0b7dd /src/core/hle/service/am/am.cpp | |
parent | hle: kernel: Migrate KSession, KClientSession, and KServerSession to KAutoObject. (diff) | |
download | yuzu-c7d8b7421cd6bdb64410bbb0094ce540f0280c27.tar yuzu-c7d8b7421cd6bdb64410bbb0094ce540f0280c27.tar.gz yuzu-c7d8b7421cd6bdb64410bbb0094ce540f0280c27.tar.bz2 yuzu-c7d8b7421cd6bdb64410bbb0094ce540f0280c27.tar.lz yuzu-c7d8b7421cd6bdb64410bbb0094ce540f0280c27.tar.xz yuzu-c7d8b7421cd6bdb64410bbb0094ce540f0280c27.tar.zst yuzu-c7d8b7421cd6bdb64410bbb0094ce540f0280c27.zip |
Diffstat (limited to 'src/core/hle/service/am/am.cpp')
-rw-r--r-- | src/core/hle/service/am/am.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 937020a6e..47d194119 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp @@ -16,10 +16,10 @@ #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_event.h" #include "core/hle/kernel/k_readable_event.h" +#include "core/hle/kernel/k_transfer_memory.h" #include "core/hle/kernel/k_writable_event.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/process.h" -#include "core/hle/kernel/transfer_memory.h" #include "core/hle/service/acc/profile_manager.h" #include "core/hle/service/am/am.h" #include "core/hle/service/am/applet_ae.h" @@ -42,6 +42,7 @@ #include "core/hle/service/set/set.h" #include "core/hle/service/sm/sm.h" #include "core/hle/service/vi/vi.h" +#include "core/memory.h" namespace Service::AM { @@ -1248,16 +1249,16 @@ void ILibraryAppletCreator::CreateHandleStorage(Kernel::HLERequestContext& ctx) } auto transfer_mem = - system.CurrentProcess()->GetHandleTable().Get<Kernel::TransferMemory>(handle); + system.CurrentProcess()->GetHandleTable().GetObject<Kernel::KTransferMemory>(handle); - if (transfer_mem == nullptr) { + if (transfer_mem.IsNull()) { LOG_ERROR(Service_AM, "transfer_mem is a nullptr for handle={:08X}", handle); IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_UNKNOWN); return; } - const u8* const mem_begin = transfer_mem->GetPointer(); + const u8* const mem_begin = system.Memory().GetPointer(transfer_mem->GetSourceAddress()); const u8* const mem_end = mem_begin + transfer_mem->GetSize(); std::vector<u8> memory{mem_begin, mem_end}; |