aboutsummaryrefslogtreecommitdiff
path: root/src/core/hle
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-21 20:21:49 -0700
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-21 22:55:17 -0700
commit326e7c70208865b013e138972b25687d805488d0 (patch)
treeb88cd1431d0069052b0bab969ba480a9278f8c22 /src/core/hle
parent72b69cea4bf9d01e520fb984a382de3e85af4e36 (diff)
Memory: Make PhysicalToVirtualAddress return a boost::optional
And fix a few places in the code to take advantage of that.
Diffstat (limited to 'src/core/hle')
-rw-r--r--src/core/hle/kernel/shared_memory.cpp2
-rw-r--r--src/core/hle/service/apt/apt.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp
index 922e5ab58..a7b66142f 100644
--- a/src/core/hle/kernel/shared_memory.cpp
+++ b/src/core/hle/kernel/shared_memory.cpp
@@ -149,7 +149,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi
if (base_address == 0 && target_address == 0) {
// Calculate the address at which to map the memory block.
- target_address = Memory::PhysicalToVirtualAddress(linear_heap_phys_address);
+ target_address = Memory::PhysicalToVirtualAddress(linear_heap_phys_address).value();
}
// Map the memory block into the target process
diff --git a/src/core/hle/service/apt/apt.cpp b/src/core/hle/service/apt/apt.cpp
index 25e7b777d..6375e28f9 100644
--- a/src/core/hle/service/apt/apt.cpp
+++ b/src/core/hle/service/apt/apt.cpp
@@ -82,7 +82,7 @@ void GetSharedFont(Service::Interface* self) {
// The shared font has to be relocated to the new address before being passed to the
// application.
VAddr target_address =
- Memory::PhysicalToVirtualAddress(shared_font_mem->linear_heap_phys_address);
+ Memory::PhysicalToVirtualAddress(shared_font_mem->linear_heap_phys_address).value();
if (!shared_font_relocated) {
BCFNT::RelocateSharedFont(shared_font_mem, target_address);
shared_font_relocated = true;