diff options
| author | bunnei <bunneidev@gmail.com> | 2021-05-07 23:30:17 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-07 23:30:17 -0700 |
| commit | faa067f175cbf5e916ed75776817f0046e6731c4 (patch) | |
| tree | 8ab02a72a6e4d6578848c8da2c02af02684aeec7 /src/core/hle/service/ns/pl_u.cpp | |
| parent | 8acf739b3fac78d25dc60e1a7d1252c05afadd57 (diff) | |
| parent | d57b12193b12f7b6e3565d29f7bc3d7584632768 (diff) | |
Merge pull request #6266 from bunnei/kautoobject-refactor
Kernel Rework: Migrate kernel objects to KAutoObject
Diffstat (limited to 'src/core/hle/service/ns/pl_u.cpp')
| -rw-r--r-- | src/core/hle/service/ns/pl_u.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/core/hle/service/ns/pl_u.cpp b/src/core/hle/service/ns/pl_u.cpp index da139fdc4..e14acce58 100644 --- a/src/core/hle/service/ns/pl_u.cpp +++ b/src/core/hle/service/ns/pl_u.cpp @@ -130,9 +130,6 @@ struct PL_U::Impl { } } - /// Handle to shared memory region designated for a shared font - std::shared_ptr<Kernel::KSharedMemory> shared_font_mem; - /// Backing memory for the shared font data std::shared_ptr<Kernel::PhysicalMemory> shared_font; @@ -260,14 +257,13 @@ void PL_U::GetSharedMemoryNativeHandle(Kernel::HLERequestContext& ctx) { // Create shared font memory object auto& kernel = system.Kernel(); - impl->shared_font_mem = SharedFrom(&kernel.GetFontSharedMem()); - std::memcpy(impl->shared_font_mem->GetPointer(), impl->shared_font->data(), + std::memcpy(kernel.GetFontSharedMem().GetPointer(), impl->shared_font->data(), impl->shared_font->size()); IPC::ResponseBuilder rb{ctx, 2, 1}; rb.Push(RESULT_SUCCESS); - rb.PushCopyObjects(impl->shared_font_mem); + rb.PushCopyObjects(&kernel.GetFontSharedMem()); } void PL_U::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) { |
