summaryrefslogtreecommitdiffstats
path: root/src/core/memory.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-22 05:25:46 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2017-06-22 07:55:18 +0200
commit6ae0086b39769f5f11d7d4bb7115be8bf2565afe (patch)
tree1940846ad71e490ae37f643c57cbdbfb850ef3c9 /src/core/memory.h
parentMemory: Make PhysicalToVirtualAddress return a boost::optional (diff)
downloadyuzu-6ae0086b39769f5f11d7d4bb7115be8bf2565afe.tar
yuzu-6ae0086b39769f5f11d7d4bb7115be8bf2565afe.tar.gz
yuzu-6ae0086b39769f5f11d7d4bb7115be8bf2565afe.tar.bz2
yuzu-6ae0086b39769f5f11d7d4bb7115be8bf2565afe.tar.lz
yuzu-6ae0086b39769f5f11d7d4bb7115be8bf2565afe.tar.xz
yuzu-6ae0086b39769f5f11d7d4bb7115be8bf2565afe.tar.zst
yuzu-6ae0086b39769f5f11d7d4bb7115be8bf2565afe.zip
Diffstat (limited to '')
-rw-r--r--src/core/memory.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/core/memory.h b/src/core/memory.h
index 77277c342..96ce9e52e 100644
--- a/src/core/memory.h
+++ b/src/core/memory.h
@@ -149,9 +149,17 @@ u8* GetPointer(VAddr virtual_address);
std::string ReadCString(VAddr virtual_address, std::size_t max_length);
/**
-* Converts a virtual address inside a region with 1:1 mapping to physical memory to a physical
-* address. This should be used by services to translate addresses for use by the hardware.
-*/
+ * Converts a virtual address inside a region with 1:1 mapping to physical memory to a physical
+ * address. This should be used by services to translate addresses for use by the hardware.
+ */
+boost::optional<PAddr> TryVirtualToPhysicalAddress(VAddr addr);
+
+/**
+ * Converts a virtual address inside a region with 1:1 mapping to physical memory to a physical
+ * address. This should be used by services to translate addresses for use by the hardware.
+ *
+ * @deprecated Use TryVirtualToPhysicalAddress(), which reports failure.
+ */
PAddr VirtualToPhysicalAddress(VAddr addr);
/**