diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/memory.cpp | 2 | ||||
-rw-r--r-- | src/core/memory.h | 10 | ||||
-rw-r--r-- | src/core/memory/cheat_engine.cpp | 2 |
3 files changed, 12 insertions, 2 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 11609682a..b9dd3e275 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -16,7 +16,7 @@ #include "core/arm/arm_interface.h" #include "core/core.h" #include "core/device_memory.h" -#include "core/hle/kernel/memory/page_table.h" +#include "core/hle/kernel/k_page_table.h" #include "core/hle/kernel/physical_memory.h" #include "core/hle/kernel/process.h" #include "core/memory.h" diff --git a/src/core/memory.h b/src/core/memory.h index 705ebb23d..6d34fcfe2 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -116,6 +116,11 @@ public: */ u8* GetPointer(VAddr vaddr); + template <typename T> + T* GetPointer(VAddr vaddr) { + return reinterpret_cast<T*>(GetPointer(vaddr)); + } + /** * Gets a pointer to the given address. * @@ -126,6 +131,11 @@ public: */ const u8* GetPointer(VAddr vaddr) const; + template <typename T> + const T* GetPointer(VAddr vaddr) const { + return reinterpret_cast<T*>(GetPointer(vaddr)); + } + /** * Reads an 8-bit unsigned value from the current process' address space * at the given virtual address. diff --git a/src/core/memory/cheat_engine.cpp b/src/core/memory/cheat_engine.cpp index 2dd0eb0f8..8eec567ab 100644 --- a/src/core/memory/cheat_engine.cpp +++ b/src/core/memory/cheat_engine.cpp @@ -10,7 +10,7 @@ #include "core/core_timing.h" #include "core/core_timing_util.h" #include "core/hardware_properties.h" -#include "core/hle/kernel/memory/page_table.h" +#include "core/hle/kernel/k_page_table.h" #include "core/hle/kernel/process.h" #include "core/hle/service/hid/controllers/npad.h" #include "core/hle/service/hid/hid.h" |