diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/shared_memory.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/kernel/shared_memory.h | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 68ad39fa1..b8bcc16ee 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp | |||
| @@ -136,4 +136,8 @@ u8* SharedMemory::GetPointer(std::size_t offset) { | |||
| 136 | return backing_block->data() + backing_block_offset + offset; | 136 | return backing_block->data() + backing_block_offset + offset; |
| 137 | } | 137 | } |
| 138 | 138 | ||
| 139 | const u8* SharedMemory::GetPointer(std::size_t offset) const { | ||
| 140 | return backing_block->data() + backing_block_offset + offset; | ||
| 141 | } | ||
| 142 | |||
| 139 | } // namespace Kernel | 143 | } // namespace Kernel |
diff --git a/src/core/hle/kernel/shared_memory.h b/src/core/hle/kernel/shared_memory.h index 60433f09b..f3b05e48b 100644 --- a/src/core/hle/kernel/shared_memory.h +++ b/src/core/hle/kernel/shared_memory.h | |||
| @@ -113,10 +113,17 @@ public: | |||
| 113 | /** | 113 | /** |
| 114 | * Gets a pointer to the shared memory block | 114 | * Gets a pointer to the shared memory block |
| 115 | * @param offset Offset from the start of the shared memory block to get pointer | 115 | * @param offset Offset from the start of the shared memory block to get pointer |
| 116 | * @return Pointer to the shared memory block from the specified offset | 116 | * @return A pointer to the shared memory block from the specified offset |
| 117 | */ | 117 | */ |
| 118 | u8* GetPointer(std::size_t offset = 0); | 118 | u8* GetPointer(std::size_t offset = 0); |
| 119 | 119 | ||
| 120 | /** | ||
| 121 | * Gets a constant pointer to the shared memory block | ||
| 122 | * @param offset Offset from the start of the shared memory block to get pointer | ||
| 123 | * @return A constant pointer to the shared memory block from the specified offset | ||
| 124 | */ | ||
| 125 | const u8* GetPointer(std::size_t offset = 0) const; | ||
| 126 | |||
| 120 | private: | 127 | private: |
| 121 | explicit SharedMemory(KernelCore& kernel); | 128 | explicit SharedMemory(KernelCore& kernel); |
| 122 | ~SharedMemory() override; | 129 | ~SharedMemory() override; |