hle: kernel: Migrate KSharedMemory to KAutoObject.
This commit is contained in:
parent
7ccbdd4d8d
commit
086db71e94
16 changed files with 128 additions and 114 deletions
|
@ -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(system.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.get());
|
||||
rb.PushCopyObjects(&system.Kernel().GetFontSharedMem());
|
||||
}
|
||||
|
||||
void PL_U::GetSharedFontInOrderOfPriority(Kernel::HLERequestContext& ctx) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue