summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-12-28 00:31:31 +0100
committerLioncash <mathew1800@gmail.com>2018-12-28 01:08:47 +0100
commitfbeaa330a35f93857c249aa5f69dfee6b09eefe0 (patch)
treecc9223890f85e66ba61d1b8fe1acfbbb55822f15 /src/core/hle/service
parentMerge pull request #1951 from Tinob/master (diff)
downloadyuzu-fbeaa330a35f93857c249aa5f69dfee6b09eefe0.tar
yuzu-fbeaa330a35f93857c249aa5f69dfee6b09eefe0.tar.gz
yuzu-fbeaa330a35f93857c249aa5f69dfee6b09eefe0.tar.bz2
yuzu-fbeaa330a35f93857c249aa5f69dfee6b09eefe0.tar.lz
yuzu-fbeaa330a35f93857c249aa5f69dfee6b09eefe0.tar.xz
yuzu-fbeaa330a35f93857c249aa5f69dfee6b09eefe0.tar.zst
yuzu-fbeaa330a35f93857c249aa5f69dfee6b09eefe0.zip
Diffstat (limited to 'src/core/hle/service')
-rw-r--r--src/core/hle/service/ldr/ldr.cpp27
1 files changed, 16 insertions, 11 deletions
diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp
index 13bcefe07..9df7ac50f 100644
--- a/src/core/hle/service/ldr/ldr.cpp
+++ b/src/core/hle/service/ldr/ldr.cpp
@@ -318,14 +318,18 @@ public:
return;
}
- ASSERT(process->MirrorMemory(*map_address, nro_addr, nro_size,
- Kernel::MemoryState::ModuleCodeStatic) == RESULT_SUCCESS);
- ASSERT(process->UnmapMemory(nro_addr, 0, nro_size) == RESULT_SUCCESS);
+ ASSERT(vm_manager
+ .MirrorMemory(*map_address, nro_addr, nro_size,
+ Kernel::MemoryState::ModuleCodeStatic)
+ .IsSuccess());
+ ASSERT(vm_manager.UnmapRange(nro_addr, nro_size).IsSuccess());
if (bss_size > 0) {
- ASSERT(process->MirrorMemory(*map_address + nro_size, bss_addr, bss_size,
- Kernel::MemoryState::ModuleCodeStatic) == RESULT_SUCCESS);
- ASSERT(process->UnmapMemory(bss_addr, 0, bss_size) == RESULT_SUCCESS);
+ ASSERT(vm_manager
+ .MirrorMemory(*map_address + nro_size, bss_addr, bss_size,
+ Kernel::MemoryState::ModuleCodeStatic)
+ .IsSuccess());
+ ASSERT(vm_manager.UnmapRange(bss_addr, bss_size).IsSuccess());
}
vm_manager.ReprotectRange(*map_address, header.text_size,
@@ -380,13 +384,14 @@ public:
return;
}
- auto* process = Core::CurrentProcess();
- auto& vm_manager = process->VMManager();
+ auto& vm_manager = Core::CurrentProcess()->VMManager();
const auto& nro_size = iter->second.size;
- ASSERT(process->MirrorMemory(heap_addr, mapped_addr, nro_size,
- Kernel::MemoryState::ModuleCodeStatic) == RESULT_SUCCESS);
- ASSERT(process->UnmapMemory(mapped_addr, 0, nro_size) == RESULT_SUCCESS);
+ ASSERT(vm_manager
+ .MirrorMemory(heap_addr, mapped_addr, nro_size,
+ Kernel::MemoryState::ModuleCodeStatic)
+ .IsSuccess());
+ ASSERT(vm_manager.UnmapRange(mapped_addr, nro_size).IsSuccess());
Core::System::GetInstance().InvalidateCpuInstructionCaches();