summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-04-09 03:10:02 +0200
committerbunnei <bunneidev@gmail.com>2020-04-17 06:59:33 +0200
commit77382ac2b2d29b69b2a1140ba43e6a178ff4187f (patch)
tree934f8c01534ccdb92da20afe38be143619b8c971 /src
parentservice: time: Update for new shared memory layout. (diff)
downloadyuzu-77382ac2b2d29b69b2a1140ba43e6a178ff4187f.tar
yuzu-77382ac2b2d29b69b2a1140ba43e6a178ff4187f.tar.gz
yuzu-77382ac2b2d29b69b2a1140ba43e6a178ff4187f.tar.bz2
yuzu-77382ac2b2d29b69b2a1140ba43e6a178ff4187f.tar.lz
yuzu-77382ac2b2d29b69b2a1140ba43e6a178ff4187f.tar.xz
yuzu-77382ac2b2d29b69b2a1140ba43e6a178ff4187f.tar.zst
yuzu-77382ac2b2d29b69b2a1140ba43e6a178ff4187f.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/ns/pl_u.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp
index 8da4e52c5..ab1746d28 100644
--- a/src/core/hle/service/ns/pl_u.cpp
+++ b/src/core/hle/service/ns/pl_u.cpp
@@ -19,6 +19,7 @@
#include "core/file_sys/romfs.h"
#include "core/file_sys/system_archive/system_archive.h"
#include "core/hle/ipc_helpers.h"
+#include "core/hle/kernel/kernel.h"
#include "core/hle/kernel/physical_memory.h"
#include "core/hle/kernel/shared_memory.h"
#include "core/hle/service/filesystem/filesystem.h"
@@ -265,16 +266,13 @@ void PL_U::GetSharedMemoryAddressOffset(Kernel::HLERequestContext& ctx) {
void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) {
// Map backing memory for the font data
LOG_DEBUG(Service_NS, "called");
- system.CurrentProcess()->VMManager().MapMemoryBlock(SHARED_FONT_MEM_VADDR, impl->shared_font, 0,
- SHARED_FONT_MEM_SIZE,
- Kernel::MemoryState::Shared);
// Create shared font memory object
auto& kernel = system.Kernel();
- impl->shared_font_mem = Kernel::SharedMemory::Create(
- kernel, system.CurrentProcess(), SHARED_FONT_MEM_SIZE, Kernel::MemoryPermission::ReadWrite,
- Kernel::MemoryPermission::Read, SHARED_FONT_MEM_VADDR, Kernel::MemoryRegion::BASE,
- "PL_U:shared_font_mem");
+ impl->shared_font_mem = SharedFrom(&kernel.GetFontSharedMem());
+
+ std::memcpy(impl->shared_font_mem->GetPointer(), impl->shared_font->data(),
+ impl->shared_font->size());
IPC::ResponseBuilder rb{ctx, 2, 1};
rb.Push(RESULT_SUCCESS);