summaryrefslogtreecommitdiffstats
path: root/src/core/memory.cpp
diff options
context:
space:
mode:
authorLiam <byteslice@airmail.cc>2023-02-13 17:21:43 +0100
committerLiam <byteslice@airmail.cc>2023-02-14 01:03:12 +0100
commitceda2d280e8a3030c1e23083c5cea9158387fe4c (patch)
tree8041460840ed81d4cb74d87eecfb8fb720cdfa15 /src/core/memory.cpp
parentkernel: use GetCurrentProcess (diff)
downloadyuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar
yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.gz
yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.bz2
yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.lz
yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.xz
yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.tar.zst
yuzu-ceda2d280e8a3030c1e23083c5cea9158387fe4c.zip
Diffstat (limited to '')
-rw-r--r--src/core/memory.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp
index af9660b55..4397fcfb1 100644
--- a/src/core/memory.cpp
+++ b/src/core/memory.cpp
@@ -247,11 +247,11 @@ struct Memory::Impl {
}
void ReadBlock(const VAddr src_addr, void* dest_buffer, const std::size_t size) {
- ReadBlockImpl<false>(*system.CurrentProcess(), src_addr, dest_buffer, size);
+ ReadBlockImpl<false>(*system.ApplicationProcess(), src_addr, dest_buffer, size);
}
void ReadBlockUnsafe(const VAddr src_addr, void* dest_buffer, const std::size_t size) {
- ReadBlockImpl<true>(*system.CurrentProcess(), src_addr, dest_buffer, size);
+ ReadBlockImpl<true>(*system.ApplicationProcess(), src_addr, dest_buffer, size);
}
template <bool UNSAFE>
@@ -279,11 +279,11 @@ struct Memory::Impl {
}
void WriteBlock(const VAddr dest_addr, const void* src_buffer, const std::size_t size) {
- WriteBlockImpl<false>(*system.CurrentProcess(), dest_addr, src_buffer, size);
+ WriteBlockImpl<false>(*system.ApplicationProcess(), dest_addr, src_buffer, size);
}
void WriteBlockUnsafe(const VAddr dest_addr, const void* src_buffer, const std::size_t size) {
- WriteBlockImpl<true>(*system.CurrentProcess(), dest_addr, src_buffer, size);
+ WriteBlockImpl<true>(*system.ApplicationProcess(), dest_addr, src_buffer, size);
}
void ZeroBlock(const Kernel::KProcess& process, const VAddr dest_addr, const std::size_t size) {
@@ -711,7 +711,7 @@ void Memory::UnmapRegion(Common::PageTable& page_table, VAddr base, u64 size) {
}
bool Memory::IsValidVirtualAddress(const VAddr vaddr) const {
- const Kernel::KProcess& process = *system.CurrentProcess();
+ const Kernel::KProcess& process = *system.ApplicationProcess();
const auto& page_table = process.PageTable().PageTableImpl();
const size_t page = vaddr >> YUZU_PAGEBITS;
if (page >= page_table.pointers.size()) {