diff options
author | Zach Hilman <zachhilman@gmail.com> | 2018-11-18 03:40:17 +0100 |
---|---|---|
committer | Zach Hilman <zachhilman@gmail.com> | 2018-11-18 03:40:26 +0100 |
commit | 51af996854ce01da17750b0a1f8d2f3a95449cfc (patch) | |
tree | 097752e6d2a94a37fe482f5606ca67be8a33890b /src/core/hle/kernel/vm_manager.cpp | |
parent | ldr_ro: Implement UnloadNro (command 1) (diff) | |
download | yuzu-51af996854ce01da17750b0a1f8d2f3a95449cfc.tar yuzu-51af996854ce01da17750b0a1f8d2f3a95449cfc.tar.gz yuzu-51af996854ce01da17750b0a1f8d2f3a95449cfc.tar.bz2 yuzu-51af996854ce01da17750b0a1f8d2f3a95449cfc.tar.lz yuzu-51af996854ce01da17750b0a1f8d2f3a95449cfc.tar.xz yuzu-51af996854ce01da17750b0a1f8d2f3a95449cfc.tar.zst yuzu-51af996854ce01da17750b0a1f8d2f3a95449cfc.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/vm_manager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/hle/kernel/vm_manager.cpp b/src/core/hle/kernel/vm_manager.cpp index ec7fd6150..100f8f6bf 100644 --- a/src/core/hle/kernel/vm_manager.cpp +++ b/src/core/hle/kernel/vm_manager.cpp @@ -298,7 +298,7 @@ ResultCode VMManager::HeapFree(VAddr target, u64 size) { return RESULT_SUCCESS; } -ResultCode VMManager::MirrorMemory(VAddr dst_addr, VAddr src_addr, u64 size) { +ResultCode VMManager::MirrorMemory(VAddr dst_addr, VAddr src_addr, u64 size, MemoryState state) { const auto vma = FindVMA(src_addr); ASSERT_MSG(vma != vma_map.end(), "Invalid memory address"); @@ -312,8 +312,8 @@ ResultCode VMManager::MirrorMemory(VAddr dst_addr, VAddr src_addr, u64 size) { const std::shared_ptr<std::vector<u8>>& backing_block = vma->second.backing_block; const std::size_t backing_block_offset = vma->second.offset + vma_offset; - CASCADE_RESULT(auto new_vma, MapMemoryBlock(dst_addr, backing_block, backing_block_offset, size, - MemoryState::Mapped)); + CASCADE_RESULT(auto new_vma, + MapMemoryBlock(dst_addr, backing_block, backing_block_offset, size, state)); // Protect mirror with permissions from old region Reprotect(new_vma, vma->second.permissions); // Remove permissions from old region |